From d6d49fd0e291a6c8e66242b4f7f18905b87a7e90 Mon Sep 17 00:00:00 2001 From: Peter Zotov Date: Thu, 30 Oct 2014 08:29:57 +0000 Subject: [PATCH] [OCaml] Enable backtraces in tests. llvm-svn: 220900 --- llvm/test/Bindings/Ocaml/analysis.ml | 2 +- llvm/test/Bindings/Ocaml/bitreader.ml | 2 +- llvm/test/Bindings/Ocaml/bitwriter.ml | 2 +- llvm/test/Bindings/Ocaml/executionengine.ml | 2 +- llvm/test/Bindings/Ocaml/ext_exc.ml | 2 +- llvm/test/Bindings/Ocaml/ipo_opts.ml | 2 +- llvm/test/Bindings/Ocaml/irreader.ml | 2 +- llvm/test/Bindings/Ocaml/linker.ml | 2 +- llvm/test/Bindings/Ocaml/passmgr_builder.ml | 2 +- llvm/test/Bindings/Ocaml/scalar_opts.ml | 2 +- llvm/test/Bindings/Ocaml/target.ml | 2 +- llvm/test/Bindings/Ocaml/vectorize_opts.ml | 2 +- llvm/test/Bindings/Ocaml/vmcore.ml | 2 +- llvm/test/lit.cfg | 3 +++ 14 files changed, 16 insertions(+), 13 deletions(-) diff --git a/llvm/test/Bindings/Ocaml/analysis.ml b/llvm/test/Bindings/Ocaml/analysis.ml index 84e1429..68d5d65 100644 --- a/llvm/test/Bindings/Ocaml/analysis.ml +++ b/llvm/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/llvm/test/Bindings/Ocaml/bitreader.ml b/llvm/test/Bindings/Ocaml/bitreader.ml index 28c04a6..81db543 100644 --- a/llvm/test/Bindings/Ocaml/bitreader.ml +++ b/llvm/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/llvm/test/Bindings/Ocaml/bitwriter.ml b/llvm/test/Bindings/Ocaml/bitwriter.ml index 7468365..5d77b83 100644 --- a/llvm/test/Bindings/Ocaml/bitwriter.ml +++ b/llvm/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/llvm/test/Bindings/Ocaml/executionengine.ml b/llvm/test/Bindings/Ocaml/executionengine.ml index 7d64f9f..5ef56f6 100644 --- a/llvm/test/Bindings/Ocaml/executionengine.ml +++ b/llvm/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/llvm/test/Bindings/Ocaml/ext_exc.ml b/llvm/test/Bindings/Ocaml/ext_exc.ml index c99bc04..7d40c28 100644 --- a/llvm/test/Bindings/Ocaml/ext_exc.ml +++ b/llvm/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/llvm/test/Bindings/Ocaml/ipo_opts.ml b/llvm/test/Bindings/Ocaml/ipo_opts.ml index 26037f2..e395424 100644 --- a/llvm/test/Bindings/Ocaml/ipo_opts.ml +++ b/llvm/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/llvm/test/Bindings/Ocaml/irreader.ml b/llvm/test/Bindings/Ocaml/irreader.ml index 52956c9..a64e01a 100644 --- a/llvm/test/Bindings/Ocaml/irreader.ml +++ b/llvm/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/llvm/test/Bindings/Ocaml/linker.ml b/llvm/test/Bindings/Ocaml/linker.ml index f859fdc..6ec87bf 100644 --- a/llvm/test/Bindings/Ocaml/linker.ml +++ b/llvm/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/llvm/test/Bindings/Ocaml/passmgr_builder.ml b/llvm/test/Bindings/Ocaml/passmgr_builder.ml index a711223..cc8e9fc 100644 --- a/llvm/test/Bindings/Ocaml/passmgr_builder.ml +++ b/llvm/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/llvm/test/Bindings/Ocaml/scalar_opts.ml b/llvm/test/Bindings/Ocaml/scalar_opts.ml index 9ca5361..c3b4f66 100644 --- a/llvm/test/Bindings/Ocaml/scalar_opts.ml +++ b/llvm/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/llvm/test/Bindings/Ocaml/target.ml b/llvm/test/Bindings/Ocaml/target.ml index 0a9738a..dfde7e8 100644 --- a/llvm/test/Bindings/Ocaml/target.ml +++ b/llvm/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/llvm/test/Bindings/Ocaml/vectorize_opts.ml b/llvm/test/Bindings/Ocaml/vectorize_opts.ml index 9c5e7d00..536adac 100644 --- a/llvm/test/Bindings/Ocaml/vectorize_opts.ml +++ b/llvm/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/llvm/test/Bindings/Ocaml/vmcore.ml b/llvm/test/Bindings/Ocaml/vmcore.ml index f1d27b4..dc48d37 100644 --- a/llvm/test/Bindings/Ocaml/vmcore.ml +++ b/llvm/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/llvm/test/lit.cfg b/llvm/test/lit.cfg index 4e9a5ad..af446b2 100644 --- a/llvm/test/lit.cfg +++ b/llvm/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 -- 2.7.4