diff options
author | Rohan McGovern <rohan.mcgovern@nokia.com> | 2012-08-06 14:19:25 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-06 16:04:22 +0200 |
commit | efdc35b680f2700b0326f10708337ff52ddcc143 (patch) | |
tree | 107b393d49a3b77cb83986cfb4987d3bd774d3a6 /tests/baselineserver | |
parent | b170668bb88c076ddb5839c32f7bb947a1fbec96 (diff) |
lancelot: detect and handle Jenkins CI environment
Make the test behave in Jenkins similarly as it behaves in Pulse:
- a test run in Jenkins is not an ad-hoc run
- the JENKINS_HOME environment variable implies we are running in
Jenkins
- the GIT_BRANCH environment variable, set by the Jenkins git plugin,
is equivalent to PULSE_GIT_BRANCH
- there is no equivalent to PULSE_TESTR_BRANCH, since testr is no
longer used
Change-Id: I89ffeec659b4adaab309d8b93ad793ce640029c7
Reviewed-by: aavit <qt_aavit@ovi.com>
Diffstat (limited to 'tests/baselineserver')
-rw-r--r-- | tests/baselineserver/shared/baselineprotocol.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/baselineserver/shared/baselineprotocol.cpp b/tests/baselineserver/shared/baselineprotocol.cpp index a687c8d61b..1af5c76803 100644 --- a/tests/baselineserver/shared/baselineprotocol.cpp +++ b/tests/baselineserver/shared/baselineprotocol.cpp @@ -142,6 +142,14 @@ PlatformInfo PlatformInfo::localHostInfo() pi.insert(PI_PulseTestrBranch, QString::fromLatin1(tb)); pi.setAdHocRun(false); } + if (!qgetenv("JENKINS_HOME").isEmpty()) { + pi.setAdHocRun(false); + gb = qgetenv("GIT_BRANCH"); + if (!gb.isEmpty()) { + // FIXME: the string "Pulse" should be eliminated, since that is not the used tool. + pi.insert(PI_PulseGitBranch, QString::fromLatin1(gb)); + } + } return pi; } |