12 lines
584 B
Bash
Executable File
12 lines
584 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
root="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
test_dir="$(mktemp -d)"
|
|
trap 'rm -rf "$test_dir"' EXIT
|
|
read -ra opencv_flags <<< "$(pkg-config --cflags --libs opencv4)"
|
|
"${CXX:-g++}" -std=c++17 -O1 -g -Wall -Wextra -Wpedantic -fsanitize=undefined -fno-sanitize-recover=all \
|
|
-I"$root/include" -I"$root/third_party" "$root/tests/session_test.cpp" \
|
|
"$root/src/inference_session.cpp" "$root/src/serialization.cpp" "$root/src/door_risk.cpp" \
|
|
"${opencv_flags[@]}" -o "$test_dir/session_test"
|
|
"$test_dir/session_test" "$test_dir"
|