From 2993432ed653f7fbde6c8e05bef6803280740a71 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Wed, 8 Nov 2017 18:58:04 +0000 Subject: jenkins/build.py: Set SVN_REVISION for `build.py cmake` builds build.py cmake: copies together multiple repositories; the llvm cmake scripts are not able to automatically figure out the revision number because the resulting directory tree is not a repository anymore. Explicitly set the SVN_REVISION cmake property instead. git-svn-id: https://llvm.org/svn/llvm-project/zorg/trunk@317704 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/jenkins/test_build.py | 3 ++- zorg/jenkins/build.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/test/jenkins/test_build.py b/test/jenkins/test_build.py index 8e2c4c06..4caa4559 100644 --- a/test/jenkins/test_build.py +++ b/test/jenkins/test_build.py @@ -132,6 +132,7 @@ # CHECK-CMAKELTO-NOT:: '-DLLVM_ENABLE_LTO=Off # CHECK-CMAKELTO: '-DLLVM_PARALLEL_LINK_JOBS=1' # CHECK-CMAKELTO: '-DCMAKE_BUILD_TYPE=Release' +# CHECK-CMAKELTO: '-DSVN_REVISION=1234' # RUN: env MAX_PARALLEL_LINKS=2 python %{src_root}/zorg/jenkins/build.py cmake all --lto | FileCheck --check-prefix CHECK-CMAKE-PAR-LTO %s # CHECK-CMAKE-PAR-LTO: '/usr/local/bin/cmake' '-G' 'Ninja' @@ -170,4 +171,4 @@ # Test long should always do check-all, since that is what many bots expect. # RUN: python %{src_root}/zorg/jenkins/build.py cmake testlong | FileCheck --check-prefix CHECK-TTARGETS2 %s -# CHECK-TTARGETS2: '/usr/local/bin/ninja' '-v' '-k' '0' 'check-all' \ No newline at end of file +# CHECK-TTARGETS2: '/usr/local/bin/ninja' '-v' '-k' '0' 'check-all' diff --git a/zorg/jenkins/build.py b/zorg/jenkins/build.py index 97c39b50..c92cb398 100644 --- a/zorg/jenkins/build.py +++ b/zorg/jenkins/build.py @@ -260,6 +260,9 @@ def cmake_builder(target): if conf.globalisel: cmake_cmd += ["-DLLVM_BUILD_GLOBAL_ISEL=ON"] + if conf.svn_rev != 'NONE': + cmake_cmd += ["-DSVN_REVISION={}".format(conf.svn_rev)] + lit_flags = ['--xunit-xml-output=testresults.xunit.xml', '-v'] if conf.max_parallel_tests: lit_flags += ['-j', conf.max_parallel_tests] -- cgit v1.2.3