Signed-off-by: Graham MacDonald <grahamamacdonald@gmail.com>
@@ -0,0 +1,16 @@
+#!/bin/rc
+
+# Script to run all tests in 'tests'. If any test fails, this script fails.
+tests=/bin/regress/^(fpuexcept fpunote)
+echo 1..$#tests
+finalstatus=PASS
+for (test in $tests) {
+ output=PASS
+ $test >[2=1] >/dev/null || {output='FAIL - '^$status; finalstatus=FAIL}
+ echo $output
+}
+if (~ $finalstatus FAIL) exit $finalstatus
@@ -6,13 +6,13 @@
void
pass(void) {
print("PASS\n");
- exits("PASS");
+ exits(nil);
}
fail(const char *msg) {
print("FAIL - %s\n", msg);
- exits("FAIL");
+ exits(msg);
static float f = 10.0;
@@ -34,4 +34,3 @@ main(void)
f = f / 0.0f;
fail("divide by zero exception not raised");
-
static float correctnote = 0.0f;