-
Notifications
You must be signed in to change notification settings - Fork 8
/
vopr.sh
executable file
·33 lines (29 loc) · 906 Bytes
/
vopr.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash
set -e
# Install Zig if it does not already exist:
if [ ! -d "zig" ]; then
scripts/install_zig.sh
echo ""
echo "Running the TigerBeetle VOPR for the first time..."
echo "Visit https://www.tigerbeetle.com"
sleep 2
fi
# If a seed is provided as an argument then replay the seed, otherwise test a 1,000 seeds:
if [ "$1" ]; then
# Build in fast ReleaseSafe mode if required, useful where you don't need debug logging:
if [ "$2" == "-OReleaseSafe" ]; then
echo "Replaying seed $1 in ReleaseSafe mode..."
BUILD_MODE="-OReleaseSafe"
else
echo "Replaying seed $1 in Debug mode with full debug logging enabled..."
BUILD_MODE="-ODebug"
fi
echo ""
zig/zig run src/simulator.zig $BUILD_MODE -- $1
else
zig/zig build-exe src/simulator.zig -OReleaseSafe
for I in {1..1000}
do
./simulator
done
fi