From d908f9cfb2e02fee4bcd9ef68d1fcef20aa38569 Mon Sep 17 00:00:00 2001 From: David Given Date: Sun, 3 Jun 2018 15:13:43 +0200 Subject: [PATCH] Modify the pc86 test harness to use 8086tiny instead of qemu. Sadly, some tests fail. --- tests/plat/build.lua | 11 +++++++++-- tests/plat/testdriver.sh | 5 +++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/plat/build.lua b/tests/plat/build.lua index 26676b0b1..813a298ba 100644 --- a/tests/plat/build.lua +++ b/tests/plat/build.lua @@ -51,16 +51,23 @@ definerule("plat_testsuite", } } + local methoddep = nil + local methodpath = e.method + if e.method:find("%+") then + methoddep = e.method + methodpath = "%{ins[4]}" + end tests[#tests+1] = normalrule { name = fs, outleaves = { e.plat.."-"..fs.."-testlog.txt" }, ins = { bin, "tests/plat/testdriver.sh", - "util/build+testrunner" + "util/build+testrunner", + methoddep, }, commands = { - "%{ins[2]} "..e.method.." %{ins[1]} 15 %{ins[3]} > %{outs}; true", + "%{ins[2]} "..methodpath.." %{ins[1]} 15 %{ins[3]} > %{outs}; true", } } end diff --git a/tests/plat/testdriver.sh b/tests/plat/testdriver.sh index 07f206a5e..1a4568db7 100755 --- a/tests/plat/testdriver.sh +++ b/tests/plat/testdriver.sh @@ -4,6 +4,8 @@ img=$2 timeout=$3 timeoutprog=$4 +set -e + errcho() { >&2 echo "$*" } @@ -36,8 +38,7 @@ get_test_output() { ;; *) - errcho "Error: $method not known by testdriver" - exit 1 + $timeoutprog -t $timeout -- $method $img 2>&1 ;; esac }