summaryrefslogtreecommitdiffstats
path: root/otherlibs/systhreads
diff options
context:
space:
mode:
authorXavier Clerc <xavier.clerc@inria.fr>2010-01-28 15:43:45 +0000
committerXavier Clerc <xavier.clerc@inria.fr>2010-01-28 15:43:45 +0000
commit2c54e3a4fac7c846eb6a8f916903189e57546716 (patch)
tree9e3fb182d523c5717b1c8dbdf00b82228443c86e /otherlibs/systhreads
parent45b70408a74289a102efc06d02da78362c705331 (diff)
Tests moved to 'lib-systhreads'
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9595 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/systhreads')
-rw-r--r--otherlibs/systhreads/Tests/Makefile47
-rw-r--r--otherlibs/systhreads/Tests/Makefile.nt43
-rw-r--r--otherlibs/systhreads/Tests/testfork.ml28
3 files changed, 0 insertions, 118 deletions
diff --git a/otherlibs/systhreads/Tests/Makefile b/otherlibs/systhreads/Tests/Makefile
deleted file mode 100644
index ac8b5f776..000000000
--- 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 10fb9040c..000000000
--- 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/otherlibs/systhreads/Tests/testfork.ml b/otherlibs/systhreads/Tests/testfork.ml
deleted file mode 100644
index 494b1505c..000000000
--- a/otherlibs/systhreads/Tests/testfork.ml
+++ /dev/null
@@ -1,28 +0,0 @@
-(* POSIX threads and fork() *)
-
-let compute_thread 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');
- Thread.delay 1.0;
- print_string "Forking..."; print_newline();
- match Unix.fork() with
- | 0 ->
- print_string "In child..."; print_newline();
- Gc.minor();
- print_string "Child did minor GC."; print_newline();
- ignore(Thread.create compute_thread '2');
- Thread.delay 1.0;
- print_string "Child is exiting."; print_newline();
- exit 0
- | pid ->
- print_string "In parent..."; print_newline();
- Thread.delay 2.0;
- print_string "Parent is exiting."; print_newline();
- exit 0
-
-let _ = main()