ctf: Provide a Maven property to specify a ctf-testsuite commit to use
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Fri, 8 May 2015 19:59:48 +0000 (15:59 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Fri, 8 May 2015 22:44:23 +0000 (18:44 -0400)
Instead of automatically pulling all changes from ctf-testsuite,
which may break our builds unexpectedly, we'll define a commit
to use in the plugin's pom.xml.

We can regularly update this pointer to pull in newer versions
of the test suite.

The property can also be overridden on the command-line, for
example using:

  mvn clean verify -DctfTestSuiteCommit=master

will use ctf-testsuite's master branch.

Change-Id: I06b8e11f12fec16d9c011f0f2a80b083fcadd8de
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/47554
Reviewed-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
org.eclipse.tracecompass.ctf.core.tests/pom.xml
org.eclipse.tracecompass.ctf.core.tests/traces/get-traces.xml

index 3c96042fadab80af2139cbb037437b83dac80ec5..536072b9f96b19a475ea650e952407338564d8cb 100644 (file)
   <version>1.0.0-SNAPSHOT</version>
   <packaging>eclipse-test-plugin</packaging>
 
+  <properties>
+    <ctfTestSuiteCommit>0f8beba86ae551f42adeb81d1bfddd5645f31013</ctfTestSuiteCommit>
+  </properties>
+
   <!-- Do not download the test traces if "maven.test.skip" is set -->
   <profiles>
     <profile>
@@ -47,6 +51,7 @@
                 <phase>pre-integration-test</phase>
                 <configuration>
                   <target>
+                    <property name="ctf-test-suite-commit" value="${ctfTestSuiteCommit}"/>
                     <ant antfile="get-traces.xml" dir="traces" />
                   </target>
                 </configuration>
index ea52b43ef133d8dd4de8ca08946b934e1e2fdc69..8c67ae78012657df5880dc8686516118cf78efcf 100644 (file)
 </target>
 
 <target name="pullTestSuite" if="testSuiteExists">
+  <!-- Update the local 'master' branch -->
+  <exec executable = "git" failifexecutionfails="false" dir="ctf-testsuite" timeout="20000">
+    <arg value = "checkout"/>
+    <arg value = "master"/>
+  </exec>
   <exec executable = "git" failifexecutionfails="false" dir="ctf-testsuite" timeout="20000">
     <arg value = "pull"/>
   </exec>
+
+  <!-- Checkout the commit requested by the current build -->
+  <exec executable = "git" failifexecutionfails="false" dir="ctf-testsuite" timeout="20000">
+    <arg value = "checkout"/>
+    <arg value = "${ctf-test-suite-commit}"/>
+  </exec>
 </target>
 
 <target name="extractTraces" if="tracesExist">
This page took 0.027778 seconds and 5 git commands to generate.