diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2019-01-18 19:20:14 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2019-01-20 01:31:59 +0000 |
commit | b65d1e9b0b6fbf0705aeeb5ed8028348966d4c99 (patch) | |
tree | 055fbd8836f52553ecb42e69f7dee8199fb883e8 | |
parent | 60952530017bdc7cc7e49cdc7394f991ac95ce5e (diff) | |
download | klibc-maint-b65d1e9b0b6fbf0705aeeb5ed8028348966d4c99.tar.gz |
test-many-klibcs: Run i386 and x86_64 programs natively, not using qemu
-rwxr-xr-x | test-many-klibcs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/test-many-klibcs b/test-many-klibcs index 0c22452..b194784 100755 --- a/test-many-klibcs +++ b/test-many-klibcs @@ -17,12 +17,24 @@ clean() { make -C ../klibc clean "ARCH=$arch" } +run_built() { + # XXX We assume build architecture is x86_64 + case "$arch" in + i386 | x86_64) + "$@" + ;; + *) + "qemu-$qemuarch-static" -- "$@" + ;; + esac +} + run_test_program() { local progname="$1" shift local logname="test-$gnuarch-$progname.log" - if "qemu-$qemuarch-static" ../klibc/usr/klibc/tests/"$progname" \ + if run_built ../klibc/usr/klibc/tests/"$progname" \ > "$logname"; then if grep -qw ERROR "$logname"; then echo "E: $progname: Error found in output" @@ -45,7 +57,7 @@ run_test_program() { run_shell() { local command="$1" - if "qemu-$qemuarch-static" ../klibc/usr/dash/sh -c "$command"; then + if run_built ../klibc/usr/dash/sh -c "$command"; then echo "I: shell '$command': pass" else echo "E: shell '$command': fail" |