diff options
author | Naresh Kamboju <naresh.kamboju@linaro.org> | 2018-06-26 12:14:48 +0530 |
---|---|---|
committer | Naresh Kamboju <naresh.kamboju@linaro.org> | 2018-06-26 12:14:48 +0530 |
commit | 1e809bea45880ea7b94528dc0c810cda0b28699d (patch) | |
tree | 4ef2711b60504fbbf628cf795a550c1f9b9a6163 | |
parent | 9ada64f738f53308818cc4278b1c46ca15dc5bc0 (diff) |
ltp open posix clean up
Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
-rwxr-xr-x | automated/linux/ltp-open-posix/ltp-open-posix.sh | 37 | ||||
-rw-r--r-- | automated/linux/ltp-open-posix/ltp-open-posix.yaml | 2 |
2 files changed, 9 insertions, 30 deletions
diff --git a/automated/linux/ltp-open-posix/ltp-open-posix.sh b/automated/linux/ltp-open-posix/ltp-open-posix.sh index 2cec032..5d52d95 100755 --- a/automated/linux/ltp-open-posix/ltp-open-posix.sh +++ b/automated/linux/ltp-open-posix/ltp-open-posix.sh @@ -11,13 +11,11 @@ SCRIPT="$(readlink -f "${0}")" # Absolute path this script is in. /home/user/bin SCRIPTPATH="$(dirname "${SCRIPT}")" echo "Script path is: ${SCRIPTPATH}" -LOG_FILE="open_posix_testsuite" SKIP_INSTALL="true" # List of test cases TEST="conformance functional stress" # LTP version LTP_VERSION="20180515" -LTP_TMPDIR=/ltp-tmp LTP_PRE_INSTALL=/opt/ltp LTP_PATH=/opt/ltp/testcases/open_posix_testsuite @@ -41,23 +39,23 @@ install_ltp_open_posix() { ./configure --with-open-posix-testsuite # shellcheck disable=SC2164 cd "${LTP_PATH}" - make generate-makefiles | tee -a ${OUTPUT}/LTP_${LOG_FILE}.out + make generate-makefiles || true for EACH_TEST in ${TEST} do - make ${EACH_TEST}-all | tee -a ${OUTPUT}/LTP_${LOG_FILE}.out + make "${EACH_TEST}"-all || true done } -# Parse LTP output +# Parse LTP open posix output parse_ltp_output() { for EACH_TEST in ${TEST} do - sed -i -e "s/\// /g" logfile.${EACH_TEST}-test - grep -E ": PASS" logfile.${EACH_TEST}-test \ + sed -i -e "s/\// /g" logfile."${EACH_TEST}"-test + grep -E ": PASS" logfile."${EACH_TEST}"-test \ | awk '{print $(NF-2)" "$(NF)}' \ | sed 's/://g; s/PASS/pass/' >> "${RESULT_FILE}" - grep -E ": FAILED|: UNSUPPORTED|: UNTESTED" logfile.${EACH_TEST}-test \ + grep -E ": FAILED|: UNSUPPORTED|: UNTESTED" logfile."${EACH_TEST}"-test \ | awk '{print $(NF-3)" "$(NF-1)}' \ | sed 's/://g; s/FAILED/fail/; s/UNSUPPORTED/skip/; s/UNTESTED/skip/' >> "${RESULT_FILE}" done @@ -70,26 +68,9 @@ run_ltp_open_posix() { cd "${LTP_PATH}" for EACH_TEST in ${TEST} do - make ${EACH_TEST}-test | tee -a ${OUTPUT}/LTP_${LOG_FILE}.out + make "${EACH_TEST}"-test || true done - - check_return "runltp_${LOG_FILE}" - - parse_ltp_output "${OUTPUT}/LTP_${LOG_FILE}.log" -} - -# Prepare system -prep_system() { - # Stop systemd-timesyncd if running - if systemctl is-active systemd-timesyncd 2>/dev/null; then - info_msg "Stopping systemd-timesyncd" - systemctl stop systemd-timesyncd || true - fi - # userns07 requires kernel.unprivileged_userns_clone - if [ "$(sysctl -n kernel.unprivileged_userns_clone)" -eq 0 ]; then - info_msg "Enabling kernel.unprivileged_userns_clone" - sysctl -w kernel.unprivileged_userns_clone=1 || true - fi + parse_ltp_output } # Test run. @@ -120,7 +101,5 @@ else info_msg "Run install-ltp-open-posix" install_ltp_open_posix fi -info_msg "Running prep_system" -prep_system info_msg "Running run-ltp-open-posix" run_ltp_open_posix diff --git a/automated/linux/ltp-open-posix/ltp-open-posix.yaml b/automated/linux/ltp-open-posix/ltp-open-posix.yaml index a8fedd0..54c62b0 100644 --- a/automated/linux/ltp-open-posix/ltp-open-posix.yaml +++ b/automated/linux/ltp-open-posix/ltp-open-posix.yaml @@ -21,7 +21,7 @@ metadata: params: # LTP version LTP_VERSION: 20180515 - SKIP_INSTALL: false + SKIP_INSTALL: true run: steps: |