Add a way to skip the Go bindings tests even when Go is configured in
authorChandler Carruth <chandlerc@gmail.com>
Thu, 10 Sep 2015 05:47:43 +0000 (05:47 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 10 Sep 2015 05:47:43 +0000 (05:47 +0000)
CMake.

The Go bindings tests in an unoptimized build take over 30 seconds for
me, making it the slowest test in 'check-llvm' by a factor of two.

I've only rigged this up fully to the CMake build. If someone is
interested in rigging it up to the autoconf build, they're welcome to do
so.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247243 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt
test/Bindings/Go/lit.local.cfg
test/Makefile
test/lit.site.cfg.in

index dac209765a89802f7faff9f2e2edc77599885670..cabb661dbd373055f36ff4454aff425b354cf016 100644 (file)
@@ -338,6 +338,7 @@ option(LLVM_INCLUDE_EXAMPLES "Generate build targets for the LLVM examples" ON)
 option(LLVM_BUILD_TESTS
   "Build LLVM unit tests. If OFF, just generate build targets." OFF)
 option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON)
 option(LLVM_BUILD_TESTS
   "Build LLVM unit tests. If OFF, just generate build targets." OFF)
 option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON)
+option(LLVM_INCLUDE_GO_TESTS "Include the Go bindings tests in test build targets." ON)
 
 option (LLVM_BUILD_DOCS "Build the llvm documentation." OFF)
 option (LLVM_INCLUDE_DOCS "Generate build targets for llvm documentation." ON)
 
 option (LLVM_BUILD_DOCS "Build the llvm documentation." OFF)
 option (LLVM_INCLUDE_DOCS "Generate build targets for llvm documentation." ON)
index e86595b8cb5631f15fa3eb2531db4e53303a242b..d68d867fb308f51800f4cf60598d35f7fd85fdb9 100644 (file)
@@ -6,6 +6,9 @@ import sys
 if not 'go' in config.root.llvm_bindings:
     config.unsupported = True
 
 if not 'go' in config.root.llvm_bindings:
     config.unsupported = True
 
+if config.root.include_go_tests != 'ON':
+    config.unsupported = True
+
 def find_executable(executable, path=None):
     if path is None:
         path = os.environ['PATH']
 def find_executable(executable, path=None):
     if path is None:
         path = os.environ['PATH']
index 9b37cedaaffd8ca0e6acdc23a25b0186cd797ecd..15843853b0147d83ac5b45d8462e335d019a5a66 100644 (file)
@@ -134,6 +134,7 @@ lit.site.cfg: FORCE
        @$(ECHOPATH) s!@OCAMLFLAGS@!$(addprefix -cclib ,$(LDFLAGS))!g >> lit.tmp
        @$(ECHOPATH) s=@HAVE_OCAMLOPT@=$(HAVE_OCAMLOPT)=g >> lit.tmp
        @$(ECHOPATH) s=@HAVE_OCAML_OUNIT@=$(HAVE_OCAML_OUNIT)=g >> lit.tmp
        @$(ECHOPATH) s!@OCAMLFLAGS@!$(addprefix -cclib ,$(LDFLAGS))!g >> lit.tmp
        @$(ECHOPATH) s=@HAVE_OCAMLOPT@=$(HAVE_OCAMLOPT)=g >> lit.tmp
        @$(ECHOPATH) s=@HAVE_OCAML_OUNIT@=$(HAVE_OCAML_OUNIT)=g >> lit.tmp
+       @$(ECHOPATH) s=@LLVM_INCLUDE_GO_TESTS@=ON=g >> lit.tmp
        @$(ECHOPATH) s=@GO_EXECUTABLE@=$(GO)=g >> lit.tmp
        @$(ECHOPATH) s!@HOST_CC@!$(CC)!g >> lit.tmp
        @$(ECHOPATH) s!@HOST_CXX@!$(CXX)!g >> lit.tmp
        @$(ECHOPATH) s=@GO_EXECUTABLE@=$(GO)=g >> lit.tmp
        @$(ECHOPATH) s!@HOST_CC@!$(CC)!g >> lit.tmp
        @$(ECHOPATH) s!@HOST_CXX@!$(CXX)!g >> lit.tmp
index a181037965882291134a1cfa3683165cbd43bd9e..13f5372ef7e3cee68aaf9209a69ebc6baba77dd5 100644 (file)
@@ -19,6 +19,7 @@ config.ocamlfind_executable = "@OCAMLFIND@"
 config.have_ocamlopt = "@HAVE_OCAMLOPT@"
 config.have_ocaml_ounit = "@HAVE_OCAML_OUNIT@"
 config.ocaml_flags = "@OCAMLFLAGS@"
 config.have_ocamlopt = "@HAVE_OCAMLOPT@"
 config.have_ocaml_ounit = "@HAVE_OCAML_OUNIT@"
 config.ocaml_flags = "@OCAMLFLAGS@"
+config.include_go_tests = "@LLVM_INCLUDE_GO_TESTS@"
 config.go_executable = "@GO_EXECUTABLE@"
 config.enable_shared = @ENABLE_SHARED@
 config.enable_assertions = @ENABLE_ASSERTIONS@
 config.go_executable = "@GO_EXECUTABLE@"
 config.enable_shared = @ENABLE_SHARED@
 config.enable_assertions = @ENABLE_ASSERTIONS@