Merge pull request #65 from kernigh/kernigh-qemu

unbreak qemuppc
This commit is contained in:
David Given 2017-11-11 21:00:16 +01:00 committed by GitHub
commit 384e9b3f5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 12 deletions

View file

@ -31,7 +31,12 @@ if [ "$failed" != "" ]; then
for t in $failed; do
echo $t
done
exit 1
fi
if [ "$timedout" != "" ]; then
echo "Timed-out test logs:"
for t in $timedout; do
echo $t
done
fi
if [ "$failed" != "" -o "$timedout" != "" ]; then
echo "Test status: SAD FACE (tests are failing)"

View file

@ -58,7 +58,7 @@ definerule("plat_testsuite",
"util/build+testrunner"
},
commands = {
"(%{ins[2]} "..e.method.." %{ins[1]} 5 %{ins[3]} || echo @@FAIL) > %{outs}",
"%{ins[2]} "..e.method.." %{ins[1]} 15 %{ins[3]} > %{outs}; true",
}
}
end

View file

@ -4,11 +4,6 @@ img=$2
timeout=$3
timeoutprog=$4
set -e
result=/tmp/$$.testdriver.result
trap "rm -f $result" EXIT
errcho() {
>&2 echo "$*"
}
@ -27,7 +22,7 @@ get_test_output() {
qemu-system-ppc) img="-kernel $img" ;;
esac
$timeoutprog -t $timeout -- $method -nographic $img > $result 2>&1
$timeoutprog -t $timeout -- $method -nographic $img 2>&1
;;
qemu-*)
@ -37,7 +32,7 @@ get_test_output() {
exit 0
fi
$method $img > $result 2>&1
$method $img 2>&1
;;
*)
@ -47,6 +42,16 @@ get_test_output() {
esac
}
get_test_output
( grep -q '@@FAIL\|@@SKIPPED' $result || ! grep -q @@FINISHED $result ) && cat $result && exit 1
exit 0
# Hide output if the test passed.
# Show output if it failed, skipped, or timed out.
get_test_output | awk '
{ lines[count++] = $0 }
/@@FAIL|@@SKIPPED|@@TIMEDOUT/ { bad = 1 }
/@@FINISHED/ { finished = 1 }
END {
if (finished && !bad) exit 0
for (i = 0; i < count; i++) print lines[i]
if (!bad) print "@@FAIL by testdriver.sh"
exit 1
}
'

View file

@ -1280,6 +1280,7 @@ static void emitinsndata(Rule rules)
if (!find_child_index(r->pattern, label, &index, &node))
label_not_found(r, label);
nt = node->op;
if (nt->kind == NONTERM)
{
if (nt->is_fragment)