diff options
author | David Allsopp <david.allsopp@metastack.com> | 2018-09-19 11:45:30 +0100 |
---|---|---|
committer | David Allsopp <david.allsopp@metastack.com> | 2019-01-08 17:27:42 +0100 |
commit | b2a0f3b659a8d7e2f44c337718c1ea9373479d7d (patch) | |
tree | 7edde4980bf526c7f7270d34fe52486d018dd3a5 /testsuite/tests | |
parent | a9a76b58a8af88aec5273c2ed01001508843f09e (diff) | |
download | ocaml-b2a0f3b659a8d7e2f44c337718c1ea9373479d7d.tar.gz |
Update testsuite to work when libraries aren't built
Diffstat (limited to 'testsuite/tests')
49 files changed, 231 insertions, 185 deletions
diff --git a/testsuite/tests/ast-invariants/test.ml b/testsuite/tests/ast-invariants/test.ml index 1e0074b16c..314c668b9e 100644 --- a/testsuite/tests/ast-invariants/test.ml +++ b/testsuite/tests/ast-invariants/test.ml @@ -1,8 +1,9 @@ (* TEST include ocamlcommon + * hasunix include unix arguments = "${ocamlsrcdir}" - * native + ** native *) (* This test checks all ml files in the ocaml repository that are accepted diff --git a/testsuite/tests/backtrace/callstack.ml b/testsuite/tests/backtrace/callstack.ml index f5f74713fc..76bf9f96b3 100644 --- a/testsuite/tests/backtrace/callstack.ml +++ b/testsuite/tests/backtrace/callstack.ml @@ -1,11 +1,12 @@ (* TEST flags = "-g" + * hassysthreads include systhreads compare_programs = "false" - * no-flambda + ** no-flambda reference = "${test_source_directory}/callstack.reference" - ** native - ** bytecode + *** native + *** bytecode *) let[@inline never] f0 () = Printexc.print_raw_backtrace stdout (Printexc.get_callstack 100); () diff --git a/testsuite/tests/backtrace/callstack.reference b/testsuite/tests/backtrace/callstack.reference index 3522788b0a..33fa9a819a 100644 --- a/testsuite/tests/backtrace/callstack.reference +++ b/testsuite/tests/backtrace/callstack.reference @@ -1,12 +1,12 @@ main thread: -Raised by primitive operation at file "callstack.ml", line 11, characters 38-66 -Called from file "callstack.ml", line 12, characters 27-32 +Raised by primitive operation at file "callstack.ml", line 12, characters 38-66 Called from file "callstack.ml", line 13, characters 27-32 Called from file "callstack.ml", line 14, characters 27-32 -Called from file "callstack.ml", line 16, characters 9-14 +Called from file "callstack.ml", line 15, characters 27-32 +Called from file "callstack.ml", line 17, characters 9-14 new thread: -Raised by primitive operation at file "callstack.ml", line 11, characters 38-66 -Called from file "callstack.ml", line 12, characters 27-32 +Raised by primitive operation at file "callstack.ml", line 12, characters 38-66 Called from file "callstack.ml", line 13, characters 27-32 Called from file "callstack.ml", line 14, characters 27-32 +Called from file "callstack.ml", line 15, characters 27-32 Called from file "thread.ml", line 39, characters 8-14 diff --git a/testsuite/tests/lib-bigarray-file/mapfile.ml b/testsuite/tests/lib-bigarray-file/mapfile.ml index bf4bc12097..a28d5486a8 100644 --- a/testsuite/tests/lib-bigarray-file/mapfile.ml +++ b/testsuite/tests/lib-bigarray-file/mapfile.ml @@ -1,4 +1,5 @@ (* TEST + * hasunix include unix *) diff --git a/testsuite/tests/lib-dynlink-native/main.ml b/testsuite/tests/lib-dynlink-native/main.ml index 604f469ac0..bba0770432 100644 --- a/testsuite/tests/lib-dynlink-native/main.ml +++ b/testsuite/tests/lib-dynlink-native/main.ml @@ -5,193 +5,194 @@ files = "a.ml api.ml b.ml bug.ml c.ml factorial.c pack_client.ml \ plugin_high_arity.ml plugin.ml plugin.mli plugin_ref.ml \ plugin_simple.ml plugin_thread.ml" +* hassysthreads include systhreads include dynlink set subdir = "${test_source_directory}/sub" -* native-dynlink +** native-dynlink libraries = "" (* We will add them manually where appropriated *) -** setup-ocamlopt.byte-build-env +*** setup-ocamlopt.byte-build-env ocamlopt_default_flags = "" (* Removes the -ccopt -no-pie on ised on OpenBSD *) -*** script -script = "mkdir sub" **** script +script = "mkdir sub" +***** script script = "cp ${subdir}/api.mli ${subdir}/api.ml ${subdir}/plugin3.ml \ ${subdir}/plugin.ml sub" -***** ocamlopt.byte -module = "api.ml" ****** ocamlopt.byte +module = "api.ml" +******* ocamlopt.byte flags = "-opaque" module = "plugin.mli" -******* ocamlopt.byte +******** ocamlopt.byte flags = "" module = "plugin.ml" -******** ocamlopt.byte +********* ocamlopt.byte module= "" flags = "-shared" program = "plugin.so" all_modules = "plugin.cmx" -********* script +********** script script = "mv plugin.cmx plugin.cmx.bak" -********** ocamlopt.byte +*********** ocamlopt.byte flags = "" module = "plugin2.ml" -*********** script +************ script script = "mv plugin.cmx.bak plugin.cmx" -************ ocamlopt.byte +************* ocamlopt.byte module= "" flags = "-shared" program = "plugin2.so" all_modules = "plugin2.cmx" -************* ocamlopt.byte +************** ocamlopt.byte flags = "" module = "sub/plugin.ml" -************** ocamlopt.byte +*************** ocamlopt.byte module = "" flags = "-shared" program = "sub/plugin.so" all_modules = "sub/plugin.cmx" -*************** cd +**************** cd cwd = "sub" -**************** ocamlopt.byte +***************** ocamlopt.byte module = "api.mli" flags = "-opaque" -***************** ocamlopt.byte +****************** ocamlopt.byte flags = "" module = "api.ml" -****************** script +******************* script script = "mv api.cmx api.cmx.bak" -******************* ocamlopt.byte +******************** ocamlopt.byte module = "plugin3.ml" -******************** script +********************* script script = "mv api.cmx.bak api.cmx" -********************* cd +********************** cd cwd = ".." -********************** ocamlopt.byte +*********************** ocamlopt.byte module = "" flags = "-shared" program = "sub/plugin3.so" all_modules = "sub/plugin3.cmx" -*********************** ocamlopt.byte +************************ ocamlopt.byte flags = "" module = "plugin4.ml" -************************ ocamlopt.byte +************************* ocamlopt.byte module = "" flags = "-shared" program = "plugin4.so" all_modules = "plugin4.cmx" -************************* ocamlopt.byte +************************** ocamlopt.byte module = "packed1.ml" flags = "-for-pack Mypack" -************************** ocamlopt.byte +*************************** ocamlopt.byte flags = "-S -pack" module = "" program = "mypack.cmx" all_modules = "packed1.cmx" -*************************** ocamlopt.byte +**************************** ocamlopt.byte program = "mypack.so" flags = "-shared" all_modules = "mypack.cmx" -**************************** ocamlopt.byte +***************************** ocamlopt.byte program = "packed1.so" flags = "-shared" all_modules = "packed1.cmx" -***************************** ocamlopt.byte +****************************** ocamlopt.byte flags = "" module = "packed1_client.ml" -****************************** ocamlopt.byte +******************************* ocamlopt.byte module = "" program = "packed1_client.so" flags = "-shared" all_modules = "packed1_client.cmx" -******************************* ocamlopt.byte +******************************** ocamlopt.byte flags = "" module = "pack_client.ml" -******************************** ocamlopt.byte +********************************* ocamlopt.byte module = "" program = "pack_client.so" flags = "-shared" all_modules = "pack_client.cmx" -********************************* ocamlopt.byte +********************************** ocamlopt.byte flags = "" module = "plugin_ref.ml" -********************************** ocamlopt.byte +*********************************** ocamlopt.byte module = "" program = "plugin_ref.so" flags = "-shared" all_modules = "plugin_ref.cmx" -*********************************** ocamlopt.byte +************************************ ocamlopt.byte flags = "" module = "plugin_high_arity.ml" -************************************ ocamlopt.byte +************************************* ocamlopt.byte module = "" program = "plugin_high_arity.so" flags = "-shared" all_modules = "plugin_high_arity.cmx" -************************************* ocamlopt.byte +************************************** ocamlopt.byte flags = "-ccopt ${shared_library_cflags}" module = "factorial.c" -************************************** ocamlopt.byte +*************************************** ocamlopt.byte flags = "" module = "plugin_ext.ml" -*************************************** ocamlopt.byte +**************************************** ocamlopt.byte module = "" program = "plugin_ext.so" flags = "-shared" all_modules = "factorial.${objext} plugin_ext.cmx" -**************************************** ocamlopt.byte +***************************************** ocamlopt.byte module = "plugin_simple.ml" flags = "" -***************************************** ocamlopt.byte +****************************************** ocamlopt.byte module = "" program = "plugin_simple.so" flags = "-shared" all_modules = "plugin_simple.cmx" -***************************************** ocamlopt.byte +****************************************** ocamlopt.byte module = "bug.ml" flags = "" -****************************************** ocamlopt.byte +******************************************* ocamlopt.byte module = "" program = "bug.so" flags = "-shared" all_modules = "bug.cmx" -****************************************** ocamlopt.byte +******************************************* ocamlopt.byte module = "plugin_thread.ml" flags = "" -******************************************* ocamlopt.byte +******************************************** ocamlopt.byte module = "" program = "plugin_thread.so" flags = "-shared" all_modules = "plugin_thread.cmx" -******************************************** ocamlopt.byte +********************************************* ocamlopt.byte program = "plugin4_unix.so" all_modules = "unix.cmxa plugin4.cmx" -********************************************* ocamlopt.byte +********************************************** ocamlopt.byte flags = "" compile_only = "true" all_modules = "a.ml b.ml c.ml main.ml" -********************************************** ocamlopt.byte +*********************************************** ocamlopt.byte module = "" compile_only = "false" flags = "-shared" program = "a.so" all_modules = "a.cmx" -*********************************************** ocamlopt.byte +************************************************ ocamlopt.byte program = "b.so" all_modules = "b.cmx" -************************************************ ocamlopt.byte +************************************************* ocamlopt.byte program = "c.so" all_modules = "c.cmx" -************************************************* ocamlopt.byte +************************************************** ocamlopt.byte program = "mylib.cmxa" flags = "-a" all_modules = "plugin.cmx plugin2.cmx" -************************************************** ocamlopt.byte +*************************************************** ocamlopt.byte program = "mylib.so" flags = "-shared -linkall" all_modules = "mylib.cmxa" -*************************************************** ocamlopt.byte +**************************************************** ocamlopt.byte program = "${test_build_directory}/main.exe" libraries = "unix threads dynlink" flags = "-linkall" @@ -206,9 +207,9 @@ We thus do not check compiler output. This was not done either before the test was ported to ocamltest. *) -**************************************************** run +***************************************************** run arguments = "plugin.so plugin2.so plugin_thread.so" -***************************************************** check-program-output +****************************************************** check-program-output *) let () = diff --git a/testsuite/tests/lib-scanf-2/tscanf2_master.ml b/testsuite/tests/lib-scanf-2/tscanf2_master.ml index 4a71bb0697..a596b3ae1c 100644 --- a/testsuite/tests/lib-scanf-2/tscanf2_master.ml +++ b/testsuite/tests/lib-scanf-2/tscanf2_master.ml @@ -1,57 +1,58 @@ (* TEST -include unix modules = "tscanf2_io.ml" +* hasunix +include unix files = "tscanf2_worker.ml" reference = "${test_source_directory}/tscanf2.reference" (* The bytcode test *) -* setup-ocamlc.byte-build-env +** setup-ocamlc.byte-build-env program = "${test_build_directory}/master.byte" -** ocamlc.byte (* Compiles the master *) +*** ocamlc.byte (* Compiles the master *) -*** ocamlc.byte (* Compiles the worker *) +**** ocamlc.byte (* Compiles the worker *) all_modules = "tscanf2_io.cmo tscanf2_worker.ml" program = "${test_build_directory}/worker.byte" -**** check-ocamlc.byte-output +***** check-ocamlc.byte-output -***** run +****** run program = "${test_build_directory}/master.byte" arguments = "${test_build_directory}/worker.byte" -****** check-program-output +******* check-program-output (* The native test *) -* setup-ocamlopt.byte-build-env +** setup-ocamlopt.byte-build-env program = "${test_build_directory}/master.opt" -** ocamlopt.byte (* Compiles the master *) +*** ocamlopt.byte (* Compiles the master *) -*** ocamlopt.byte (* Compiles the worker *) +**** ocamlopt.byte (* Compiles the worker *) all_modules = "tscanf2_io.cmx tscanf2_worker.ml" program = "${test_build_directory}/worker.opt" -**** check-ocamlopt.byte-output +***** check-ocamlopt.byte-output -***** run +****** run program = "${test_build_directory}/master.opt" arguments = "${test_build_directory}/worker.opt" -****** check-program-output +******* check-program-output *) diff --git a/testsuite/tests/lib-str/t01.ml b/testsuite/tests/lib-str/t01.ml index 1fb7805a47..87621c15fd 100644 --- a/testsuite/tests/lib-str/t01.ml +++ b/testsuite/tests/lib-str/t01.ml @@ -1,4 +1,5 @@ (* TEST + * hasstr include str *) diff --git a/testsuite/tests/lib-systhreads/testfork.ml b/testsuite/tests/lib-systhreads/testfork.ml index dbd456cade..3fdf386086 100644 --- a/testsuite/tests/lib-systhreads/testfork.ml +++ b/testsuite/tests/lib-systhreads/testfork.ml @@ -1,9 +1,10 @@ (* TEST + * hassysthreads include systhreads - * not-bsd - ** libunix - *** bytecode - *** native + ** not-bsd + *** libunix + **** bytecode + **** native *) (* POSIX threads and fork() *) diff --git a/testsuite/tests/lib-systhreads/testpreempt.ml b/testsuite/tests/lib-systhreads/testpreempt.ml index 820e3cd006..11d69152d6 100644 --- a/testsuite/tests/lib-systhreads/testpreempt.ml +++ b/testsuite/tests/lib-systhreads/testpreempt.ml @@ -1,13 +1,14 @@ (* TEST + * hassysthreads (* On Windows, we use Sleep(0) for triggering preemption of threads. However, this does not seem very reliable, so that this test fails on some Windows configurations. See GPR #1533. *) include systhreads - * not-windows - ** bytecode - ** native + ** not-windows + *** bytecode + *** native *) let rec generate_list n = diff --git a/testsuite/tests/lib-threads/backtrace_threads.ml b/testsuite/tests/lib-threads/backtrace_threads.ml index 8044af3b54..96b99e146d 100644 --- a/testsuite/tests/lib-threads/backtrace_threads.ml +++ b/testsuite/tests/lib-threads/backtrace_threads.ml @@ -1,5 +1,6 @@ (* TEST +* hassysthreads include systhreads *) diff --git a/testsuite/tests/lib-threads/bank.ml b/testsuite/tests/lib-threads/bank.ml index cf00a71705..09e9a70bfd 100644 --- a/testsuite/tests/lib-threads/bank.ml +++ b/testsuite/tests/lib-threads/bank.ml @@ -1,5 +1,6 @@ (* TEST +* hassysthreads include systhreads *) diff --git a/testsuite/tests/lib-threads/beat.ml b/testsuite/tests/lib-threads/beat.ml index a09980be89..e77c0a8639 100644 --- a/testsuite/tests/lib-threads/beat.ml +++ b/testsuite/tests/lib-threads/beat.ml @@ -1,5 +1,6 @@ (* TEST +* hassysthreads include systhreads *) diff --git a/testsuite/tests/lib-threads/bufchan.ml b/testsuite/tests/lib-threads/bufchan.ml index 4c243c6cf7..eadc61bf76 100644 --- a/testsuite/tests/lib-threads/bufchan.ml +++ b/testsuite/tests/lib-threads/bufchan.ml @@ -1,5 +1,6 @@ (* TEST +* hassysthreads include systhreads *) diff --git a/testsuite/tests/lib-threads/close.ml b/testsuite/tests/lib-threads/close.ml index 5f8918a385..63e3a17822 100644 --- a/testsuite/tests/lib-threads/close.ml +++ b/testsuite/tests/lib-threads/close.ml @@ -1,5 +1,6 @@ (* TEST +* hassysthreads include systhreads *) diff --git a/testsuite/tests/lib-threads/fileio.ml b/testsuite/tests/lib-threads/fileio.ml index d380917a38..6bf90b99d7 100644 --- a/testsuite/tests/lib-threads/fileio.ml +++ b/testsuite/tests/lib-threads/fileio.ml @@ -1,5 +1,6 @@ (* TEST +* hassysthreads include systhreads *) diff --git a/testsuite/tests/lib-threads/pr4466.ml b/testsuite/tests/lib-threads/pr4466.ml index 2714b4e14f..e09fee1b24 100644 --- a/testsuite/tests/lib-threads/pr4466.ml +++ b/testsuite/tests/lib-threads/pr4466.ml @@ -1,5 +1,6 @@ (* TEST +* hassysthreads include systhreads *) diff --git a/testsuite/tests/lib-threads/pr5325.ml b/testsuite/tests/lib-threads/pr5325.ml index 1811bd6d85..69f1577446 100644 --- a/testsuite/tests/lib-threads/pr5325.ml +++ b/testsuite/tests/lib-threads/pr5325.ml @@ -1,5 +1,6 @@ (* TEST +* hassysthreads include systhreads *) diff --git a/testsuite/tests/lib-threads/pr7638.ml b/testsuite/tests/lib-threads/pr7638.ml index 07e1a81ca0..3003d93db2 100644 --- a/testsuite/tests/lib-threads/pr7638.ml +++ b/testsuite/tests/lib-threads/pr7638.ml @@ -1,5 +1,6 @@ (* TEST +* hassysthreads include systhreads *) diff --git a/testsuite/tests/lib-threads/prodcons.ml b/testsuite/tests/lib-threads/prodcons.ml index 808da43abe..93b99ce2b9 100644 --- a/testsuite/tests/lib-threads/prodcons.ml +++ b/testsuite/tests/lib-threads/prodcons.ml @@ -1,5 +1,6 @@ (* TEST +* hassysthreads include systhreads *) diff --git a/testsuite/tests/lib-threads/prodcons2.ml b/testsuite/tests/lib-threads/prodcons2.ml index 8f3c5b2597..58eb82103d 100644 --- a/testsuite/tests/lib-threads/prodcons2.ml +++ b/testsuite/tests/lib-threads/prodcons2.ml @@ -1,5 +1,6 @@ (* TEST +* hassysthreads include systhreads *) diff --git a/testsuite/tests/lib-threads/sieve.ml b/testsuite/tests/lib-threads/sieve.ml index 9c6414b8c4..b44b0902d4 100644 --- a/testsuite/tests/lib-threads/sieve.ml +++ b/testsuite/tests/lib-threads/sieve.ml @@ -1,5 +1,6 @@ (* TEST +* hassysthreads include systhreads *) diff --git a/testsuite/tests/lib-threads/signal.ml b/testsuite/tests/lib-threads/signal.ml index 2db8fe4432..38c1c7ba16 100644 --- a/testsuite/tests/lib-threads/signal.ml +++ b/testsuite/tests/lib-threads/signal.ml @@ -1,46 +1,47 @@ (* TEST +* hassysthreads include systhreads files = "sigint.c" -* libunix (* excludes mingw32/64 and msvc32/64 *) +** libunix (* excludes mingw32/64 and msvc32/64 *) -** setup-ocamlc.byte-build-env +*** setup-ocamlc.byte-build-env program = "${test_build_directory}/signal.byte" -*** ocamlc.byte +**** ocamlc.byte program = "sigint" all_modules = "sigint.c" -**** ocamlc.byte +***** ocamlc.byte program = "${test_build_directory}/signal.byte" all_modules = "signal.ml" -***** check-ocamlc.byte-output -****** run -******* check-program-output +****** check-ocamlc.byte-output +******* run +******** check-program-output -** setup-ocamlopt.byte-build-env +*** setup-ocamlopt.byte-build-env program = "${test_build_directory}/signal.opt" -*** ocamlopt.byte +**** ocamlopt.byte program = "sigint" all_modules = "sigint.c" -**** ocamlc.byte +***** ocamlc.byte program = "${test_build_directory}/signal.opt" all_modules = "signal.ml" -***** check-ocamlopt.byte-output -****** run -******* check-program-output +****** check-ocamlopt.byte-output +******* run +******** check-program-output *) diff --git a/testsuite/tests/lib-threads/sockets.ml b/testsuite/tests/lib-threads/sockets.ml index 9f76707795..c7299c42e7 100644 --- a/testsuite/tests/lib-threads/sockets.ml +++ b/testsuite/tests/lib-threads/sockets.ml @@ -1,10 +1,11 @@ (* TEST +* hassysthreads include systhreads -* libunix (* Broken on Windows (missing join?), needs to be fixed *) -** bytecode -** native +** libunix (* Broken on Windows (missing join?), needs to be fixed *) +*** bytecode +*** native *) diff --git a/testsuite/tests/lib-threads/swapchan.ml b/testsuite/tests/lib-threads/swapchan.ml index 8d7f7522b0..853b1a208a 100644 --- a/testsuite/tests/lib-threads/swapchan.ml +++ b/testsuite/tests/lib-threads/swapchan.ml @@ -1,5 +1,6 @@ (* TEST +* hassysthreads include systhreads *) diff --git a/testsuite/tests/lib-threads/tls.ml b/testsuite/tests/lib-threads/tls.ml index c69db3885a..ef4fc516f1 100644 --- a/testsuite/tests/lib-threads/tls.ml +++ b/testsuite/tests/lib-threads/tls.ml @@ -1,5 +1,6 @@ (* TEST +* hassysthreads include systhreads *) diff --git a/testsuite/tests/lib-threads/torture.ml b/testsuite/tests/lib-threads/torture.ml index 6d7a9a671b..a96314f909 100644 --- a/testsuite/tests/lib-threads/torture.ml +++ b/testsuite/tests/lib-threads/torture.ml @@ -1,5 +1,6 @@ (* TEST +* hassysthreads include systhreads *) diff --git a/testsuite/tests/lib-unix/common/channel_of.ml b/testsuite/tests/lib-unix/common/channel_of.ml index c70b51876b..ef9c7e5a31 100644 --- a/testsuite/tests/lib-unix/common/channel_of.ml +++ b/testsuite/tests/lib-unix/common/channel_of.ml @@ -1,4 +1,5 @@ (* TEST +* hasunix include unix *) diff --git a/testsuite/tests/lib-unix/common/cloexec.ml b/testsuite/tests/lib-unix/common/cloexec.ml index 605ba97075..b560b55240 100644 --- a/testsuite/tests/lib-unix/common/cloexec.ml +++ b/testsuite/tests/lib-unix/common/cloexec.ml @@ -14,33 +14,34 @@ already does. *) +* hasunix include unix files = "fdstatus_aux.c fdstatus_main.ml" -*libunix -** setup-ocamlc.byte-build-env +**libunix +*** setup-ocamlc.byte-build-env program = "${test_build_directory}/cloexec.byte" -*** ocamlc.byte +**** ocamlc.byte program = "${test_build_directory}/fdstatus.exe" all_modules = "fdstatus_aux.c fdstatus_main.ml" -**** ocamlc.byte +***** ocamlc.byte program = "${test_build_directory}/cloexec.byte" all_modules= "cloexec.ml" -***** check-ocamlc.byte-output -****** run -******* check-program-output +****** check-ocamlc.byte-output +******* run +******** check-program-output -** setup-ocamlopt.byte-build-env +*** setup-ocamlopt.byte-build-env program = "${test_build_directory}/cloexec.opt" -*** ocamlopt.byte +**** ocamlopt.byte program = "${test_build_directory}/fdstatus.exe" all_modules = "fdstatus_aux.c fdstatus_main.ml" -**** ocamlopt.byte +***** ocamlopt.byte program = "${test_build_directory}/cloexec.opt" all_modules= "cloexec.ml" -***** check-ocamlopt.byte-output -****** run -******* check-program-output +****** check-ocamlopt.byte-output +******* run +******** check-program-output *) diff --git a/testsuite/tests/lib-unix/common/dup.ml b/testsuite/tests/lib-unix/common/dup.ml index 2cb8c97521..b47d166f65 100644 --- a/testsuite/tests/lib-unix/common/dup.ml +++ b/testsuite/tests/lib-unix/common/dup.ml @@ -1,4 +1,5 @@ (* TEST +* hasunix include unix *) diff --git a/testsuite/tests/lib-unix/common/dup2.ml b/testsuite/tests/lib-unix/common/dup2.ml index 2641ef74e6..944aacc3ee 100644 --- a/testsuite/tests/lib-unix/common/dup2.ml +++ b/testsuite/tests/lib-unix/common/dup2.ml @@ -1,4 +1,5 @@ (* TEST +* hasunix include unix stderr = "/dev/null" *) diff --git a/testsuite/tests/lib-unix/common/getaddrinfo.ml b/testsuite/tests/lib-unix/common/getaddrinfo.ml index cead0d8469..1d6bef14e1 100644 --- a/testsuite/tests/lib-unix/common/getaddrinfo.ml +++ b/testsuite/tests/lib-unix/common/getaddrinfo.ml @@ -1,4 +1,5 @@ (* TEST +* hasunix include unix *) diff --git a/testsuite/tests/lib-unix/common/pipe_eof.ml b/testsuite/tests/lib-unix/common/pipe_eof.ml index a4c71d7e16..2e4f9c21b5 100644 --- a/testsuite/tests/lib-unix/common/pipe_eof.ml +++ b/testsuite/tests/lib-unix/common/pipe_eof.ml @@ -1,4 +1,5 @@ (* TEST +* hasunix include unix *) diff --git a/testsuite/tests/lib-unix/common/redirections.ml b/testsuite/tests/lib-unix/common/redirections.ml index af4b4d4188..65fbd60cc1 100644 --- a/testsuite/tests/lib-unix/common/redirections.ml +++ b/testsuite/tests/lib-unix/common/redirections.ml @@ -2,31 +2,32 @@ files = "reflector.ml" -* setup-ocamlc.byte-build-env +* hasunix +** setup-ocamlc.byte-build-env program = "${test_build_directory}/redirections.byte" -** ocamlc.byte +*** ocamlc.byte program = "${test_build_directory}/reflector.exe" all_modules = "reflector.ml" -*** ocamlc.byte +**** ocamlc.byte include unix program = "${test_build_directory}/redirections.byte" all_modules= "redirections.ml" -**** check-ocamlc.byte-output -***** run -****** check-program-output +***** check-ocamlc.byte-output +****** run +******* check-program-output -* setup-ocamlopt.byte-build-env +** setup-ocamlopt.byte-build-env program = "${test_build_directory}/redirections.opt" -** ocamlopt.byte +*** ocamlopt.byte program = "${test_build_directory}/reflector.exe" all_modules = "reflector.ml" -*** ocamlopt.byte +**** ocamlopt.byte include unix program = "${test_build_directory}/redirections.opt" all_modules= "redirections.ml" -**** check-ocamlopt.byte-output -***** run -****** check-program-output +***** check-ocamlopt.byte-output +****** run +******* check-program-output *) diff --git a/testsuite/tests/lib-unix/common/rename.ml b/testsuite/tests/lib-unix/common/rename.ml index 46000bb39f..01a9a75f00 100644 --- a/testsuite/tests/lib-unix/common/rename.ml +++ b/testsuite/tests/lib-unix/common/rename.ml @@ -1,4 +1,5 @@ (* TEST +* hasunix include unix *) diff --git a/testsuite/tests/lib-unix/common/test_unix_cmdline.ml b/testsuite/tests/lib-unix/common/test_unix_cmdline.ml index f90a873557..3dffec3ba2 100644 --- a/testsuite/tests/lib-unix/common/test_unix_cmdline.ml +++ b/testsuite/tests/lib-unix/common/test_unix_cmdline.ml @@ -2,31 +2,32 @@ files = "cmdline_prog.ml" -* setup-ocamlc.byte-build-env +* hasunix +** setup-ocamlc.byte-build-env program = "${test_build_directory}/test_unix_cmdline.byte" -** ocamlc.byte +*** ocamlc.byte program = "${test_build_directory}/cmdline_prog.exe" all_modules = "cmdline_prog.ml" -*** ocamlc.byte +**** ocamlc.byte include unix program = "${test_build_directory}/test_unix_cmdline.byte" all_modules= "test_unix_cmdline.ml" -**** check-ocamlc.byte-output -***** run -****** check-program-output +***** check-ocamlc.byte-output +****** run +******* check-program-output -* setup-ocamlopt.byte-build-env +** setup-ocamlopt.byte-build-env program = "${test_build_directory}/test_unix_cmdline.opt" -** ocamlc.byte +*** ocamlc.byte program = "${test_build_directory}/cmdline_prog.exe" all_modules = "cmdline_prog.ml" -*** ocamlopt.byte +**** ocamlopt.byte include unix program = "${test_build_directory}/test_unix_cmdline.opt" all_modules= "test_unix_cmdline.ml" -**** check-ocamlopt.byte-output -***** run -****** check-program-output +***** check-ocamlopt.byte-output +****** run +******* check-program-output *) diff --git a/testsuite/tests/lib-unix/common/utimes.ml b/testsuite/tests/lib-unix/common/utimes.ml index c353544a52..c8f30c3a07 100644 --- a/testsuite/tests/lib-unix/common/utimes.ml +++ b/testsuite/tests/lib-unix/common/utimes.ml @@ -1,4 +1,5 @@ (* TEST +* hasunix include unix files = "utimes.txt" *) diff --git a/testsuite/tests/lib-unix/common/wait_nohang.ml b/testsuite/tests/lib-unix/common/wait_nohang.ml index a9d6c5d11c..fb4cacb90a 100644 --- a/testsuite/tests/lib-unix/common/wait_nohang.ml +++ b/testsuite/tests/lib-unix/common/wait_nohang.ml @@ -1,4 +1,5 @@ (* TEST +* hasunix include unix *) diff --git a/testsuite/tests/lib-unix/isatty/isatty_std.ml b/testsuite/tests/lib-unix/isatty/isatty_std.ml index 9e410f5eaf..25835e79a6 100644 --- a/testsuite/tests/lib-unix/isatty/isatty_std.ml +++ b/testsuite/tests/lib-unix/isatty/isatty_std.ml @@ -1,4 +1,5 @@ (* TEST +* hasunix include unix stdin = "/dev/null" stderr = "/dev/null" diff --git a/testsuite/tests/lib-unix/unix-execvpe/exec.ml b/testsuite/tests/lib-unix/unix-execvpe/exec.ml index 1c36643e1d..f4826a9992 100644 --- a/testsuite/tests/lib-unix/unix-execvpe/exec.ml +++ b/testsuite/tests/lib-unix/unix-execvpe/exec.ml @@ -1,9 +1,10 @@ (* TEST + * hasunix include unix script = "sh ${test_source_directory}/has-execvpe.sh" - * script - ** bytecode - ** native + ** script + *** bytecode + *** native *) open Printf diff --git a/testsuite/tests/lib-unix/win-stat/test.ml b/testsuite/tests/lib-unix/win-stat/test.ml index d83d4addf1..63ea178aca 100644 --- a/testsuite/tests/lib-unix/win-stat/test.ml +++ b/testsuite/tests/lib-unix/win-stat/test.ml @@ -1,7 +1,7 @@ (* TEST -include unix modules = "fakeclock.c" -* windows +* libwin32unix +include unix ** bytecode ** native *) diff --git a/testsuite/tests/lib-unix/win-symlink/test.ml b/testsuite/tests/lib-unix/win-symlink/test.ml index f47abbde98..64b8ae9141 100644 --- a/testsuite/tests/lib-unix/win-symlink/test.ml +++ b/testsuite/tests/lib-unix/win-symlink/test.ml @@ -1,7 +1,7 @@ (* TEST +* libwin32unix include unix -* windows ** has_symlink *** bytecode *** native diff --git a/testsuite/tests/tool-caml-tex/ellipses.ml b/testsuite/tests/tool-caml-tex/ellipses.ml index 966355be69..f83df27f76 100644 --- a/testsuite/tests/tool-caml-tex/ellipses.ml +++ b/testsuite/tests/tool-caml-tex/ellipses.ml @@ -3,9 +3,10 @@ output="ellipses.output" script = "${ocamlrun} ${ocamlsrcdir}/tools/caml-tex \ -repo-root ${ocamlsrcdir} ${test_source_directory}/${test_file} -o ${output}" - * native-compiler - ** script with unix,str - *** check-program-output + * hasstr + ** native-compiler + *** script with unix,str + **** check-program-output *) \begin{caml_example*}{verbatim} diff --git a/testsuite/tests/tool-caml-tex/ellipses.reference b/testsuite/tests/tool-caml-tex/ellipses.reference index d1498bb52c..1503c845df 100644 --- a/testsuite/tests/tool-caml-tex/ellipses.reference +++ b/testsuite/tests/tool-caml-tex/ellipses.reference @@ -3,9 +3,10 @@ output="ellipses.output" script = "${ocamlrun} ${ocamlsrcdir}/tools/caml-tex \ -repo-root ${ocamlsrcdir} ${test_source_directory}/${test_file} -o ${output}" - * native-compiler - ** script with unix,str - *** check-program-output + * hasstr + ** native-compiler + *** script with unix,str + **** check-program-output *) \camlexample{verbatim} diff --git a/testsuite/tests/tool-caml-tex/redirections.ml b/testsuite/tests/tool-caml-tex/redirections.ml index 18e2fd9e21..80ef43a3f6 100644 --- a/testsuite/tests/tool-caml-tex/redirections.ml +++ b/testsuite/tests/tool-caml-tex/redirections.ml @@ -3,9 +3,10 @@ output="redirections.output" script = "${ocamlrun} ${ocamlsrcdir}/tools/caml-tex \ -repo-root ${ocamlsrcdir} ${test_source_directory}/${test_file} -o ${output}" - * native-compiler - ** script with unix,str - *** check-program-output + * hasstr + ** native-compiler + *** script with unix,str + **** check-program-output *) \begin{caml_example}{toplevel} diff --git a/testsuite/tests/tool-caml-tex/redirections.reference b/testsuite/tests/tool-caml-tex/redirections.reference index 1735294432..a9c8603374 100644 --- a/testsuite/tests/tool-caml-tex/redirections.reference +++ b/testsuite/tests/tool-caml-tex/redirections.reference @@ -3,9 +3,10 @@ output="redirections.output" script = "${ocamlrun} ${ocamlsrcdir}/tools/caml-tex \ -repo-root ${ocamlsrcdir} ${test_source_directory}/${test_file} -o ${output}" - * native-compiler - ** script with unix,str - *** check-program-output + * hasstr + ** native-compiler + *** script with unix,str + **** check-program-output *) \camlexample{toplevel} diff --git a/testsuite/tests/tool-debugger/basic/debuggee.ml b/testsuite/tests/tool-debugger/basic/debuggee.ml index 6bdac7e76c..91ad3c21dc 100644 --- a/testsuite/tests/tool-debugger/basic/debuggee.ml +++ b/testsuite/tests/tool-debugger/basic/debuggee.ml @@ -2,12 +2,13 @@ set foo = "bar" flags += " -g " ocamldebug_script = "${test_source_directory}/input_script" -* shared-libraries -** setup-ocamlc.byte-build-env -*** ocamlc.byte -**** check-ocamlc.byte-output -***** ocamldebug -****** check-program-output +* debugger +** shared-libraries +*** setup-ocamlc.byte-build-env +**** ocamlc.byte +***** check-ocamlc.byte-output +****** ocamldebug +******* check-program-output *) print_endline Sys.argv.(1);; diff --git a/testsuite/tests/tool-debugger/find-artifacts/debuggee.ml b/testsuite/tests/tool-debugger/find-artifacts/debuggee.ml index c06350eda8..70aee3ff04 100644 --- a/testsuite/tests/tool-debugger/find-artifacts/debuggee.ml +++ b/testsuite/tests/tool-debugger/find-artifacts/debuggee.ml @@ -1,24 +1,25 @@ (* TEST ocamldebug_script = "${test_source_directory}/input_script" -* shared-libraries -** setup-ocamlc.byte-build-env -*** script +* debugger +** shared-libraries +*** setup-ocamlc.byte-build-env +**** script script = "mkdir out" -**** ocamlc.byte +***** ocamlc.byte flags = "-g -c" all_modules = "${test_source_directory}/in/blah.ml" program = "out/blah.cmo" -***** ocamlc.byte +****** ocamlc.byte program = "out/foo.cmo" flags = "-I out -g -c" all_modules = "${test_source_directory}/in/foo.ml" -****** ocamlc.byte +******* ocamlc.byte all_modules = "out/blah.cmo out/foo.cmo" flags = " -g " program = "debuggee.exe" -******* check-ocamlc.byte-output -******** ocamldebug -********* check-program-output +******** check-ocamlc.byte-output +********* ocamldebug +********** check-program-output *) (* This file only contains the specification of how to run the test *) diff --git a/testsuite/tests/tool-debugger/no_debug_event/noev.ml b/testsuite/tests/tool-debugger/no_debug_event/noev.ml index 92f5b09fc1..2cf9866bfa 100644 --- a/testsuite/tests/tool-debugger/no_debug_event/noev.ml +++ b/testsuite/tests/tool-debugger/no_debug_event/noev.ml @@ -1,27 +1,28 @@ (* TEST files = "a.ml b.ml" ocamldebug_script = "${test_source_directory}/input_script" -* shared-libraries -** setup-ocamlc.byte-build-env -*** ocamlc.byte +* debugger +** shared-libraries +*** setup-ocamlc.byte-build-env +**** ocamlc.byte module = "a.ml" flags = "-g -for-pack foo" -**** ocamlc.byte +***** ocamlc.byte module = "" all_modules = "a.cmo" program = "foo.cmo" flags = "-g -pack" -***** ocamlc.byte +****** ocamlc.byte module = "b.ml" flags = " -g " -****** ocamlc.byte +******* ocamlc.byte module = "" flags = " -g " all_modules = "foo.cmo b.cmo" program = "${test_build_directory}/noev.exe" -******* check-ocamlc.byte-output -******** ocamldebug -********* check-program-output +******** check-ocamlc.byte-output +********* ocamldebug +********** check-program-output *) (* This file only contains the specification of how to run the test *) diff --git a/testsuite/tests/unboxed-primitive-args/test.ml b/testsuite/tests/unboxed-primitive-args/test.ml index d94535a662..6210435146 100644 --- a/testsuite/tests/unboxed-primitive-args/test.ml +++ b/testsuite/tests/unboxed-primitive-args/test.ml @@ -1,21 +1,22 @@ (* TEST +* hasunix include unix files = "common.mli common.ml test_common.c test_common.h" -* setup-ocamlopt.byte-build-env -** ocaml +** setup-ocamlopt.byte-build-env +*** ocaml test_file = "${test_source_directory}/gen_test.ml" ocaml_script_as_argument = "true" arguments = "c" compiler_output = "stubs.c" -*** ocaml +**** ocaml arguments = "ml" compiler_output = "main.ml" -**** ocamlopt.byte +***** ocamlopt.byte all_modules = "test_common.c stubs.c common.mli common.ml main.ml" -***** run -****** check-program-output +****** run +******* check-program-output *) |