diff options
| author | Matt Borgerson <contact@mborgerson.com> | 2019-12-17 21:42:03 -0700 |
|---|---|---|
| committer | Matt Borgerson <contact@mborgerson.com> | 2019-12-17 21:42:03 -0700 |
| commit | 9757ce312de4c425567c2fcc55991ab5828773cd (patch) | |
| tree | 8a2f08f3ead026da573aea361ba6802c496c6713 /tests | |
| parent | 2434499ed2f0bec9d0584dc936f41dcc32b66997 (diff) | |
| download | gdbstub-9757ce312de4c425567c2fcc55991ab5828773cd.tar.gz | |
Move smoketest to tests dir
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/smoketest.gdbinit | 15 | ||||
| -rwxr-xr-x | tests/smoketest.sh | 16 |
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/smoketest.gdbinit b/tests/smoketest.gdbinit new file mode 100644 index 0000000..8560b5a --- /dev/null +++ b/tests/smoketest.gdbinit @@ -0,0 +1,15 @@ +set pagination off +symbol-file gdbstub.elf +target remote 127.0.0.1:1234 +b simple_loop +c + +# Step twice and check value of `x` variable +s 2 +if x == 0xdeadbeef + printf "PASS\n" + quit 0 +else + printf "FAIL\n" + quit 1 +end diff --git a/tests/smoketest.sh b/tests/smoketest.sh new file mode 100755 index 0000000..0ae8ccd --- /dev/null +++ b/tests/smoketest.sh @@ -0,0 +1,16 @@ +#!/bin/bash +echo "Launching QEMU" +qemu-system-i386 \ + -serial tcp:127.0.0.1:1234,server \ + -display none \ + -kernel gdbstub.bin & +sleep 1 + +echo "Running GDB" +gdb --command tests/smoketest.gdbinit +RESULT=$? + +echo "Terminating QEMU" +killall qemu-system-i386 + +exit $RESULT |
