Skip to content

Commit

Permalink
[TEST] Modified scripts/test.sh to take ./runtime test tc_150_1 as ar…
Browse files Browse the repository at this point in the history
…gument

- Previously, you had to write ./runtime test integration/tc_150_1
- Also deleted provisioning and installation scripts for Runtime
- Updated help text on root runtime script
  • Loading branch information
benliao1 committed Jul 21, 2023
1 parent 11db2bb commit c82d403
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 105 deletions.
8 changes: 3 additions & 5 deletions runtime
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ case $1 in
format)
shift 1
scripts/format.sh $@
# scripts/run_clang_format.py $@
;;

flash)
Expand All @@ -66,7 +65,6 @@ case $1 in
printf "commands:\n"

printf "\tbuild\t\tRuns 'make' on files needed to run Runtime.\n"
printf "\t\t\tOptional: pass in 'make' arguments. (Ex: runtime make shm_wrapper)\n"

printf "\tclean\t\tRuns 'make clean' for Runtime and removes Runtime files in '/tmp/'\n"

Expand All @@ -75,11 +73,11 @@ case $1 in
printf "\tstop\t\tStops Runtime.\n"

printf "\ttest\t\tRuns all Runtime tests.\n"
printf "\t\t\tOptional: Pass in a specific test case. (Ex: runtime test integration/tc_71_14)\n"
printf "\t\t\tOptional: Pass in a specific test case. (Ex: runtime test tc_71_2)\n"

printf "\tformat\t\tUses Clang to format the repo.\n"
printf "\t\t\tUse 'runtime format -ir .' to format the repo and save the changes.\n"
printf "\t\t\tRun without args to see full list of options.\n"
printf "\t\t\tUse 'runtime format fix' to format the repo and save the changes.\n"
printf "\t\tUse 'runtime format check' to check if the code in the repo conforms to format standards.\n"

printf "\tflash\t\tFlashes a plugged in Arduino with Lowcar code.\n"
printf "\t\t\tEx: 'runtime flash DummyDevice'\n"
Expand Down
58 changes: 0 additions & 58 deletions scripts/install_raspi.sh

This file was deleted.

39 changes: 0 additions & 39 deletions scripts/provision_raspi.sh

This file was deleted.

13 changes: 10 additions & 3 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function clean_up {
function sigint_handler {
# if logger/logger.config.orig exists, we need to restore it
if [[ -f ../logger/logger.config.orig ]]; then
clean_up
clean_up
fi
exit 1
}
Expand Down Expand Up @@ -38,12 +38,19 @@ function run_tests {
if [[ $? != 0 ]]; then
failing_tests="$failing_tests $test" # add this test to list of failing tests
failed=1
continue
continue
fi

# run test
printf "Running $test...\n"
./bin/$test

if [[ -f bin/integration/$test ]]; then
./bin/integration/$test
elif [[ -f bin/performance/$test ]]; then
./bin/performance/$test
else
./bin/$test
fi

# if that test failed, set failed to 1
if [[ $? != 0 ]]; then
Expand Down

0 comments on commit c82d403

Please sign in to comment.