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

Mylène Josserand mylene.josserand@bootlin.com
Mon Apr 23 11:46:32 CEST 2018


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()
-- 
2.11.0



More information about the ltp mailing list