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>
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;
}