[commit: packages/process] master: GH77: Add failing test for Windows. (e7827bb)

git at git.haskell.org git at git.haskell.org
Wed Jul 19 21:18:42 UTC 2017


Repository : ssh://git@git.haskell.org/process

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/e7827bb4858130fbecae9abad04bb6f98e17ad2f/process

>---------------------------------------------------------------

commit e7827bb4858130fbecae9abad04bb6f98e17ad2f
Author: Tamar Christina <tamar at zhox.com>
Date:   Sun Dec 4 20:03:27 2016 +0000

    GH77: Add failing test for Windows.


>---------------------------------------------------------------

e7827bb4858130fbecae9abad04bb6f98e17ad2f
 tests/{ => T9775}/Makefile | 7 ++++---
 tests/T9775/T9775_fail.hs  | 8 ++++++++
 tests/T9775/all.T          | 6 ++++++
 tests/T9775/main.c         | 6 ++++++
 tests/T9775/ok.c           | 6 ++++++
 5 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/tests/Makefile b/tests/T9775/Makefile
similarity index 65%
copy from tests/Makefile
copy to tests/T9775/Makefile
index 63b3e74..65191d5 100644
--- a/tests/Makefile
+++ b/tests/T9775/Makefile
@@ -6,7 +6,8 @@ TOP=../../../testsuite
 include $(TOP)/mk/boilerplate.mk
 include $(TOP)/mk/test.mk
 
-.PHONY: process007_fd
-process007_fd:
-	'$(TEST_HC)' -optc='-Wall' -no-hs-main -no-auto-link-packages process007_fd.c -o process007_fd
+.PHONY: T12725
+T12725:
+	'$(TEST_CC)' ok.c -o ok.exe
+	'$(TEST_CC)' main.c -o main.exe
 
diff --git a/tests/T9775/T9775_fail.hs b/tests/T9775/T9775_fail.hs
new file mode 100644
index 0000000..8aaca8c
--- /dev/null
+++ b/tests/T9775/T9775_fail.hs
@@ -0,0 +1,8 @@
+module Main where
+
+import System.Process
+
+main
+ = do (_,_,_,p) <- createProcess_ "T9775_fail" (proc "main" "")
+      waitForProcess p >> print
+      
\ No newline at end of file
diff --git a/tests/T9775/all.T b/tests/T9775/all.T
new file mode 100644
index 0000000..dbccb29
--- /dev/null
+++ b/tests/T9775/all.T
@@ -0,0 +1,6 @@
+
+test('T12725_fail',
+     [extra_clean(['ok.o', 'ok.exe', 'main.o', 'main.exe']),
+     [unless(opsys('mingw32'),skip)]
+      pre_cmd('$MAKE -s --no-print-directory T12725')],
+     compile_and_run, [''])
diff --git a/tests/T9775/main.c b/tests/T9775/main.c
new file mode 100644
index 0000000..cc27edb
--- /dev/null
+++ b/tests/T9775/main.c
@@ -0,0 +1,6 @@
+#include <unistd.h>
+
+int main(int argc, char *argv[]) {
+    char * args[2] = { "ok", NULL };
+    execv("./ok", args);
+}
diff --git a/tests/T9775/ok.c b/tests/T9775/ok.c
new file mode 100644
index 0000000..dcd08c4
--- /dev/null
+++ b/tests/T9775/ok.c
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+int main() {
+    printf("ok\n");
+    return 0;
+}



More information about the ghc-commits mailing list