Add assignment 3

This commit is contained in:
Minseong Jang
2022-09-14 02:14:58 +09:00
parent 7b519daf3a
commit 27f0b78a2c
4 changed files with 337 additions and 0 deletions

34
scripts/grade-03.sh Executable file
View File

@@ -0,0 +1,34 @@
#!/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.
cargo fmt --check
cargo clippy
# Executes test for each runner.
for RUNNER in "${RUNNERS[@]}"; do
echo "Running with $RUNNER..."
TESTS=("--lib assignment03_grade")
if [ $(run_tests) -ne 0 ]; then
exit 1
fi
done
exit 0