aboutsummaryrefslogtreecommitdiff
path: root/tools/regression/pipe
diff options
context:
space:
mode:
authorNik Clayton <nik@FreeBSD.org>2004-11-11 19:47:55 +0000
committerNik Clayton <nik@FreeBSD.org>2004-11-11 19:47:55 +0000
commit00e13b1d679d242d6db62cab43303efe327afdbc (patch)
treecfebca4a0526247931bc6bdde73f15f72f3e92d0 /tools/regression/pipe
parent350bc1206a6c217c385989d7585a3c4d56851496 (diff)
downloadsrc-00e13b1d679d242d6db62cab43303efe327afdbc.tar.gz
src-00e13b1d679d242d6db62cab43303efe327afdbc.zip
Switch over to a different, more flexible test output protocol that's
understood by Perl's Test::Harness module and prove(1) commands. Update README to describe the new protocol. The work's broken down into two main sets of changes. First, update the existing test programs (shell scripts and C programs) to produce output in the ok/not ok format, and to, where possible, also produce a header describing the number of tests that are expected to be run. Second, provide the .t files that actually run the tests. In some cases these are copies of, or very similar too, scripts that already existed. I've kept the old scripts around so that it's possible to verify that behaviour under this new system (in terms of whether or not a test fails) is identical to the behaviour under the old system. Add a TODO file.
Notes
Notes: svn path=/head/; revision=137587
Diffstat (limited to 'tools/regression/pipe')
-rw-r--r--tools/regression/pipe/bigpipetest.c3
-rw-r--r--tools/regression/pipe/bigpipetest.t10
2 files changed, 13 insertions, 0 deletions
diff --git a/tools/regression/pipe/bigpipetest.c b/tools/regression/pipe/bigpipetest.c
index d5185c5bf71b..c5983fa5559e 100644
--- a/tools/regression/pipe/bigpipetest.c
+++ b/tools/regression/pipe/bigpipetest.c
@@ -48,6 +48,8 @@ int main()
char buf[BIG_PIPE_SIZE]; /* any value over PIPE_SIZE should do */
int i, flags, fd[2];
+ printf("1..1\n");
+
if (pipe(fd) < 0) { perror("pipe"); exit(1); }
flags = fcntl(fd[1], F_GETFL);
@@ -75,5 +77,6 @@ int main()
close(fd[0]);
memset(buf, 0, sizeof buf);
for (i = 0; i < 1000; i++) write_frame(fd[1], buf, sizeof buf);
+ printf("ok 1\n");
exit(0);
}
diff --git a/tools/regression/pipe/bigpipetest.t b/tools/regression/pipe/bigpipetest.t
new file mode 100644
index 000000000000..8bdfd03be81b
--- /dev/null
+++ b/tools/regression/pipe/bigpipetest.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable