[Fuego] [fuego-core 4/7] LTP: Add the new tests and skip non-installed tests

[email protected] Sun, 18 Jul 2021 16:40:09 +0530
Newsgroups dev.linux.lists.fuego
Message-ID <[email protected]>
From: Tran Hai Binh <[email protected]>

 - Add the new tests in 20200930 that are not in ALLTESTS:
	s390x_tests, uevent, crypto
 - Skip non-installed tests in LTP

Signed-off-by: Tran Hai Binh <[email protected]>
Signed-off-by: venkata pyla <[email protected]>
---
 tests/Functional.LTP/fuego_test.sh     |  6 +++---
 tests/Functional.LTP/ltp_target_run.sh | 23 ++++++++++++++---------
 2 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/tests/Functional.LTP/fuego_test.sh b/tests/Functional.LTP/fuego_test.sh
index a4f551b..6a84d1c 100755
--- a/tests/Functional.LTP/fuego_test.sh
+++ b/tests/Functional.LTP/fuego_test.sh
@@ -18,9 +18,9 @@ cve                 io_floppy             net.ipv6_lib          net.tirpc_tests
 dio                 ipc                   net.multicast         network_commands                  timers
 dma_thread_diotest  kernel_misc           net.nfs               nptl                              tpm_tools
 fcntl-locktests     ltp-aiodio.part1      net.rpc               numa                              tracing
-filecaps            ltp-aiodio.part2      net.rpc_tests         pipes
-fs                  ltp-aiodio.part3      net.sctp              power_management_tests
-fs_bind             ltp-aiodio.part4      net_stress.appl       power_management_tests_exclusive
+filecaps            ltp-aiodio.part2      net.rpc_tests         pipes                             s390x_tests
+fs                  ltp-aiodio.part3      net.sctp              power_management_tests            uevent
+fs_bind             ltp-aiodio.part4      net_stress.appl       power_management_tests_exclusive  crypto
 fs_ext4             ltp-aio-stress.part1  net_stress.broken_ip  pty
 smoketest"
 
diff --git a/tests/Functional.LTP/ltp_target_run.sh b/tests/Functional.LTP/ltp_target_run.sh
index 52a006a..ded81de 100755
--- a/tests/Functional.LTP/ltp_target_run.sh
+++ b/tests/Functional.LTP/ltp_target_run.sh
@@ -5,6 +5,7 @@
 
 OUTPUT_DIR=${PWD}/result
 TMP_DIR=${PWD}/tmp
+RUNTEST_DIR=${PWD}/runtest
 
 [ -d ${TMP_DIR} ] && rm -rf ${TMP_DIR}
 mkdir -p ${TMP_DIR}
@@ -18,15 +19,19 @@ echo "ltp_target_run: ${TESTS} | ${PTSTESTS} | ${RTTESTS}"
 
 # FIXTHIS: add -t option for limiting the duration of each test group execution
 for i in ${TESTS}; do
-    echo "ltp_target_run: doing test $i"
-    mkdir -p ${OUTPUT_DIR}/${i}
-    ./runltp -C ${OUTPUT_DIR}/${i}/failed.log \
-             -l ${OUTPUT_DIR}/${i}/result.log \
-             -o ${OUTPUT_DIR}/${i}/output.log \
-             -d ${TMP_DIR} \
-             -S ./skiplist.txt \
-             -f $i > ${OUTPUT_DIR}/${i}/head.log 2>&1
-    rm -rf ${TMP_DIR}/*
+    if [ -f ${RUNTEST_DIR}/${i} ]; then
+        echo "ltp_target_run: doing test $i"
+        mkdir -p ${OUTPUT_DIR}/${i}
+        ./runltp -C ${OUTPUT_DIR}/${i}/failed.log \
+                 -l ${OUTPUT_DIR}/${i}/result.log \
+                 -o ${OUTPUT_DIR}/${i}/output.log \
+                 -d ${TMP_DIR} \
+                 -S ./skiplist.txt \
+                 -f $i > ${OUTPUT_DIR}/${i}/head.log 2>&1
+        rm -rf ${TMP_DIR}/*
+    else
+        echo "Warning: ${i} is not available in the installed LTP"
+    fi
 done
 
 # gather posix results into pts.log
-- 
2.20.1