diff --git a/compiler/one-cmds/tests/one-codegen_006.test b/compiler/one-cmds/tests/one-codegen_006.test index d5e3dc86843..6797a3a6a4d 100644 --- a/compiler/one-cmds/tests/one-codegen_006.test +++ b/compiler/one-cmds/tests/one-codegen_006.test @@ -52,7 +52,7 @@ clean_envir() trap_err_onexit() { echo "${filename_ext} FAILED" - rm -rf ../bin/dummy-compile + clean_envir exit 255 } diff --git a/compiler/one-cmds/tests/one-codegen_010.test b/compiler/one-cmds/tests/one-codegen_010.test index a81310e2899..2f942eb4f8b 100644 --- a/compiler/one-cmds/tests/one-codegen_010.test +++ b/compiler/one-cmds/tests/one-codegen_010.test @@ -52,7 +52,7 @@ clean_envir() trap_err_onexit() { echo "${filename_ext} FAILED" - rm -rf ../bin/dummy-compile + clean_envir exit 255 } diff --git a/compiler/one-cmds/tests/one-codegen_011.test b/compiler/one-cmds/tests/one-codegen_011.test index 0b7f9174fdb..5d78d5bc562 100644 --- a/compiler/one-cmds/tests/one-codegen_011.test +++ b/compiler/one-cmds/tests/one-codegen_011.test @@ -53,7 +53,7 @@ clean_envir() trap_err_onexit() { echo "${filename_ext} FAILED" - rm -rf ../bin/dummy-compile + clean_envir exit 255 } diff --git a/compiler/one-cmds/tests/one-profile_006.test b/compiler/one-cmds/tests/one-profile_006.test index 3afb575a238..03a54d52e0e 100644 --- a/compiler/one-cmds/tests/one-profile_006.test +++ b/compiler/one-cmds/tests/one-profile_006.test @@ -52,7 +52,7 @@ clean_envir() trap_err_onexit() { echo "${filename_ext} FAILED" - rm -rf ../bin/dummy-profile + clean_envir exit 255 } diff --git a/compiler/one-cmds/tests/one-profile_010.test b/compiler/one-cmds/tests/one-profile_010.test index 681b9d6dc75..b0c4953bfd2 100644 --- a/compiler/one-cmds/tests/one-profile_010.test +++ b/compiler/one-cmds/tests/one-profile_010.test @@ -52,7 +52,7 @@ clean_envir() trap_err_onexit() { echo "${filename_ext} FAILED" - rm -rf ../bin/dummy-profile + clean_envir exit 255 } diff --git a/compiler/one-cmds/tests/one-profile_011.test b/compiler/one-cmds/tests/one-profile_011.test index db2e1c81196..4c156d76c2a 100644 --- a/compiler/one-cmds/tests/one-profile_011.test +++ b/compiler/one-cmds/tests/one-profile_011.test @@ -52,7 +52,7 @@ clean_envir() trap_err_onexit() { echo "${filename_ext} FAILED" - rm -rf ../bin/dummy-profile + clean_envir exit 255 } diff --git a/compiler/one-cmds/tests/onecc_057.test b/compiler/one-cmds/tests/onecc_057.test index f0076093b2e..83eea6fbf9a 100644 --- a/compiler/one-cmds/tests/onecc_057.test +++ b/compiler/one-cmds/tests/onecc_057.test @@ -19,11 +19,16 @@ filename_ext="$(basename -- $0)" filename="${filename_ext%.*}" -trap_err_onexit() +clean_envir() { - echo "${filename_ext} FAILED" rm -rf ../bin/dummyV2-profile rm -rf ../bin/dummyV3-profile +} + +trap_err_onexit() +{ + echo "${filename_ext} FAILED" + clean_envir exit 255 } @@ -45,7 +50,6 @@ if ! grep -q "dummyV3-profile with onecc_057_overwrite" "${filename}.log"; then trap_err_onexit fi -rm -rf ../bin/dummyV2-profile -rm -rf ../bin/dummyV3-profile +clean_envir echo "${filename_ext} SUCCESS" diff --git a/compiler/one-cmds/tests/onecc_neg_038.test b/compiler/one-cmds/tests/onecc_neg_038.test index 13c7d75f406..f629fe0c82d 100644 --- a/compiler/one-cmds/tests/onecc_neg_038.test +++ b/compiler/one-cmds/tests/onecc_neg_038.test @@ -69,6 +69,8 @@ clean_envir() trap_err_onexit() { + clean_envir + if grep -q "Only either of option type is allowed: positional or optional" "${filename}.log"; then echo "${filename_ext} SUCCESS" exit 0 @@ -108,5 +110,7 @@ cp onecc_neg_038.py "../backends/command/${BACKEND_NAME}/codegen.py" # run test onecc -C ${configfile} > ${filename}.log 2>&1 +clean_envir + echo "${filename_ext} FAILED" exit 255