Files
tai/taicpp/tests/mplex_copy_run.sh
T

20 lines
825 B
Bash
Executable File

#!/bin/sh
# Build and run the MplexCopyMode differential test against ALL real sources. Writes only under taicpp/build/f4.
# usage: tests/mplex_copy_run.sh [fuzz_count] [seed] (SAN=1 builds with ASan and UBSan; F4_TMUX_LIVE=N live tmux cases)
set -e
here=$(cd "$(dirname "$0")" && pwd)
tc=$(cd "$here/.." && pwd)
repo=$(cd "$tc/.." && pwd)
out="$tc/build/f4"
mkdir -p "$out"
flags="-O2"
bin="$out/mplex_copy_test"
if [ -n "$SAN" ]; then
flags="-g -O1 -fsanitize=address,undefined"
bin="$out/mplex_copy_test_san"
fi
g++ -std=c++23 -Wall -Wextra $flags -I"$tc/src/mplex" -I"$tc/src/plexer" "$tc/tests/mplex_copy_test.cpp" \
"$tc"/src/mplex/*.cpp "$tc"/src/plexer/plexer_flow.cpp -o "$bin"
python3 -I "$tc/tests/mplex_copy_gen.py" "$repo" "$out/scenarios.txt" "${1:-3600}" "${2:-20251025}"
"$bin" "$out/scenarios.txt"