diff mbox series

[RFC,2/9] testcases: ar: Add TST_NEEDS_CMDS on "ar"

Message ID 20180423094639.14612-3-mylene.josserand@bootlin.com
State Accepted
Delegated to: Cyril Hrubis
Headers show
Series testcases: small improvements with TCONF | expand

Commit Message

Mylène Josserand April 23, 2018, 9:46 a.m. UTC
In case "ar" binary is not available, the test will fail.
It should return a TCONF as we just do not have the binary.

This commit adds TST_NEEDS_CMDS macro on "ar". Thanks to that,
it will return "TCONF" and not "FAIL" when "ar" is not available.

Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com>
---
 testcases/commands/ar/ar01 | 3 +++
 1 file changed, 3 insertions(+)

Comments

Cyril Hrubis April 23, 2018, 10:25 a.m. UTC | #1
Hi!
And the rest of the patches I haven't commented on looks good to me.
Mylène Josserand April 27, 2018, 1:37 p.m. UTC | #2
Hello,

On Mon, 23 Apr 2018 12:25:25 +0200
Cyril Hrubis <chrubis@suse.cz> wrote:

> Hi!
> And the rest of the patches I haven't commented on looks good to me.
> 

Okay, thank you for your reviews!

Best regards
Petr Vorel May 16, 2018, 9:27 a.m. UTC | #3
Hi Mylène,

> In case "ar" binary is not available, the test will fail.
> It should return a TCONF as we just do not have the binary.

> This commit adds TST_NEEDS_CMDS macro on "ar". Thanks to that,
> it will return "TCONF" and not "FAIL" when "ar" is not available.

> Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com>
> ---
>  testcases/commands/ar/ar01 | 3 +++
>  1 file changed, 3 insertions(+)

> diff --git a/testcases/commands/ar/ar01 b/testcases/commands/ar/ar01
> index ddab2e0f0..edaa24657 100644
> --- a/testcases/commands/ar/ar01
> +++ b/testcases/commands/ar/ar01
> @@ -22,9 +22,12 @@

>  # This is a basic ar command test.

> +AR=${AR:=ar}
>  TST_CNT=17
>  TST_TESTFUNC=test
>  TST_NEEDS_TMPDIR=1
> +TST_NEEDS_CMDS="$AR"
> +
>  . tst_test.sh

>  test1()

Merged with minor change:
-AR=${AR:=ar}
+AR="${AR:=ar}"

Thanks for your contributions.

Kind regards,
Petr
diff mbox series

Patch

diff --git a/testcases/commands/ar/ar01 b/testcases/commands/ar/ar01
index ddab2e0f0..edaa24657 100644
--- a/testcases/commands/ar/ar01
+++ b/testcases/commands/ar/ar01
@@ -22,9 +22,12 @@ 
 #
 # This is a basic ar command test.
 #
+AR=${AR:=ar}
 TST_CNT=17
 TST_TESTFUNC=test
 TST_NEEDS_TMPDIR=1
+TST_NEEDS_CMDS="$AR"
+
 . tst_test.sh
 
 test1()