summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2007-10-04 23:21:58 +0000
committerRuss Allbery <rra@stanford.edu>2007-10-04 23:21:58 +0000
commitf09ec713c68c4c9b0c6dd89090fc9ce4e9d93042 (patch)
treed1289b0bb8e4f0018ec4c254622e4b0584195bc9 /tests
parent9ff667addf39128f43d08d4ec56a6a94ec3bb062 (diff)
Update runtests to the latest version. Fix various other missing or
incorrect makefile and configure rules and some include issues so that the portability layer compiles and passes its test suite.
Diffstat (limited to 'tests')
-rw-r--r--tests/runtests.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/runtests.c b/tests/runtests.c
index f9da690..d15d19c 100644
--- a/tests/runtests.c
+++ b/tests/runtests.c
@@ -59,6 +59,11 @@
/* sys/time.h must be included before sys/resource.h on some platforms. */
#include <sys/resource.h>
+/* AIX doesn't have WCOREDUMP. */
+#ifndef WCOREDUMP
+# define WCOREDUMP(status) ((unsigned)(status) & 0x80)
+#endif
+
/* Test status codes. */
enum test_status {
TEST_FAIL,
@@ -113,13 +118,13 @@ Failed Set Fail/Total (%) Skip Stat Failing Tests\n\
static void sysdie(const char *format, ...);
static void *x_malloc(size_t, const char *file, int line);
static char *x_strdup(const char *, const char *file, int line);
-static int test_analyze(const struct testset *);
+static int test_analyze(struct testset *);
static int test_batch(const char *testlist);
static void test_checkline(const char *line, struct testset *);
static void test_fail_summary(const struct testlist *);
static int test_init(const char *line, struct testset *);
static int test_print_range(int first, int last, int chars, int limit);
-static void test_summarize(const struct testset *, int status);
+static void test_summarize(struct testset *, int status);
static pid_t test_start(const char *path, int *fd);
static double tv_diff(const struct timeval *, const struct timeval *);
static double tv_seconds(const struct timeval *);
@@ -404,7 +409,7 @@ test_print_range(int first, int last, int chars, int limit)
with a non-zero status, and a negative integer representing the signal
that terminated it if it was killed by a signal. */
static void
-test_summarize(const struct testset *ts, int status)
+test_summarize(struct testset *ts, int status)
{
int i;
int missing = 0;
@@ -478,7 +483,7 @@ test_summarize(const struct testset *ts, int status)
few special error messages, and then pass it along to test_summarize()
for the regular output. */
static int
-test_analyze(const struct testset *ts)
+test_analyze(struct testset *ts)
{
if (ts->reported)
return 0;
@@ -578,7 +583,7 @@ test_run(struct testset *ts)
static void
test_fail_summary(const struct testlist *fails)
{
- const struct testset *ts;
+ struct testset *ts;
int i, chars, total, first, last;
puts(header);