aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-02-22 12:33:10 -0700
committerChristian Cunningham <cc@localhost>2022-02-22 12:33:10 -0700
commitef262d9a0b4b4d973e3c0fcabc9cdf4d57fc93ce (patch)
treee4ebb97e338087d36c753ab342a9480770645cdd
parent3b883c24da327036a049a0430bd00ebfdffd5c8f (diff)
Automate Testing
-rw-r--r--.gitignore2
-rw-r--r--Common.mk4
-rwxr-xr-xtests/test1.sh10
3 files changed, 13 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 395c0bf..473da30 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,6 @@ build/
obj/
mk.old
Makefile
-serial.log
+*.log
*.swp
*.hda
diff --git a/Common.mk b/Common.mk
index dba0faa..8ef25af 100644
--- a/Common.mk
+++ b/Common.mk
@@ -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