This repository was archived by the owner on Apr 16, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathexec_it.sh
More file actions
executable file
·81 lines (72 loc) · 2.24 KB
/
Copy pathexec_it.sh
File metadata and controls
executable file
·81 lines (72 loc) · 2.24 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/bash
#
# exec_it.sh - Execute a fixture through agave or firedancer target
#
# Usage: ./exec_it.sh <fixture_path> [a|f]
#
# Arguments:
# fixture_path Path to the context/fixture file
# a Use Agave target (SOL_TARGET or SOLFUZZ_TARGET)
# f Use Firedancer target (FD_TARGET or FIREDANCER_TARGET) [default]
#
# Examples:
# ./exec_it.sh fixture.fix a # Execute through Agave
# ./exec_it.sh fixture.fix f # Execute through Firedancer
# ./exec_it.sh fixture.fix # Execute through Firedancer (default)
#
set -e
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
# Activate virtual environment if not already active
if [[ "$VIRTUAL_ENV" != *"test_suite_env"* ]]; then
if [ -f "$SCRIPT_DIR/test_suite_env/bin/activate" ]; then
source "$SCRIPT_DIR/test_suite_env/bin/activate"
else
echo "Error: Virtual environment not found."
echo "Run: source install.sh"
exit 1
fi
fi
# Check arguments
if [ -z "$1" ]; then
echo "Usage: $0 <fixture_path> [a|f]"
echo ""
echo "Arguments:"
echo " fixture_path Path to the context/fixture file"
echo " a Use Agave target"
echo " f Use Firedancer target [default]"
echo ""
echo "Environment variables:"
echo " SOL_TARGET or SOLFUZZ_TARGET - Path to Agave .so"
echo " FD_TARGET or FIREDANCER_TARGET - Path to Firedancer .so"
exit 1
fi
FIXTURE_PATH="$1"
# Select target
if [ "$2" = "a" ]; then
echo "EXECUTING THROUGH AGAVE..."
TARGET="${SOL_TARGET:-$SOLFUZZ_TARGET}"
if [ -z "$TARGET" ]; then
echo "Error: Agave target not set."
echo "Set SOL_TARGET or SOLFUZZ_TARGET environment variable."
exit 1
fi
else
echo "EXECUTING THROUGH FIREDANCER..."
TARGET="${FD_TARGET:-$FIREDANCER_TARGET}"
if [ -z "$TARGET" ]; then
echo "Error: Firedancer target not set."
echo "Set FD_TARGET or FIREDANCER_TARGET environment variable."
exit 1
fi
fi
# Check target exists
if [ ! -f "$TARGET" ]; then
echo "Error: Target not found: $TARGET"
exit 1
fi
# Check fixture exists
if [ ! -f "$FIXTURE_PATH" ]; then
echo "Error: Fixture not found: $FIXTURE_PATH"
exit 1
fi
solana-conformance exec-instr -t "$TARGET" -i "$FIXTURE_PATH"