From: Peter Zotov Date: Thu, 30 Oct 2014 08:29:57 +0000 (+0000) Subject: [OCaml] Enable backtraces in tests. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=d1fc3a020d0927d468b779a7433955b30e08de9b [OCaml] Enable backtraces in tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220900 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Bindings/Ocaml/analysis.ml b/test/Bindings/Ocaml/analysis.ml index 84e1429279a..68d5d65e122 100644 --- a/test/Bindings/Ocaml/analysis.ml +++ b/test/Bindings/Ocaml/analysis.ml @@ -1,5 +1,5 @@ (* RUN: cp %s %T/analysis.ml - * RUN: %ocamlcomp -warn-error A -package llvm.analysis -linkpkg %T/analysis.ml -o %t + * RUN: %ocamlcomp -g -warn-error A -package llvm.analysis -linkpkg %T/analysis.ml -o %t * RUN: %t * XFAIL: vg_leak *) diff --git a/test/Bindings/Ocaml/bitreader.ml b/test/Bindings/Ocaml/bitreader.ml index 28c04a6abc0..81db5431aef 100644 --- a/test/Bindings/Ocaml/bitreader.ml +++ b/test/Bindings/Ocaml/bitreader.ml @@ -1,5 +1,5 @@ (* RUN: cp %s %T/bitreader.ml - * RUN: %ocamlcomp -warn-error A -package llvm.bitreader -package llvm.bitwriter -linkpkg %T/bitreader.ml -o %t + * RUN: %ocamlcomp -g -warn-error A -package llvm.bitreader -package llvm.bitwriter -linkpkg %T/bitreader.ml -o %t * RUN: %t %t.bc * RUN: llvm-dis < %t.bc * XFAIL: vg_leak diff --git a/test/Bindings/Ocaml/bitwriter.ml b/test/Bindings/Ocaml/bitwriter.ml index 746836508eb..5d77b83bd6e 100644 --- a/test/Bindings/Ocaml/bitwriter.ml +++ b/test/Bindings/Ocaml/bitwriter.ml @@ -1,5 +1,5 @@ (* RUN: cp %s %T/bitwriter.ml - * RUN: %ocamlcomp -warn-error A -package llvm.bitreader -package llvm.bitwriter -linkpkg %T/bitwriter.ml -o %t + * RUN: %ocamlcomp -g -warn-error A -package llvm.bitreader -package llvm.bitwriter -linkpkg %T/bitwriter.ml -o %t * RUN: %t %t.bc * RUN: llvm-dis < %t.bc * XFAIL: vg_leak diff --git a/test/Bindings/Ocaml/executionengine.ml b/test/Bindings/Ocaml/executionengine.ml index 7d64f9f7f76..5ef56f63e73 100644 --- a/test/Bindings/Ocaml/executionengine.ml +++ b/test/Bindings/Ocaml/executionengine.ml @@ -1,5 +1,5 @@ (* RUN: cp %s %T/executionengine.ml - * RUN: %ocamlcomp -warn-error A -package llvm.executionengine -linkpkg %T/executionengine.ml -o %t + * RUN: %ocamlcomp -g -warn-error A -package llvm.executionengine -linkpkg %T/executionengine.ml -o %t * RUN: %t * REQUIRES: native, object-emission * XFAIL: vg_leak diff --git a/test/Bindings/Ocaml/ext_exc.ml b/test/Bindings/Ocaml/ext_exc.ml index c99bc04333f..7d40c2847a6 100644 --- a/test/Bindings/Ocaml/ext_exc.ml +++ b/test/Bindings/Ocaml/ext_exc.ml @@ -1,5 +1,5 @@ (* RUN: cp %s %T/ext_exc.ml - * RUN: %ocamlcomp -warn-error A -package llvm.bitreader -linkpkg %T/ext_exc.ml -o %t + * RUN: %ocamlcomp -g -warn-error A -package llvm.bitreader -linkpkg %T/ext_exc.ml -o %t * RUN: %t * XFAIL: vg_leak *) diff --git a/test/Bindings/Ocaml/ipo_opts.ml b/test/Bindings/Ocaml/ipo_opts.ml index 26037f2fd93..e395424d334 100644 --- a/test/Bindings/Ocaml/ipo_opts.ml +++ b/test/Bindings/Ocaml/ipo_opts.ml @@ -1,5 +1,5 @@ (* RUN: cp %s %T/ipo_opts.ml - * RUN: %ocamlcomp -warn-error A -package llvm.ipo -linkpkg %T/ipo_opts.ml -o %t + * RUN: %ocamlcomp -g -warn-error A -package llvm.ipo -linkpkg %T/ipo_opts.ml -o %t * RUN: %t %t.bc * XFAIL: vg_leak *) diff --git a/test/Bindings/Ocaml/irreader.ml b/test/Bindings/Ocaml/irreader.ml index 52956c9fee4..a64e01a4013 100644 --- a/test/Bindings/Ocaml/irreader.ml +++ b/test/Bindings/Ocaml/irreader.ml @@ -1,5 +1,5 @@ (* RUN: cp %s %T/irreader.ml - * RUN: %ocamlcomp -warn-error A -package llvm.irreader -linkpkg %T/irreader.ml -o %t + * RUN: %ocamlcomp -g -warn-error A -package llvm.irreader -linkpkg %T/irreader.ml -o %t * RUN: %t * XFAIL: vg_leak *) diff --git a/test/Bindings/Ocaml/linker.ml b/test/Bindings/Ocaml/linker.ml index f859fdc5cf6..6ec87bfc5c2 100644 --- a/test/Bindings/Ocaml/linker.ml +++ b/test/Bindings/Ocaml/linker.ml @@ -1,5 +1,5 @@ (* RUN: cp %s %T/linker.ml - * RUN: %ocamlcomp -warn-error A -package llvm.linker -linkpkg %T/linker.ml -o %t + * RUN: %ocamlcomp -g -warn-error A -package llvm.linker -linkpkg %T/linker.ml -o %t * RUN: %t * XFAIL: vg_leak *) diff --git a/test/Bindings/Ocaml/passmgr_builder.ml b/test/Bindings/Ocaml/passmgr_builder.ml index a7112231562..cc8e9fcb0d0 100644 --- a/test/Bindings/Ocaml/passmgr_builder.ml +++ b/test/Bindings/Ocaml/passmgr_builder.ml @@ -1,5 +1,5 @@ (* RUN: cp %s %T/passmgr_builder.ml - * RUN: %ocamlcomp -warn-error A -package llvm.passmgr_builder -linkpkg %T/passmgr_builder.ml -o %t + * RUN: %ocamlcomp -g -warn-error A -package llvm.passmgr_builder -linkpkg %T/passmgr_builder.ml -o %t * RUN: %t %t.bc * XFAIL: vg_leak *) diff --git a/test/Bindings/Ocaml/scalar_opts.ml b/test/Bindings/Ocaml/scalar_opts.ml index 9ca53616dc4..c3b4f6673ee 100644 --- a/test/Bindings/Ocaml/scalar_opts.ml +++ b/test/Bindings/Ocaml/scalar_opts.ml @@ -1,5 +1,5 @@ (* RUN: cp %s %T/scalar_opts.ml - * RUN: %ocamlcomp -warn-error A -package llvm.scalar_opts -linkpkg %T/scalar_opts.ml -o %t + * RUN: %ocamlcomp -g -warn-error A -package llvm.scalar_opts -linkpkg %T/scalar_opts.ml -o %t * RUN: %t %t.bc * XFAIL: vg_leak *) diff --git a/test/Bindings/Ocaml/target.ml b/test/Bindings/Ocaml/target.ml index 0a9738a35f4..dfde7e83439 100644 --- a/test/Bindings/Ocaml/target.ml +++ b/test/Bindings/Ocaml/target.ml @@ -1,5 +1,5 @@ (* RUN: cp %s %T/target.ml - * RUN: %ocamlcomp -warn-error A -package llvm.target -package llvm.executionengine -linkpkg %T/target.ml -o %t + * RUN: %ocamlcomp -g -warn-error A -package llvm.target -package llvm.executionengine -linkpkg %T/target.ml -o %t * RUN: %t %t.bc * REQUIRES: native, object-emission * XFAIL: vg_leak diff --git a/test/Bindings/Ocaml/vectorize_opts.ml b/test/Bindings/Ocaml/vectorize_opts.ml index 9c5e7d00575..536adac8c33 100644 --- a/test/Bindings/Ocaml/vectorize_opts.ml +++ b/test/Bindings/Ocaml/vectorize_opts.ml @@ -1,5 +1,5 @@ (* RUN: cp %s %T/vectorize_opts.ml - * RUN: %ocamlcomp -warn-error A -package llvm.vectorize -linkpkg %T/vectorize_opts.ml -o %t + * RUN: %ocamlcomp -g -warn-error A -package llvm.vectorize -linkpkg %T/vectorize_opts.ml -o %t * RUN: %t %t.bc * XFAIL: vg_leak *) diff --git a/test/Bindings/Ocaml/vmcore.ml b/test/Bindings/Ocaml/vmcore.ml index f1d27b47a2a..dc48d370ed0 100644 --- a/test/Bindings/Ocaml/vmcore.ml +++ b/test/Bindings/Ocaml/vmcore.ml @@ -1,5 +1,5 @@ (* RUN: cp %s %T/vmcore.ml - * RUN: %ocamlcomp -warn-error A -package llvm.analysis -package llvm.bitwriter -linkpkg %T/vmcore.ml -o %t + * RUN: %ocamlcomp -g -warn-error A -package llvm.analysis -package llvm.bitwriter -linkpkg %T/vmcore.ml -o %t * RUN: %t %t.bc * RUN: llvm-dis < %t.bc > %t.ll * RUN: FileCheck %s < %t.ll diff --git a/test/lit.cfg b/test/lit.cfg index 4e9a5ad6efa..af446b26ec3 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -108,6 +108,9 @@ if 'OCAMLPATH' in os.environ: else: config.environment['OCAMLPATH'] = llvm_ocaml_lib +# Set up OCAMLRUNPARAM to enable backtraces in OCaml tests. +config.environment['OCAMLRUNPARAM'] = 'b' + ### import os