forked from runtimeverification/iele-semantics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvmtest
executable file
·19 lines (19 loc) · 807 Bytes
/
vmtest
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
interpreter="$(dirname "$0")/.build/standalone/iele-testing-kompiled/interpreter"
assembled="$(mktemp)"
kast="$(mktemp)"
output="$(mktemp)"
kast_output="$(mktemp)"
trap "rm -rf $kast $output $kast_output $assembled" INT TERM EXIT
"$(dirname "$0")/assemble-iele-test" "$1" > "$assembled"
"$(dirname "$0")/kast-json.py" "$assembled" > "$kast"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
$interpreter "$(dirname "$0")/.build/standalone/iele-testing-kompiled/realdef.cma" -c PGM "$kast" textfile -c SCHEDULE '`DEFAULT_IELE-GAS`(.KList)' text -c MODE '`VMTESTS_IELE-CONSTANTS`(.KList)' text --output-file "$output"
exit=$?
if [ $exit -eq 0 ]; then
exit 0
fi
tests/ci/rv-k/k-distribution/target/release/k/bin/k-bin-to-text "$output" "$kast_output"
cat "$kast_output"
printf "\n"
exit $exit