summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2012-08-06 14:19:25 +1000
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-17 01:58:42 +0200
commit2c874192548bc34fc1934d86dd92541752492d45 (patch)
tree817879f1de9adf029b49a1fefeedfbe132cc83d2 /tests
parentd8473681955bd96f8dd9cb22ad2597a9b7479d80 (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> (cherry picked from qtbase/efdc35b680f2700b0326f10708337ff52ddcc143) Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/arthur/common/baselineprotocol.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/arthur/common/baselineprotocol.cpp b/tests/arthur/common/baselineprotocol.cpp
index 47d8ab0175..43694bec68 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;
}