From a1b0a66e186af524a76747fc990df07b6d325f38 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sat, 4 Sep 2021 13:33:19 -0700 Subject: [PATCH] test: Add the ability to have architecture-specific tests --- runtests | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/runtests b/runtests index 3c05631..a71ed37 100755 --- a/runtests +++ b/runtests @@ -12,12 +12,16 @@ trap 'rm "$got"' EXIT for test ; do name=${test%.c} + case $name in + *+*) arch=${name##*+} ;; + *) arch=x86_64 ;; + esac if [ -f "$name.qbe" ] ; then want=$name.qbe - set -- $CCQBE -o "$got" "$test" + set -- $CCQBE -t $arch -o "$got" "$test" elif [ -f "$name.pp" ] ; then want=$name.pp - set -- $CCQBE -E -o "$got" "$test" + set -- $CCQBE -t $arch -E -o "$got" "$test" else echo "invalid test '$test'" >&2 set -- false -- 2.45.2