Skip to content

Commit

Permalink
[one-cmds] Add missing clean envir in tests (Samsung#14015)
Browse files Browse the repository at this point in the history
This commit adds missing clean envir in test.

ONE-DCO-1.0-Signed-off-by: seongwoo <[email protected]>
  • Loading branch information
mhs4670go authored Sep 13, 2024
1 parent 2a53b2b commit 7233b7c
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion compiler/one-cmds/tests/one-codegen_006.test
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ clean_envir()
trap_err_onexit()
{
echo "${filename_ext} FAILED"
rm -rf ../bin/dummy-compile
clean_envir
exit 255
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/one-cmds/tests/one-codegen_010.test
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ clean_envir()
trap_err_onexit()
{
echo "${filename_ext} FAILED"
rm -rf ../bin/dummy-compile
clean_envir
exit 255
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/one-cmds/tests/one-codegen_011.test
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ clean_envir()
trap_err_onexit()
{
echo "${filename_ext} FAILED"
rm -rf ../bin/dummy-compile
clean_envir
exit 255
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/one-cmds/tests/one-profile_006.test
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ clean_envir()
trap_err_onexit()
{
echo "${filename_ext} FAILED"
rm -rf ../bin/dummy-profile
clean_envir
exit 255
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/one-cmds/tests/one-profile_010.test
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ clean_envir()
trap_err_onexit()
{
echo "${filename_ext} FAILED"
rm -rf ../bin/dummy-profile
clean_envir
exit 255
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/one-cmds/tests/one-profile_011.test
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ clean_envir()
trap_err_onexit()
{
echo "${filename_ext} FAILED"
rm -rf ../bin/dummy-profile
clean_envir
exit 255
}

Expand Down
12 changes: 8 additions & 4 deletions compiler/one-cmds/tests/onecc_057.test
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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"
4 changes: 4 additions & 0 deletions compiler/one-cmds/tests/onecc_neg_038.test
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 7233b7c

Please sign in to comment.