diff options
author | Rohan McGovern <rohan.mcgovern@nokia.com> | 2012-08-06 04:19:25 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-16 23:58:42 (GMT) |
commit | 2c874192548bc34fc1934d86dd92541752492d45 (patch) | |
tree | 817879f1de9adf029b49a1fefeedfbe132cc83d2 /tests | |
parent | d8473681955bd96f8dd9cb22ad2597a9b7479d80 (diff) | |
download | Qt-2c874192548bc34fc1934d86dd92541752492d45.zip Qt-2c874192548bc34fc1934d86dd92541752492d45.tar.gz Qt-2c874192548bc34fc1934d86dd92541752492d45.tar.bz2 |
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>
(cherry picked from qtbase/efdc35b680f2700b0326f10708337ff52ddcc143)
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/arthur/common/baselineprotocol.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/arthur/common/baselineprotocol.cpp b/tests/arthur/common/baselineprotocol.cpp index 47d8ab0..43694be 100644 --- a/tests/arthur/common/baselineprotocol.cpp +++ b/tests/arthur/common/baselineprotocol.cpp @@ -143,6 +143,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; } |