# [PATCHv2] git-p4: t9814: prevent --chain-lint failure

4 messages from 2015-04-28 to 2015-04-28. Participants: Luke Diamand.
Thread: https://gitlist.dev/t/39175

## Luke Diamand, 2015-04-28 06:30

Subject: [PATCHv2] Fixup test-lint error in git-p4 t9814 test
Message-ID: <1430202609-31841-1-git-send-email-luke@diamand.org>
URL: https://gitlist.dev/e/1430202609-31841-1-git-send-email-luke%40diamand.org
In-Reply-To: <20150427230223.GA22403@peff.net>

```
Using Jeff's suggestion of converting the t9814 test to use
test_lazy_prereq makes the test a lot clearer, and as a bonus,
also fixes the --chain-lint error.

Thanks,
Luke

Luke Diamand (1):
  git-p4: t9814: prevent --chain-lint failure

 t/t9814-git-p4-rename.sh | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

-- 
2.3.4.48.g223ab37

```

## Luke Diamand, 2015-04-28 06:30

Subject: [PATCHv2] git-p4: t9814: prevent --chain-lint failure
Message-ID: <1430202609-31841-2-git-send-email-luke@diamand.org>
URL: https://gitlist.dev/e/1430202609-31841-2-git-send-email-luke%40diamand.org
In-Reply-To: <1430202609-31841-1-git-send-email-luke@diamand.org>

```
Use test_lazy_prereq to setup prerequisites for the p4 move
test. This both makes the test simpler and clearer, and also
means they no longer fail the new --chain-lint tests.

Suggested-by: Jeff King <peff@peff.net>
Signed-off-by: Luke Diamand <luke@diamand.org>
---
 t/t9814-git-p4-rename.sh | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/t/t9814-git-p4-rename.sh b/t/t9814-git-p4-rename.sh
index 99bb71b..c89992c 100755
--- a/t/t9814-git-p4-rename.sh
+++ b/t/t9814-git-p4-rename.sh
@@ -226,14 +226,9 @@ test_expect_success 'detect copies' '
 
 # See if configurables can be set, and in particular if the run.move.allow
 # variable exists, which allows admins to disable the "p4 move" command.
-test_expect_success 'p4 configure command and run.move.allow are available' '
-	p4 configure show run.move.allow >out ; retval=$? &&
-	test $retval = 0 &&
-	{
-		egrep ^run.move.allow: out &&
-		test_set_prereq P4D_HAVE_CONFIGURABLE_RUN_MOVE_ALLOW ||
-		true
-	} || true
+test_lazy_prereq P4D_HAVE_CONFIGURABLE_RUN_MOVE_ALLOW '
+	p4 configure show run.move.allow >out &&
+	egrep ^run.move.allow: out
 '
 
 # If move can be disabled, turn it off and test p4 move handling
-- 
2.3.4.48.g223ab37

```

## Luke Diamand, 2015-04-28 07:21

Subject: [PATCHv3] Fixup test-lint error in git-p4 t9814 test
Message-ID: <1430205682-4309-1-git-send-email-luke@diamand.org>
URL: https://gitlist.dev/e/1430205682-4309-1-git-send-email-luke%40diamand.org
In-Reply-To: <1430202609-31841-1-git-send-email-luke@diamand.org>

```
Using Jeff's suggestion of converting the t9814 test to use
test_lazy_prereq makes the test a lot clearer, and as a bonus,
also fixes the --chain-lint error.

Version 3 of the patch corrects a small typo in the commit message
of version 2.

Luke Diamand (1):
  git-p4: t9814: prevent --chain-lint failure

 t/t9814-git-p4-rename.sh | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

-- 
2.3.4.48.g223ab37

```

## Luke Diamand, 2015-04-28 07:21

Subject: [PATCHv3] git-p4: t9814: prevent --chain-lint failure
Message-ID: <1430205682-4309-2-git-send-email-luke@diamand.org>
URL: https://gitlist.dev/e/1430205682-4309-2-git-send-email-luke%40diamand.org
In-Reply-To: <1430205682-4309-1-git-send-email-luke@diamand.org>

```
Use test_lazy_prereq to setup prerequisites for the p4 move
test. This both makes the test simpler and clearer, and also
means it no longer fails the new --chain-lint tests.

Suggested-by: Jeff King <peff@peff.net>
Signed-off-by: Luke Diamand <luke@diamand.org>
---
 t/t9814-git-p4-rename.sh | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/t/t9814-git-p4-rename.sh b/t/t9814-git-p4-rename.sh
index 99bb71b..c89992c 100755
--- a/t/t9814-git-p4-rename.sh
+++ b/t/t9814-git-p4-rename.sh
@@ -226,14 +226,9 @@ test_expect_success 'detect copies' '
 
 # See if configurables can be set, and in particular if the run.move.allow
 # variable exists, which allows admins to disable the "p4 move" command.
-test_expect_success 'p4 configure command and run.move.allow are available' '
-	p4 configure show run.move.allow >out ; retval=$? &&
-	test $retval = 0 &&
-	{
-		egrep ^run.move.allow: out &&
-		test_set_prereq P4D_HAVE_CONFIGURABLE_RUN_MOVE_ALLOW ||
-		true
-	} || true
+test_lazy_prereq P4D_HAVE_CONFIGURABLE_RUN_MOVE_ALLOW '
+	p4 configure show run.move.allow >out &&
+	egrep ^run.move.allow: out
 '
 
 # If move can be disabled, turn it off and test p4 move handling
-- 
2.3.4.48.g223ab37

```
