[PR11606] ocaml bindings tests produce binaries in source dir
authorDaniel Dunbar <daniel@zuster.org>
Fri, 23 Aug 2013 00:55:32 +0000 (00:55 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 23 Aug 2013 00:55:32 +0000 (00:55 +0000)
 - 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

test/Bindings/Ocaml/analysis.ml
test/Bindings/Ocaml/bitreader.ml
test/Bindings/Ocaml/bitwriter.ml
test/Bindings/Ocaml/executionengine.ml
test/Bindings/Ocaml/ext_exc.ml
test/Bindings/Ocaml/ipo_opts.ml
test/Bindings/Ocaml/scalar_opts.ml
test/Bindings/Ocaml/target.ml
test/Bindings/Ocaml/vmcore.ml

index 7df8e21203a9373b38772544c1b2ed3fadee1240..c02645c0bce3ce9b0cb4a9f6df9d4a7251b6a0a2 100644 (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
  *)
index e5beccd118bd84f1be1f05abae2b3814293d9cea..f1d202ab0490dee6119eeeebdc8985fcdd785eaf 100644 (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
index 138876001244e0593d75839d664873211fb811aa..ae456cf785c8cf0b44f2252ff0693469ef61b362 100644 (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
index f7a49bb284c0c4364b438d4db4a3939c16900872..c33da626cffb725106ea32b1da1cadcb3e4636c4 100644 (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
  *)
index b4d2e6dc64141df56bc8fd1b9486bc64a8139f42..9afc3c3ab4b243ef724f0a1395b4135493aee19c 100644 (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
  *)
index d4537e4413fbf0422a714e924f4c839fa110bd08..69577df8cd2ca2fd97f2e10088c467e4d672a7f3 100644 (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
  *)
index 0760dad4ad023ef130edca8d8c03e8cdec1d7c1a..506fdf0b720d49fba8ffadce9b31f8d95cd04e30 100644 (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
  *)
index 7a35a790ab3af9d463b63aed922a60f8d774448c..d2cace92643920b0bcd213fcf9c25fc924bc031b 100644 (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
  *)
index ccde1f00fca48e0df5b4402a73a93a47335ca441..0c4d0d62638acbacf5bdcfa7570a4c8885bb9b25 100644 (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