From 0a248bf714f18b1cdcda5d7b811303c232d6e885 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 23 Aug 2013 00:55:32 +0000 Subject: [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 --- test/Bindings/Ocaml/analysis.ml | 5 ++++- test/Bindings/Ocaml/bitreader.ml | 5 ++++- test/Bindings/Ocaml/bitwriter.ml | 5 ++++- test/Bindings/Ocaml/executionengine.ml | 5 ++++- test/Bindings/Ocaml/ext_exc.ml | 5 ++++- test/Bindings/Ocaml/ipo_opts.ml | 5 ++++- test/Bindings/Ocaml/scalar_opts.ml | 5 ++++- test/Bindings/Ocaml/target.ml | 5 ++++- test/Bindings/Ocaml/vmcore.ml | 5 ++++- 9 files changed, 36 insertions(+), 9 deletions(-) (limited to 'test/Bindings') diff --git a/test/Bindings/Ocaml/analysis.ml b/test/Bindings/Ocaml/analysis.ml index 7df8e21..c02645c 100644 --- a/test/Bindings/Ocaml/analysis.ml +++ b/test/Bindings/Ocaml/analysis.ml @@ -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 *) diff --git a/test/Bindings/Ocaml/bitreader.ml b/test/Bindings/Ocaml/bitreader.ml index e5beccd..f1d202a 100644 --- a/test/Bindings/Ocaml/bitreader.ml +++ b/test/Bindings/Ocaml/bitreader.ml @@ -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 diff --git a/test/Bindings/Ocaml/bitwriter.ml b/test/Bindings/Ocaml/bitwriter.ml index 1388760..ae456cf 100644 --- a/test/Bindings/Ocaml/bitwriter.ml +++ b/test/Bindings/Ocaml/bitwriter.ml @@ -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 diff --git a/test/Bindings/Ocaml/executionengine.ml b/test/Bindings/Ocaml/executionengine.ml index f7a49bb..c33da62 100644 --- a/test/Bindings/Ocaml/executionengine.ml +++ b/test/Bindings/Ocaml/executionengine.ml @@ -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 *) diff --git a/test/Bindings/Ocaml/ext_exc.ml b/test/Bindings/Ocaml/ext_exc.ml index b4d2e6d..9afc3c3 100644 --- a/test/Bindings/Ocaml/ext_exc.ml +++ b/test/Bindings/Ocaml/ext_exc.ml @@ -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 %t.ll * RUN: FileCheck %s < %t.ll -- cgit v1.1