compiler/
kernel/
lib/
scripts/
seed/
sublime/
test/
acceptance/
compile
549 B
metrics
5.4 KiB
replay
840 B
run
693 B
sizes
3.6 KiB
boot/
bootstrap/
cycles/
dispatch/
loader/
mmio/
native/
packages/
pages/
runtime/
scheduling/
shared/
slots/
smp/
support/
sync/
termination/
tests/
trap/
package-golden
1.6 KiB
run
3.1 KiB
runner.rad
10.5 KiB
vim/
.gitignore
336 B
.gitsigners
112 B
CONTRIBUTING
2.1 KiB
LICENSE
1.1 KiB
Makefile
9.2 KiB
README
2.5 KiB
STYLE
2.5 KiB
std.lib
1.5 KiB
std.lib.test
662 B
test/acceptance/replay
raw
| 1 | #!/bin/sh |
| 2 | # Compare complete output from two executions of the same native image. |
| 3 | set -eu |
| 4 | if [ "$#" -lt 4 ]; then |
| 5 | printf 'usage: replay profile emulator image harts [machine-options...]\n' >&2 |
| 6 | exit 1 |
| 7 | fi |
| 8 | profile=$1 |
| 9 | emulator=$2 |
| 10 | image=$3 |
| 11 | harts=$4 |
| 12 | shift 4 |
| 13 | mkdir -p bin/acceptance/traces |
| 14 | prefix="bin/acceptance/traces/$profile-$harts" |
| 15 | for attempt in 1 2; do |
| 16 | if ! "$emulator" -machine -harts="$harts" -memory-size=262144 -max-steps=2000000000 "$@" -run "$image" > "$prefix.$attempt.log" 2>&1; then |
| 17 | cat "$prefix.$attempt.log" |
| 18 | exit 1 |
| 19 | fi |
| 20 | done |
| 21 | if ! cmp -s "$prefix.1.log" "$prefix.2.log"; then |
| 22 | diff -u "$prefix.1.log" "$prefix.2.log" || true |
| 23 | printf 'replay: %s %s-hart output differs\n' "$profile" "$harts" >&2 |
| 24 | exit 1 |
| 25 | fi |
| 26 | cat "$prefix.1.log" |
| 27 | printf 'replay: %s %s-hart output matched\n' "$profile" "$harts" |