[PR11606] ocaml bindings tests produce binaries in source dir

- Workaround for ocamlopt producing outputs adjacent to its source inputs, by
   having the tests copy the inputs into temporary directories in the output
   paths before building.

 - Patch by edward-san.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189081 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2013-08-23 00:55:32 +00:00
parent 7feaf762f4
commit 0a248bf714
9 changed files with 36 additions and 9 deletions

View File

@ -1,4 +1,7 @@
(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_analysis.cmxa %s -o %t
(* RUN: rm -rf %t.builddir
* RUN: mkdir -p %t.builddir
* RUN: cp %s %t.builddir
* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_analysis.cmxa %t.builddir/analysis.ml -o %t
* RUN: %t
* XFAIL: vg_leak
*)

View File

@ -1,4 +1,7 @@
(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_bitreader.cmxa llvm_bitwriter.cmxa %s -o %t
(* RUN: rm -rf %t.builddir
* RUN: mkdir -p %t.builddir
* RUN: cp %s %t.builddir
* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_bitreader.cmxa llvm_bitwriter.cmxa %t.builddir/bitreader.ml -o %t
* RUN: %t %t.bc
* RUN: llvm-dis < %t.bc
* XFAIL: vg_leak

View File

@ -1,4 +1,7 @@
(* RUN: %ocamlopt -warn-error A unix.cmxa llvm.cmxa llvm_bitwriter.cmxa %s -o %t
(* RUN: rm -rf %t.builddir
* RUN: mkdir -p %t.builddir
* RUN: cp %s %t.builddir
* RUN: %ocamlopt -warn-error A unix.cmxa llvm.cmxa llvm_bitwriter.cmxa %t.builddir/bitwriter.ml -o %t
* RUN: %t %t.bc
* RUN: llvm-dis < %t.bc
* XFAIL: vg_leak

View File

@ -1,4 +1,7 @@
(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_target.cmxa llvm_executionengine.cmxa %s -o %t
(* RUN: rm -rf %t.builddir
* RUN: mkdir -p %t.builddir
* RUN: cp %s %t.builddir
* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_target.cmxa llvm_executionengine.cmxa %t.builddir/executionengine.ml -o %t
* RUN: %t
* XFAIL: vg_leak
*)

View File

@ -1,4 +1,7 @@
(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_bitreader.cmxa llvm_executionengine.cmxa %s -o %t
(* RUN: rm -rf %t.builddir
* RUN: mkdir -p %t.builddir
* RUN: cp %s %t.builddir
* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_bitreader.cmxa llvm_executionengine.cmxa %t.builddir/ext_exc.ml -o %t
* RUN: %t </dev/null
* XFAIL: vg_leak
*)

View File

@ -1,4 +1,7 @@
(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_ipo.cmxa llvm_target.cmxa %s -o %t
(* RUN: rm -rf %t.builddir
* RUN: mkdir -p %t.builddir
* RUN: cp %s %t.builddir
* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_ipo.cmxa llvm_target.cmxa %t.builddir/ipo_opts.ml -o %t
* RUN: %t %t.bc
* XFAIL: vg_leak
*)

View File

@ -1,4 +1,7 @@
(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_scalar_opts.cmxa llvm_target.cmxa %s -o %t
(* RUN: rm -rf %t.builddir
* RUN: mkdir -p %t.builddir
* RUN: cp %s %t.builddir
* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_scalar_opts.cmxa llvm_target.cmxa %t.builddir/scalar_opts.ml -o %t
* RUN: %t %t.bc
* XFAIL: vg_leak
*)

View File

@ -1,4 +1,7 @@
(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_target.cmxa %s -o %t
(* RUN: rm -rf %t.builddir
* RUN: mkdir -p %t.builddir
* RUN: cp %s %t.builddir
* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_target.cmxa %t.builddir/target.ml -o %t
* RUN: %t %t.bc
* XFAIL: vg_leak
*)

View File

@ -1,4 +1,7 @@
(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_analysis.cmxa llvm_bitwriter.cmxa %s -o %t
(* RUN: rm -rf %t.builddir
* RUN: mkdir -p %t.builddir
* RUN: cp %s %t.builddir
* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_analysis.cmxa llvm_bitwriter.cmxa %t.builddir/vmcore.ml -o %t
* RUN: %t %t.bc
* RUN: llvm-dis < %t.bc > %t.ll
* RUN: FileCheck %s < %t.ll