Files
cs220/scripts/grade-01.sh
Jaehwang Jung 7913e6774e grader updates from CS431 (#11)
* If any of linters fail, don't run the tests.
* If build fails, echo the error message to stderr.
* Fix sanitizer options.
* Don't use colored output (it messes up gg log).
* $@ → "$@"
* $@ → $* in string
2022-09-25 15:27:38 +09:00

34 lines
513 B
Bash
Executable File

#!/usr/bin/env bash
set -e
set -uo pipefail
IFS=$'\n\t'
# Imports library.
BASEDIR=$(dirname "$0")
source $BASEDIR/grade-utils.sh
RUNNERS=(
"cargo"
"cargo --release"
"cargo_asan"
"cargo_asan --release"
"cargo_tsan"
"cargo_tsan --release"
)
# Lints.
run_linters || exit 1
# Executes test for each runner.
for RUNNER in "${RUNNERS[@]}"; do
echo "Running with $RUNNER..."
TESTS=("--lib assignment01_grade")
if [ $(run_tests) -ne 0 ]; then
exit 1
fi
done
exit 0