From c1fa11ce1f300fc028f5420d6f5a4b70fe6303ac Mon Sep 17 00:00:00 2001 From: kevinnls <57634663+kevinnls@users.noreply.github.com> Date: Sat, 3 Apr 2021 18:43:51 +0530 Subject: [PATCH] test: pass script args to executable binary in function `test` --- dev/test | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/dev/test b/dev/test index c86ebf2..6029e5f 100755 --- a/dev/test +++ b/dev/test @@ -76,14 +76,11 @@ check_compilers(){ echo "found compiler: ${compiler}" compile(){ echo "=== compiling ===" - echo "${compiler_path}" "${compile_args[@]}" "${iname}" if [[ $? -eq 0 ]]; then - echo echo "=== compiled! ===" return 0 else - echo echo "=== compile failed! ===" return 1 fi @@ -99,7 +96,7 @@ check_compilers(){ test(){ echo "=== start of test ===" echo - "${oname}" + "${oname}" "$@" echo echo echo "=== end of test ===" @@ -112,8 +109,7 @@ if check_compilers; then fi fi else - exit_code=$? >>2 echo "some error occurred" - exit "${exit_code}" + exit 1 fi