diff options
21 files changed, 66 insertions, 45 deletions
@@ -1,4 +1,4 @@ -4.01.0+dev4_2012-07-26 +4.01.0+dev5_2012-07-27 # The version string is the first line of this file. # It must be in the format described in stdlib/sys.mli diff --git a/testsuite/makefiles/Makefile.common b/testsuite/makefiles/Makefile.common index 983f82c2f..c7da5b705 100644 --- a/testsuite/makefiles/Makefile.common +++ b/testsuite/makefiles/Makefile.common @@ -7,15 +7,15 @@ include $(TOPDIR)/config/Makefile DIFF=diff -q BOOTDIR=$(TOPDIR)/boot OCAMLRUN=$(BOOTDIR)/ocamlrun$(EXE) -OCAML=$(OCAMLRUN) $(TOPDIR)/ocaml$(EXE) -I $(TOPDIR)/stdlib -OCAMLC=$(OCAMLRUN) $(TOPDIR)/ocamlc$(EXE) -I $(TOPDIR)/stdlib -OCAMLOPT=$(OCAMLRUN) $(TOPDIR)/ocamlopt$(EXE) -I $(TOPDIR)/stdlib -OCAMLDOC=$(OCAMLRUN) $(TOPDIR)/ocamldoc/ocamldoc$(EXE) -OCAMLLEX=$(OCAMLRUN) $(TOPDIR)/lex/ocamllex$(EXE) -OCAMLMKLIB=$(OCAMLRUN) $(TOPDIR)/tools/ocamlmklib$(EXE) +OCAML=$(OCAMLRUN) $(TOPDIR)/ocaml -I $(TOPDIR)/stdlib +OCAMLC=$(OCAMLRUN) $(TOPDIR)/ocamlc -I $(TOPDIR)/stdlib +OCAMLOPT=$(OCAMLRUN) $(TOPDIR)/ocamlopt -I $(TOPDIR)/stdlib +OCAMLDOC=$(OCAMLRUN) $(TOPDIR)/ocamldoc/ocamldoc +OCAMLLEX=$(OCAMLRUN) $(TOPDIR)/lex/ocamllex +OCAMLMKLIB=$(OCAMLRUN) $(TOPDIR)/tools/ocamlmklib OCAMLYACC=$(TOPDIR)/yacc/ocamlyacc$(EXE) OCAMLBUILD=$(TOPDIR)/_build/ocamlbuild/ocamlbuild.native -DUMPOBJ=$(OCAMLRUN) $(TOPDIR)/tool/dumpobj$(EXE) +DUMPOBJ=$(OCAMLRUN) $(TOPDIR)/tool/dumpobj BYTECODE_ONLY=`if [ "$(ARCH)" = "none" -o "$(ASM)" = "none" ]; then echo 'YES'; else echo ''; fi` #COMPFLAGS= #FORTRAN_COMPILER= diff --git a/testsuite/makefiles/Makefile.one b/testsuite/makefiles/Makefile.one index ae763bf57..5c8e365e3 100644 --- a/testsuite/makefiles/Makefile.one +++ b/testsuite/makefiles/Makefile.one @@ -24,8 +24,10 @@ compile: $(ML_FILES) $(CMO_FILES) $(MAIN_MODULE).cmo @for file in $(C_FILES); do \ $(NATIVECC) $(NATIVECCCOMPOPTS) -c -I$(TOPDIR)/byterun $$file.c; \ done; + @rm -f program.byte program.byte.exe @$(OCAMLC) $(ADD_COMPFLAGS) $(ADD_CFLAGS) -o program.byte $(O_FILES) $(CMA_FILES) $(CMO_FILES) $(ADD_CMO_FILES) $(MAIN_MODULE).cmo @if [ -z "$(BYTECODE_ONLY)" ]; then \ + rm -f program.native program.native.exe; \ $(MAKE) $(CMX_FILES) $(MAIN_MODULE).cmx; \ $(OCAMLOPT) $(ADD_COMPFLAGS) -o program.native $(O_FILES) $(CMXA_FILES) $(CMX_FILES) $(ADD_CMX_FILES) $(MAIN_MODULE).cmx; \ fi diff --git a/testsuite/makefiles/Makefile.several b/testsuite/makefiles/Makefile.several index e5bd430a1..af8118225 100644 --- a/testsuite/makefiles/Makefile.several +++ b/testsuite/makefiles/Makefile.several @@ -41,19 +41,20 @@ run-all: run-file: @printf " $(DESC)" + @rm -f program program.exe @$(COMP) $(COMPFLAGS) $(FILE) -o program @if [ -f `basename $(FILE) ml`runner ]; then \ sh `basename $(FILE) ml`runner; \ else \ ./program $(PROGRAM_ARGS) > `basename $(FILE) ml`result; \ - fi + fi || (echo " => failed" && exit 1) @if [ -f `basename $(FILE) ml`checker ]; then \ sh `basename $(FILE) ml`checker; \ else \ - $(DIFF) `basename $(FILE) ml`reference `basename $(FILE) ml`result > /dev/null || (echo " => failed" && exit 1); \ - fi + $(DIFF) `basename $(FILE) ml`reference `basename $(FILE) ml`result > /dev/null; \ + fi || (echo " => failed" && exit 1) promote: defaultpromote clean: defaultclean - @rm -f *.result ./program + @rm -f *.result ./program program.exe diff --git a/testsuite/tests/basic-io-2/io.ml b/testsuite/tests/basic-io-2/io.ml index f843e7084..c457054dc 100644 --- a/testsuite/tests/basic-io-2/io.ml +++ b/testsuite/tests/basic-io-2/io.ml @@ -11,8 +11,8 @@ let test msg funct f1 f2 = (* File copy with constant-sized chunks *) let copy_file sz infile ofile = - let ic = open_in infile in - let oc = open_out ofile in + let ic = open_in_bin infile in + let oc = open_out_bin ofile in let buffer = String.create sz in let rec copy () = let n = input ic buffer 0 sz in @@ -27,8 +27,8 @@ let copy_file sz infile ofile = (* File copy with random-sized chunks *) let copy_random sz infile ofile = - let ic = open_in infile in - let oc = open_out ofile in + let ic = open_in_bin infile in + let oc = open_out_bin ofile in let buffer = String.create sz in let rec copy () = let s = 1 + Random.int sz in @@ -44,8 +44,8 @@ let copy_random sz infile ofile = (* File copy line per line *) let copy_line infile ofile = - let ic = open_in infile in - let oc = open_out ofile in + let ic = open_in_bin infile in + let oc = open_out_bin ofile in try while true do output_string oc (input_line ic); output_char oc '\n' @@ -73,7 +73,7 @@ let copy_seek chunksize infile ofile = (* Create long lines of text *) let make_lines ofile = - let oc = open_out ofile in + let oc = open_out_bin ofile in for i = 1 to 256 do output_string oc (String.make (i*64) '.'); output_char oc '\n' done; diff --git a/testsuite/tests/basic/bigints.ml b/testsuite/tests/basic/bigints.ml index 0b101ffa1..23e571c3f 100644 --- a/testsuite/tests/basic/bigints.ml +++ b/testsuite/tests/basic/bigints.ml @@ -1,12 +1,25 @@ let _ = - print_int 1000000000; print_newline(); - print_int 10000000000; print_newline(); - print_int 100000000000; print_newline(); - print_int 1000000000000; print_newline(); - print_int 10000000000000; print_newline(); - print_int 100000000000000; print_newline(); - print_int 1000000000000000; print_newline(); - print_int 10000000000000000; print_newline(); - print_int 100000000000000000; print_newline(); - print_int 1000000000000000000; print_newline() - + match Sys.word_size with + | 32 -> + print_int (1 * 1000000000); print_newline(); + print_string "10000000000"; print_newline(); + print_string "100000000000"; print_newline(); + print_string "1000000000000"; print_newline(); + print_string "10000000000000"; print_newline(); + print_string "100000000000000"; print_newline(); + print_string "1000000000000000"; print_newline(); + print_string "10000000000000000"; print_newline(); + print_string "100000000000000000"; print_newline(); + print_string "1000000000000000000"; print_newline(); + | 64 -> + print_int (1 * 1000000000); print_newline(); + print_int (10 * 1000000000); print_newline(); + print_int (100 * 1000000000); print_newline(); + print_int (1000 * 1000000000); print_newline(); + print_int (10000 * 1000000000); print_newline(); + print_int (100000 * 1000000000); print_newline(); + print_int (1000000 * 1000000000); print_newline(); + print_int (10000000 * 1000000000); print_newline(); + print_int (100000000 * 1000000000); print_newline(); + print_int (1000000000 * 1000000000); print_newline() + | _ -> assert false diff --git a/testsuite/tests/lib-dynlink-bytecode/.ignore b/testsuite/tests/lib-dynlink-bytecode/.ignore index 098ab51e1..789e3e053 100644 --- a/testsuite/tests/lib-dynlink-bytecode/.ignore +++ b/testsuite/tests/lib-dynlink-bytecode/.ignore @@ -1,4 +1,5 @@ main static custom +custom.exe marshal.data diff --git a/testsuite/tests/lib-dynlink-csharp/Makefile b/testsuite/tests/lib-dynlink-csharp/Makefile index c65b044e8..b20277272 100644 --- a/testsuite/tests/lib-dynlink-csharp/Makefile +++ b/testsuite/tests/lib-dynlink-csharp/Makefile @@ -14,7 +14,7 @@ prepare: bytecode: @printf " ... testing 'bytecode':" - @if [ ! `which $(CSC) > /dev/null` ]; then \ + @if [ ! `which $(CSC) > /dev/null 2>&1` ]; then \ echo " => passed"; \ else \ $(OCAMLC) -output-obj -o main.dll dynlink.cma main.ml entry.c; \ @@ -25,7 +25,7 @@ bytecode: bytecode-dll: @printf " ... testing 'bytecode-dll':" - @if [ ! `which $(CSC) > /dev/null` ]; then \ + @if [ ! `which $(CSC) > /dev/null 2>&1` ]; then \ echo " => passed"; \ else \ $(OCAMLC) -output-obj -o main_obj.$(O) dynlink.cma entry.c main.ml; \ @@ -37,7 +37,7 @@ bytecode-dll: native: @printf " ... testing 'native':" - @if [ ! `which $(CSC) > /dev/null` ]; then \ + @if [ ! `which $(CSC) > /dev/null 2>&1` ]; then \ echo " => passed"; \ else \ $(OCAMLOPT) -output-obj -o main.dll dynlink.cmxa entry.c main.ml; \ @@ -48,7 +48,7 @@ native: native-dll: @printf " ... testing 'native-dll':" - @if [ ! `which $(CSC) > /dev/null` ]; then \ + @if [ ! `which $(CSC) > /dev/null 2>&1` ]; then \ echo " => passed"; \ else \ $(OCAMLOPT) -output-obj -o main_obj.$(O) dynlink.cmxa entry.c main.ml; \ diff --git a/testsuite/tests/lib-dynlink-native/.ignore b/testsuite/tests/lib-dynlink-native/.ignore index 601ed1ffb..775ccb418 100644 --- a/testsuite/tests/lib-dynlink-native/.ignore +++ b/testsuite/tests/lib-dynlink-native/.ignore @@ -1,4 +1,5 @@ mypack.pack.s result main +main.exe marshal.data diff --git a/testsuite/tests/lib-hashtbl/htbl.ml b/testsuite/tests/lib-hashtbl/htbl.ml index f8beacc77..6bed1fd5e 100644 --- a/testsuite/tests/lib-hashtbl/htbl.ml +++ b/testsuite/tests/lib-hashtbl/htbl.ml @@ -190,4 +190,4 @@ let _ = TSP.test (pair_data d); printf "-- Lists of strings\n%!"; TSL.test (list_data d) - + diff --git a/testsuite/tests/lib-scanf/.ignore b/testsuite/tests/lib-scanf/.ignore new file mode 100644 index 000000000..a940814e0 --- /dev/null +++ b/testsuite/tests/lib-scanf/.ignore @@ -0,0 +1 @@ +tscanf_data diff --git a/testsuite/tests/lib-scanf/tscanf_data b/testsuite/tests/lib-scanf/tscanf_data deleted file mode 100644 index e4ae5b689..000000000 --- a/testsuite/tests/lib-scanf/tscanf_data +++ /dev/null @@ -1 +0,0 @@ -"Objective" -> "Caml"; diff --git a/testsuite/tests/lib-threads/test1.checker b/testsuite/tests/lib-threads/test1.checker index cbfe7ce5d..1d1045728 100644 --- a/testsuite/tests/lib-threads/test1.checker +++ b/testsuite/tests/lib-threads/test1.checker @@ -1 +1 @@ -sort test1.result | diff -q test1.reference - +LC_ALL=C sort test1.result | diff -q test1.reference - diff --git a/testsuite/tests/lib-threads/test4.checker b/testsuite/tests/lib-threads/test4.checker index ae27a0d57..b8661a982 100644 --- a/testsuite/tests/lib-threads/test4.checker +++ b/testsuite/tests/lib-threads/test4.checker @@ -1 +1 @@ -sort -u test4.result | diff -q test4.reference - +LC_ALL=C sort -u test4.result | diff -q test4.reference - diff --git a/testsuite/tests/lib-threads/test5.checker b/testsuite/tests/lib-threads/test5.checker index 030fcc91e..e99187571 100644 --- a/testsuite/tests/lib-threads/test5.checker +++ b/testsuite/tests/lib-threads/test5.checker @@ -1 +1 @@ -sort -u test5.result | diff -q test5.reference - +LC_ALL=C sort -u test5.result | diff -q test5.reference - diff --git a/testsuite/tests/lib-threads/test6.checker b/testsuite/tests/lib-threads/test6.checker index 40ab24f87..d2e9930af 100644 --- a/testsuite/tests/lib-threads/test6.checker +++ b/testsuite/tests/lib-threads/test6.checker @@ -1 +1 @@ -sort -u test6.result | diff -q test6.reference - +LC_ALL=C sort -u test6.result | diff -q test6.reference - diff --git a/testsuite/tests/lib-threads/testA.checker b/testsuite/tests/lib-threads/testA.checker index 4c309401d..9f5d00a87 100644 --- a/testsuite/tests/lib-threads/testA.checker +++ b/testsuite/tests/lib-threads/testA.checker @@ -1 +1 @@ -sort testA.result | diff -q testA.reference - +LC_ALL=C sort testA.result | diff -q testA.reference - diff --git a/testsuite/tests/lib-threads/testexit.checker b/testsuite/tests/lib-threads/testexit.checker index 5834e5d00..c1182d6f8 100644 --- a/testsuite/tests/lib-threads/testexit.checker +++ b/testsuite/tests/lib-threads/testexit.checker @@ -1 +1 @@ -sort testexit.result | diff -q testexit.reference - +LC_ALL=C sort testexit.result | diff -q testexit.reference - diff --git a/testsuite/tests/lib-threads/testsignal2.runner b/testsuite/tests/lib-threads/testsignal2.runner index 0e368a924..e215ec6ed 100644 --- a/testsuite/tests/lib-threads/testsignal2.runner +++ b/testsuite/tests/lib-threads/testsignal2.runner @@ -3,4 +3,4 @@ pid=$! sleep 3 kill -INT $pid sleep 1 -kill -9 $pid || true +kill -9 $pid 2>&- || true diff --git a/testsuite/tests/tool-ocamldoc/Makefile b/testsuite/tests/tool-ocamldoc/Makefile index d112f568c..2af4d3477 100644 --- a/testsuite/tests/tool-ocamldoc/Makefile +++ b/testsuite/tests/tool-ocamldoc/Makefile @@ -2,11 +2,14 @@ BASEDIR=../.. CUSTOM_MODULE=odoc_test ADD_COMPFLAGS=-I +ocamldoc +DIFF_OPT=--strip-trailing-cr +#DIFF_OPT=-b + run: $(CUSTOM_MODULE).cmo @for file in t*.ml; do \ printf " ... testing '$$file'"; \ $(OCAMLDOC) -hide-warnings -g $(CUSTOM_MODULE).cmo -o `basename $$file ml`result $$file; \ - $(DIFF) `basename $$file ml`reference `basename $$file ml`result > /dev/null && echo " => passed" || (echo " => failed" && exit 1); \ + $(DIFF) $(DIFF_OPT) `basename $$file ml`reference `basename $$file ml`result > /dev/null && echo " => passed" || (echo " => failed" && exit 1); \ done; @$(OCAMLDOC) -hide-warnings -html t*.ml 2>&1 | grep -v test_types_display || true @$(OCAMLDOC) -hide-warnings -latex t*.ml 2>&1 | grep -v test_types_display || true diff --git a/testsuite/tests/tool-ocamldoc/odoc_test.ml b/testsuite/tests/tool-ocamldoc/odoc_test.ml index 019647905..69f71eb6b 100644 --- a/testsuite/tests/tool-ocamldoc/odoc_test.ml +++ b/testsuite/tests/tool-ocamldoc/odoc_test.ml @@ -114,4 +114,4 @@ let _ = method generate = inst#generate end end in - Odoc_args.set_generator (Odoc_gen.Other (module My_generator : Odoc_gen.Base)) + Odoc_args.set_generator (Odoc_gen.Base (module My_generator : Odoc_gen.Base)) |