diff options
author | Christian Cunningham <cc@localhost> | 2022-02-22 12:33:10 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-02-22 12:33:10 -0700 |
commit | ef262d9a0b4b4d973e3c0fcabc9cdf4d57fc93ce (patch) | |
tree | e4ebb97e338087d36c753ab342a9480770645cdd | |
parent | 3b883c24da327036a049a0430bd00ebfdffd5c8f (diff) |
Automate Testing
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Common.mk | 4 | ||||
-rwxr-xr-x | tests/test1.sh | 10 |
3 files changed, 13 insertions, 3 deletions
@@ -2,6 +2,6 @@ build/ obj/ mk.old Makefile -serial.log +*.log *.swp *.hda @@ -16,8 +16,8 @@ GDB = gdb-multiarch CFLAGS = -mcpu=cortex-a7 -fpic -ffreestanding -std=gnu99 -O3 -Wall -Wextra -nostdlib -Iinclude -g AFLAGS = -mcpu=cortex-a7 -Iinclude -g QFLAGS = -M raspi2b -cpu cortex-a7 -m 1G -QFLAGS += -chardev stdio,id=char0,mux=on,logfile=serial.log,signal=off -serial chardev:char0 -mon chardev=char0 -#QFLAGS += -serial pipe:/tmp/guest +#QFLAGS += -chardev stdio,id=char0,mux=on,logfile=serial.log,signal=off -serial chardev:char0 -mon chardev=char0 +QFLAGS += -chardev pipe,id=char0,mux=on,logfile=serial.log,path=guest -serial chardev:char0 -mon chardev=char0 QFLAGS += -device usb-kbd ifneq ("$(wildcard ./sd.hda)","") QFLAGS += -drive file=sd.hda,if=sd,format=raw diff --git a/tests/test1.sh b/tests/test1.sh new file mode 100755 index 0000000..2641953 --- /dev/null +++ b/tests/test1.sh @@ -0,0 +1,10 @@ +#!/bin/bash +pushd ./ +rm -f test1.log +make run & +cat guest.out >> test1.log & +sleep 1 +printf "ab" >> guest.in +sleep 2 +printf "\001x" >> guest.in +popd |