Message ID | 20180423094639.14612-3-mylene.josserand@bootlin.com |
---|---|
State | Accepted |
Delegated to: | Cyril Hrubis |
Headers | show |
Series | testcases: small improvements with TCONF | expand |
Hi! And the rest of the patches I haven't commented on looks good to me.
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
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 --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()
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(+)