-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.sh
executable file
·30 lines (22 loc) · 926 Bytes
/
test.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
#!/bin/bash
# Check if a file path is provided as an argument
if [ $# -eq 0 ]; then
echo "Please provide the path to a test file as an argument."
exit 1
fi
CXXFLAGS="-Wl,-stack_size,0x10000000 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -fvisibility-inlines-hidden -fmessage-length=0"
# Get the test file path from the argument
test_file="$1"
# Ensure the file exists
if [ ! -f "$test_file" ]; then
echo "The file $test_file does not exist."
exit 1
fi
# Ensure the cache directory exists
mkdir -p .verify-helper/cache
# Extract just the filename without the path
filename=$(basename "$test_file")
# Run oj-bundle and redirect output to cache
oj-bundle "$test_file" > ".verify-helper/cache/$test_file"
# Run oj-verify on the cached file
oj-verify run ".verify-helper/cache/$test_file"