forked from NUDT-compiler/nudt-compiler-cpp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
568 B
20 lines
568 B
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
# Reconfigure with IR pipeline enabled, build, then run Lab2 test script.
|
|
RESULT_FILE="test/test_result/run_lab2_result.log"
|
|
mkdir -p "$(dirname \"$RESULT_FILE\")"
|
|
: > "$RESULT_FILE"
|
|
|
|
{
|
|
echo "[run_lab2] start: $(date '+%Y-%m-%d %H:%M:%S')"
|
|
echo "[run_lab2] logging to: $RESULT_FILE"
|
|
|
|
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCOMPILER_PARSE_ONLY=OFF
|
|
cmake --build build -j "$(nproc)"
|
|
CASE_DIR=test/test_case bash scripts/test_lab2.sh
|
|
|
|
echo "[run_lab2] end: $(date '+%Y-%m-%d %H:%M:%S')"
|
|
} 2>&1 | tee "$RESULT_FILE"
|