summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Allsopp <david.allsopp@metastack.com>2017-01-29 12:50:39 +0000
committerDavid Allsopp <david.allsopp@metastack.com>2017-06-16 12:32:53 +0200
commit8fe4ef6f5be48d7baecb8edfb8d00128a00e7756 (patch)
tree3e2c6ada22cbd70c22bf607c64c45d8e62271b38
parent7d3db9aa687697fcc268b2565854c3fa298ec72b (diff)
downloadocaml-8fe4ef6f5be48d7baecb8edfb8d00128a00e7756.tar.gz
Ensure testsuite works with OCAMLRUNPARAM=b
Ensure that tests which analyse exception messages explicitly disable backtrace printing.
-rw-r--r--.travis.yml2
-rw-r--r--testsuite/tests/formats-transition/ignored_scan_counters.ml3
-rw-r--r--testsuite/tests/formats-transition/ignored_scan_counters.ml.reference3
-rw-r--r--testsuite/tests/typing-extensions/cast.ml2
-rw-r--r--testsuite/tests/typing-extensions/cast.ml.reference1
-rw-r--r--testsuite/tests/typing-extensions/extensions.ml2
-rw-r--r--testsuite/tests/typing-extensions/extensions.ml.reference1
-rw-r--r--testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml3
-rw-r--r--testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml.reference5
-rw-r--r--testsuite/tests/typing-warnings/application.ml3
-rw-r--r--testsuite/tests/typing-warnings/application.ml.reference3
-rw-r--r--testsuite/tests/typing-warnings/pr6872.ml3
-rw-r--r--testsuite/tests/typing-warnings/pr6872.ml.principal.reference3
-rw-r--r--testsuite/tests/typing-warnings/pr6872.ml.reference3
-rw-r--r--testsuite/tests/typing-warnings/pr7297.ml3
-rw-r--r--testsuite/tests/typing-warnings/pr7297.ml.reference3
16 files changed, 35 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml
index d4211c28cf..40701ea467 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,7 +21,7 @@ script: bash -ex .travis-ci.sh
matrix:
include:
- env: CI_KIND=build XARCH=i386
- - env: CI_KIND=build XARCH=i386 CONFIG_ARG=-flambda
+ - env: CI_KIND=build XARCH=i386 CONFIG_ARG=-flambda OCAMLRUNPARAM=b,v=0
- env: CI_KIND=changes
- env: CI_KIND=tests
allow_failures:
diff --git a/testsuite/tests/formats-transition/ignored_scan_counters.ml b/testsuite/tests/formats-transition/ignored_scan_counters.ml
index 307f8a59cf..2186a82dc1 100644
--- a/testsuite/tests/formats-transition/ignored_scan_counters.ml
+++ b/testsuite/tests/formats-transition/ignored_scan_counters.ml
@@ -1,5 +1,8 @@
(* Benoit's patch did not support %_[nlNL]; test their behavior *)
+(* Ignore OCAMLRUNPARAM=b to be reproducible *)
+Printexc.record_backtrace false;;
+
(* not supported by Printf or Format: fails at runtime *)
let () = Printf.printf "%_n"
;;
diff --git a/testsuite/tests/formats-transition/ignored_scan_counters.ml.reference b/testsuite/tests/formats-transition/ignored_scan_counters.ml.reference
index 6d8d098b5a..55f8ee6855 100644
--- a/testsuite/tests/formats-transition/ignored_scan_counters.ml.reference
+++ b/testsuite/tests/formats-transition/ignored_scan_counters.ml.reference
@@ -1,5 +1,6 @@
-# Exception: Invalid_argument "Printf: bad conversion %_".
+# - : unit = ()
+# Exception: Invalid_argument "Printf: bad conversion %_".
# Exception: Invalid_argument "Printf: bad conversion %_".
# Exception: Invalid_argument "Printf: bad conversion %_".
# Exception: Invalid_argument "Printf: bad conversion %_".
diff --git a/testsuite/tests/typing-extensions/cast.ml b/testsuite/tests/typing-extensions/cast.ml
index 855f4df76c..1efcfd5090 100644
--- a/testsuite/tests/typing-extensions/cast.ml
+++ b/testsuite/tests/typing-extensions/cast.ml
@@ -1,3 +1,5 @@
+(* Ignore OCAMLRUNPARAM=b to be reproducible *)
+Printexc.record_backtrace false;;
(* By using two types we can have a recursive constraint *)
type 'a class_name = .. constraint 'a = < cast: 'a. 'a name -> 'a; ..>
diff --git a/testsuite/tests/typing-extensions/cast.ml.reference b/testsuite/tests/typing-extensions/cast.ml.reference
index 468a7c9454..3478d60fab 100644
--- a/testsuite/tests/typing-extensions/cast.ml.reference
+++ b/testsuite/tests/typing-extensions/cast.ml.reference
@@ -1,4 +1,5 @@
+# - : unit = ()
# type 'b class_name = .. constraint 'b = < cast : 'a. 'a name -> 'a; .. >
and 'a name =
Class : 'a class_name -> (< cast : 'a0. 'a0 name -> 'a0; .. > as 'a) name
diff --git a/testsuite/tests/typing-extensions/extensions.ml b/testsuite/tests/typing-extensions/extensions.ml
index edb14c8b22..f6d6c9005b 100644
--- a/testsuite/tests/typing-extensions/extensions.ml
+++ b/testsuite/tests/typing-extensions/extensions.ml
@@ -1,3 +1,5 @@
+(* Ignore OCAMLRUNPARAM=b to be reproducible *)
+Printexc.record_backtrace false;;
type foo = ..
;;
diff --git a/testsuite/tests/typing-extensions/extensions.ml.reference b/testsuite/tests/typing-extensions/extensions.ml.reference
index bd814df8a3..ea2cfb8cd2 100644
--- a/testsuite/tests/typing-extensions/extensions.ml.reference
+++ b/testsuite/tests/typing-extensions/extensions.ml.reference
@@ -1,4 +1,5 @@
+# - : unit = ()
# type foo = ..
# type foo += A | B of int
# val is_a : foo -> bool = <fun>
diff --git a/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml b/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml
index 78557072cc..2b52368e33 100644
--- a/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml
+++ b/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml
@@ -1,3 +1,6 @@
+(* Ignore OCAMLRUNPARAM=b to be reproducible *)
+Printexc.record_backtrace false;;
+
let () = print_endline "\n\
<----------------------------------------------------------------------\n\
To check the result file for this test, it suffices to look for \"val\"\n\
diff --git a/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml.reference b/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml.reference
index 2b9d4c2bd8..ece388aa20 100644
--- a/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml.reference
+++ b/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml.reference
@@ -1,5 +1,6 @@
-#
+# - : unit = ()
+#
<----------------------------------------------------------------------
To check the result file for this test, it suffices to look for "val"
lines corresponding to toplevel answers. If they start with
@@ -22,7 +23,7 @@ Warning 57: Ambiguous or-pattern variables under guard;
variable x may match different arguments. (See manual section 8.5)
val ambiguous_typical_example : expr * expr -> unit = <fun>
# Note that an Assert_failure is expected just below.
-# Exception: Assert_failure ("//toplevel//", 23, 6).
+# Exception: Assert_failure ("//toplevel//", 25, 6).
# val not_ambiguous__no_orpat : int option -> unit = <fun>
# val not_ambiguous__no_guard : [< `A | `B | `C ] -> unit = <fun>
# val not_ambiguous__no_patvar_in_guard :
diff --git a/testsuite/tests/typing-warnings/application.ml b/testsuite/tests/typing-warnings/application.ml
index a0c420616f..8948dc8cb2 100644
--- a/testsuite/tests/typing-warnings/application.ml
+++ b/testsuite/tests/typing-warnings/application.ml
@@ -1,2 +1,5 @@
+(* Ignore OCAMLRUNPARAM=b to be reproducible *)
+Printexc.record_backtrace false;;
+
let _ = ignore (+);;
let _ = raise Exit 3;;
diff --git a/testsuite/tests/typing-warnings/application.ml.reference b/testsuite/tests/typing-warnings/application.ml.reference
index da825fd089..d35fd40e39 100644
--- a/testsuite/tests/typing-warnings/application.ml.reference
+++ b/testsuite/tests/typing-warnings/application.ml.reference
@@ -1,5 +1,6 @@
-# Characters 15-18:
+# - : unit = ()
+# Characters 16-19:
let _ = ignore (+);;
^^^
Warning 5: this function application is partial,
diff --git a/testsuite/tests/typing-warnings/pr6872.ml b/testsuite/tests/typing-warnings/pr6872.ml
index 283af4ccd4..73870a02ec 100644
--- a/testsuite/tests/typing-warnings/pr6872.ml
+++ b/testsuite/tests/typing-warnings/pr6872.ml
@@ -1,3 +1,6 @@
+(* Ignore OCAMLRUNPARAM=b to be reproducible *)
+Printexc.record_backtrace false;;
+
exception A;;
type a = A;;
diff --git a/testsuite/tests/typing-warnings/pr6872.ml.principal.reference b/testsuite/tests/typing-warnings/pr6872.ml.principal.reference
index eaebf2253f..616b45485d 100644
--- a/testsuite/tests/typing-warnings/pr6872.ml.principal.reference
+++ b/testsuite/tests/typing-warnings/pr6872.ml.principal.reference
@@ -1,5 +1,6 @@
-# exception A
+# - : unit = ()
+# exception A
# type a = A
# Characters 1-2:
A;;
diff --git a/testsuite/tests/typing-warnings/pr6872.ml.reference b/testsuite/tests/typing-warnings/pr6872.ml.reference
index 7c0b350382..5cd4291f79 100644
--- a/testsuite/tests/typing-warnings/pr6872.ml.reference
+++ b/testsuite/tests/typing-warnings/pr6872.ml.reference
@@ -1,5 +1,6 @@
-# exception A
+# - : unit = ()
+# exception A
# type a = A
# Characters 1-2:
A;;
diff --git a/testsuite/tests/typing-warnings/pr7297.ml b/testsuite/tests/typing-warnings/pr7297.ml
index 64b6fd5ad6..f55c0a329b 100644
--- a/testsuite/tests/typing-warnings/pr7297.ml
+++ b/testsuite/tests/typing-warnings/pr7297.ml
@@ -1 +1,4 @@
+(* Ignore OCAMLRUNPARAM=b to be reproducible *)
+Printexc.record_backtrace false;;
+
let () = raise Exit; () ;; (* warn *)
diff --git a/testsuite/tests/typing-warnings/pr7297.ml.reference b/testsuite/tests/typing-warnings/pr7297.ml.reference
index 9c9dbdd061..bc8580fcb7 100644
--- a/testsuite/tests/typing-warnings/pr7297.ml.reference
+++ b/testsuite/tests/typing-warnings/pr7297.ml.reference
@@ -1,5 +1,6 @@
-# Characters 9-19:
+# - : unit = ()
+# Characters 10-20:
let () = raise Exit; () ;; (* warn *)
^^^^^^^^^^
Warning 21: this statement never returns (or has an unsound type.)