on master help sign in
Add support for running tests on OpenBSD, fixes #3964
commitfdc0e3cdacd6895d61df804091916e3633c5d5a1 authorScott Bonds <scott@ggr.com> dateFri 4 Aug 2017, 08:14 (9 years ago) parentf9194a6
3 files changed+9−1
test/TestRun.hs+1−1 test/base001/exit1.c+4 test/base001/sys.c+4
test/TestRun.hs+1−1
@@ -65,7 +65,7 @@ test testName path = goldenVsFileDiff testName diff ref output
6565 where
6666 ref = path </> "expected"
6767 output = path </> "output"
68− diff ref new = ["diff", "--strip-trailing-cr", "-u", new, ref]
68+ diff ref new = ["diff", "-u", new, ref]
6969
7070-- Should always output a 3-charater string from a postive Int
7171indexToString :: Int -> String
test/base001/exit1.c+4
@@ -1,6 +1,10 @@
11#include <stdio.h>
22#include <stdlib.h>
33
4+#ifdef __OpenBSD__
5+#include <sys/wait.h>
6+#endif
7+
48void doSystem(const char cmd[]) {
59 printf("exit1: Executing cmd '%s'\n", cmd);
610 int exitStatus = system(cmd);
test/base001/sys.c+4
@@ -2,6 +2,10 @@
22
33#include <stdlib.h>
44
5+#ifdef __OpenBSD__
6+#include <sys/wait.h>
7+#endif
8+
59int WIFEXITED_(int status) {
610 return WIFEXITED(status);
711}