Skip to content

Commit

Permalink
[PR11606] ocaml bindings tests produce binaries in source dir
Browse files Browse the repository at this point in the history
 - 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
  • Loading branch information
ddunbar committed Aug 23, 2013
1 parent 7feaf76 commit 0a248bf
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 9 deletions.
5 changes: 4 additions & 1 deletion test/Bindings/Ocaml/analysis.ml
Original file line number Diff line number Diff line change
@@ -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
*)
Expand Down
5 changes: 4 additions & 1 deletion test/Bindings/Ocaml/bitreader.ml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 4 additions & 1 deletion test/Bindings/Ocaml/bitwriter.ml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 4 additions & 1 deletion test/Bindings/Ocaml/executionengine.ml
Original file line number Diff line number Diff line change
@@ -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
*)
Expand Down
5 changes: 4 additions & 1 deletion test/Bindings/Ocaml/ext_exc.ml
Original file line number Diff line number Diff line change
@@ -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
*)
Expand Down
5 changes: 4 additions & 1 deletion test/Bindings/Ocaml/ipo_opts.ml
Original file line number Diff line number Diff line change
@@ -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
*)
Expand Down
5 changes: 4 additions & 1 deletion test/Bindings/Ocaml/scalar_opts.ml
Original file line number Diff line number Diff line change
@@ -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
*)
Expand Down
5 changes: 4 additions & 1 deletion test/Bindings/Ocaml/target.ml
Original file line number Diff line number Diff line change
@@ -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
*)
Expand Down
5 changes: 4 additions & 1 deletion test/Bindings/Ocaml/vmcore.ml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 0a248bf

Please sign in to comment.