diff options
author | Xavier Clerc <xavier.clerc@inria.fr> | 2010-01-28 15:43:45 +0000 |
---|---|---|
committer | Xavier Clerc <xavier.clerc@inria.fr> | 2010-01-28 15:43:45 +0000 |
commit | 2c54e3a4fac7c846eb6a8f916903189e57546716 (patch) | |
tree | 9e3fb182d523c5717b1c8dbdf00b82228443c86e | |
parent | 45b70408a74289a102efc06d02da78362c705331 (diff) | |
download | ocaml-2c54e3a4fac7c846eb6a8f916903189e57546716.tar.gz |
Tests moved to 'lib-systhreads'
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9595 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | otherlibs/systhreads/Tests/Makefile | 47 | ||||
-rw-r--r-- | otherlibs/systhreads/Tests/Makefile.nt | 43 | ||||
-rw-r--r-- | testsuite/tests/lib-systhreads/Makefile | 5 | ||||
-rw-r--r-- | testsuite/tests/lib-systhreads/testfork.ml (renamed from otherlibs/systhreads/Tests/testfork.ml) | 8 | ||||
-rw-r--r-- | testsuite/tests/lib-systhreads/testfork.reference | 6 |
5 files changed, 17 insertions, 92 deletions
diff --git a/otherlibs/systhreads/Tests/Makefile b/otherlibs/systhreads/Tests/Makefile deleted file mode 100644 index ac8b5f7767..0000000000 --- a/otherlibs/systhreads/Tests/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -######################################################################### -# # -# Objective Caml # -# # -# Xavier Leroy, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999 Institut National de Recherche en Informatique et # -# en Automatique. All rights reserved. This file is distributed # -# under the terms of the GNU Library General Public License, with # -# the special exception on linking described in file ../../../LICENSE.# -# # -######################################################################### - -# $Id$ - -PROGS=test1.byt test2.byt test3.byt test4.byt test5.byt test6.byt \ - test7.byt test8.byt test9.byt testA.byt sieve.byt \ - testio.byt testsocket.byt testsignal.byt testsignal2.byt \ - torture.byt testfork.byt - -MOREPROGS=testfork.byt - -include ../../../config/Makefile - -CAMLC=../../../boot/ocamlrun ../../../ocamlc -I .. -I ../../unix -I ../../../stdlib - -CAMLOPT=../../../boot/ocamlrun ../../../ocamlopt -I .. -I ../../unix -I ../../../stdlib - -all: $(PROGS) $(MOREPROGS) - -allopt: $(PROGS:.byt=.out) $(MOREPROGS:.byt=.out) - -clean: - rm -f *.cm* *.byt *.out - rm -f $(PROGS:.byt=.ml) - -%.byt: %.ml - $(CAMLC) -custom -o $*.byt unix.cma threads.cma $*.ml ../libthreads.a ../../unix/libunix.a -cclib -lpthread - -%.out: %.ml - $(CAMLOPT) -o $*.out unix.cmxa threads.cmxa $*.ml ../libthreadsnat.a ../../unix/libunix.a -cclib -lpthread - -%.ml: ../../threads/Tests/%.ml - cp ../../threads/Tests/$*.ml $*.ml - -$(PROGS): ../threads.cma ../libthreads.a -$(PROGS:.byt=.out): ../threads.cmxa ../libthreadsnat.a diff --git a/otherlibs/systhreads/Tests/Makefile.nt b/otherlibs/systhreads/Tests/Makefile.nt deleted file mode 100644 index 10fb9040c0..0000000000 --- a/otherlibs/systhreads/Tests/Makefile.nt +++ /dev/null @@ -1,43 +0,0 @@ -######################################################################### -# # -# Objective Caml # -# # -# Xavier Leroy, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999 Institut National de Recherche en Informatique et # -# en Automatique. All rights reserved. This file is distributed # -# under the terms of the GNU Library General Public License, with # -# the special exception on linking described in file ../../../LICENSE.# -# # -######################################################################### - -# $Id$ - -PROGS=test1.byt test2.byt test3.byt test4.byt test5.byt test6.byt \ - test7.byt test8.byt test9.byt testA.byt sieve.byt \ - testio.byt testsocket.byt testwait.byt testsignal.byt testsignal2.byt \ - torture.byt - -include ../../../config/Makefile - -CAMLC=../../../boot/ocamlrun ../../../ocamlc -I .. -I ../../win32unix -I ../../../stdlib - -CAMLOPT=../../../boot/ocamlrun ../../../ocamlopt -I .. -I ../../win32unix -I ../../../stdlib - -all: $(PROGS) - -allopt: $(PROGS:.byt=.out) - -clean: - rm -f *.cm* *.byt *.out - rm -f $(PROGS:.byt=.ml) - -%.byt: ../../threads/Tests/%.ml - cp ../../threads/Tests/$*.ml $*.ml - $(CAMLC) -custom -o $*.byt unix.cma threads.cma $*.ml ../libthreads.$(A) ../../win32unix/libunix.$(A) - -%.out: ../../threads/Tests/%.ml - cp ../../threads/Tests/$*.ml $*.ml - $(CAMLOPT) -o $*.out unix.cmxa threads.cmxa $*.ml ../libthreadsnat.$(A) ../../win32unix/libunix.$(A) -cclib -lpthread - -$(PROGS): ../threads.cma ../libthreads.$(A) diff --git a/testsuite/tests/lib-systhreads/Makefile b/testsuite/tests/lib-systhreads/Makefile new file mode 100644 index 0000000000..80138b26ce --- /dev/null +++ b/testsuite/tests/lib-systhreads/Makefile @@ -0,0 +1,5 @@ +LIBRARIES=unix threads +ADD_COMPFLAGS=-thread + +include ../../makefiles/Makefile.several +include ../../makefiles/Makefile.common diff --git a/otherlibs/systhreads/Tests/testfork.ml b/testsuite/tests/lib-systhreads/testfork.ml index 494b1505ce..d0d253b37d 100644 --- a/otherlibs/systhreads/Tests/testfork.ml +++ b/testsuite/tests/lib-systhreads/testfork.ml @@ -1,10 +1,12 @@ (* POSIX threads and fork() *) -let compute_thread c = - while true do +let compute_thread c = ignore c +(* + while true do print_char c; flush stdout; for i = 1 to 100000 do ignore(ref []) done done +*) let main () = ignore(Thread.create compute_thread '1'); @@ -26,3 +28,5 @@ let main () = exit 0 let _ = main() + + diff --git a/testsuite/tests/lib-systhreads/testfork.reference b/testsuite/tests/lib-systhreads/testfork.reference new file mode 100644 index 0000000000..fb7a3c299d --- /dev/null +++ b/testsuite/tests/lib-systhreads/testfork.reference @@ -0,0 +1,6 @@ +Forking... +In parent... +In child... +Child did minor GC. +Child is exiting. +Parent is exiting. |