ctf: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / ctf / org.eclipse.tracecompass.ctf.core.tests / traces / get-traces.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3 Copyright (C) 2013, Red Hat, Inc. and others
4
5 All rights reserved. This program and the accompanying materials
6 are made available under the terms of the Eclipse Public License v1.0
7 which accompanies this distribution, and is available at
8 http://www.eclipse.org/legal/epl-v10.html
9 -->
10
11 <project name="Extract Traces" default="main" >
12 <target name="main">
13 <antcall>
14 <target name="checkAnyTraceExists"/>
15 <target name="verifyChecksum"/>
16 <target name="deleteFailedCheckSumTraces"/>
17 </antcall>
18 <antcall target="downloadTraceFiles"/>
19 <exec executable = "git" failifexecutionfails="false" timeout="20000">
20 <arg value = "clone"/>
21 <arg value = "https://github.com/efficios/ctf-testsuite.git"/>
22 </exec>
23 <condition property="testSuiteExists">
24 <and>
25 <available file="ctf-testsuite" type="dir"/>
26 </and>
27 </condition>
28 <antcall target="pullTestSuite"/>
29 <condition property="tracesExist">
30 <and>
31 <available file="sample-ctf-trace-20120412.tar.bz2"/>
32 <available file="trace2.tar.bz2"/>
33 <available file="kernel_vm.tar.bz2" />
34 <available file="synctraces.tar.gz" />
35 <available file="django-benchmark.tar.gz" />
36 <available file="hello-lost.tar.bz2" />
37 <available file="cyg-profile.tar.bz2" />
38 <available file="funky_trace.tar.bz2" />
39 <available file="bug446190.tar.bz2" />
40 <available file="flipping-endianness.tar.bz2" />
41 </and>
42 </condition>
43 <antcall target="extractTraces"/>
44 </target>
45
46 <target name="checkAnyTraceExists">
47 <pathconvert property="anyTraceExists" setonempty="false" pathsep=" ">
48 <path>
49 <fileset dir="." includes="*.tar.bz2" />
50 <fileset dir="." includes="*.tar.gz" />
51 <fileset dir="." includes="*.zip" />
52 </path>
53 </pathconvert>
54 </target>
55
56 <target name="verifyChecksum">
57 <echo message="Verifying: ${anyTraceExists}"/>
58 <condition property="failedCheckSum">
59 <and>
60 <isset property="anyTraceExists"/>
61 <not>
62 <and>
63 <checksum>
64 <fileset dir="." includes="*.tar.bz2" />
65 <fileset dir="." includes="*.tar.gz" />
66 <fileset dir="." includes="*.zip" />
67 </checksum>
68 </and>
69 </not>
70 </and>
71 </condition>
72 </target>
73
74
75 <target name="deleteFailedCheckSumTraces" if="failedCheckSum">
76 <echo message="Some traces have failed the checksum tests. Deleting traces."/>
77 <delete verbose="true">
78 <fileset dir="." includes="*.tar.bz2" />
79 <fileset dir="." includes="*.tar.gz" />
80 <fileset dir="." includes="*.zip" />
81 </delete>
82 </target>
83
84 <target name="warnFailedCheckSum" if="failedCheckSum">
85 <echo message="WARNING: Some downloaded traces failed the checkum."/>
86 </target>
87
88 <target name="downloadTraceFiles">
89 <echo message="Attempting to download test traces"/>
90 <get ignoreerrors="true" maxtime="60" skipexisting="true" dest="sample-ctf-trace-20120412.tar.bz2" src="http://archive.eclipse.org/tracecompass/test-traces/ctf/sample-ctf-trace-20120412.tar.bz2"/>
91 <get ignoreerrors="true" maxtime="60" skipexisting="true" dest="trace2.tar.bz2" src="http://archive.eclipse.org/tracecompass/test-traces/ctf/trace2.tar.bz2"/>
92 <get ignoreerrors="true" maxtime="60" skipexisting="true" dest="kernel_vm.tar.bz2" src="http://archive.eclipse.org/tracecompass/test-traces/ctf/kernel_vm.tar.bz2" />
93 <get ignoreerrors="true" maxtime="60" skipexisting="true" dest="synctraces.tar.gz" src="http://archive.eclipse.org/tracecompass/test-traces/ctf/synctraces.tar.gz" />
94 <get ignoreerrors="true" maxtime="200" skipexisting="true" dest="django-benchmark.tar.gz" src="http://archive.eclipse.org/tracecompass/test-traces/ctf/django-benchmark.tar.gz" />
95 <get ignoreerrors="true" maxtime="60" skipexisting="true" dest="hello-lost.tar.bz2" src="http://archive.eclipse.org/tracecompass/test-traces/ctf/hello-lost.tar.bz2" />
96 <get ignoreerrors="true" maxtime="60" skipexisting="true" dest="cyg-profile.tar.bz2" src="http://archive.eclipse.org/tracecompass/test-traces/ctf/cyg-profile.tar.bz2" />
97 <get ignoreerrors="true" maxtime="60" skipexisting="true" dest="funky_trace.tar.bz2" src="http://archive.eclipse.org/tracecompass/test-traces/ctf/funky_trace.tar.bz2" />
98 <get ignoreerrors="true" maxtime="200" skipexisting="true" dest="testtraceExp.zip" src="http://archive.eclipse.org/tracecompass/test-traces/ctf/testtraceExp.zip" />
99 <get ignoreerrors="true" maxtime="200" skipexisting="true" dest="bug446190.tar.bz2" src="http://archive.eclipse.org/tracecompass/test-traces/ctf/bug446190.tar.bz2" />
100 <get ignoreerrors="true" maxtime="200" skipexisting="true" dest="flipping-endianness.tar.bz2" src="http://archive.eclipse.org/tracecompass/test-traces/ctf/flipping-endianness.tar.bz2" />
101 </target>
102
103 <target name="pullTestSuite" if="testSuiteExists">
104 <!-- Update the local 'master' branch -->
105 <exec executable = "git" failifexecutionfails="false" dir="ctf-testsuite" timeout="20000">
106 <arg value = "checkout"/>
107 <arg value = "master"/>
108 </exec>
109 <exec executable = "git" failifexecutionfails="false" dir="ctf-testsuite" timeout="20000">
110 <arg value = "pull"/>
111 </exec>
112
113 <!-- Checkout the commit requested by the current build -->
114 <exec executable = "git" failifexecutionfails="false" dir="ctf-testsuite" timeout="20000">
115 <arg value = "checkout"/>
116 <arg value = "${ctf-test-suite-commit}"/>
117 </exec>
118 </target>
119
120 <target name="extractTraces" if="tracesExist">
121 <antcall>
122 <target name="checkAnyTraceExists"/>
123 <target name="verifyChecksum"/>
124 <target name="warnFailedCheckSum"/>
125 </antcall>
126 <bunzip2 src="sample-ctf-trace-20120412.tar.bz2"/>
127 <bunzip2 src="trace2.tar.bz2"/>
128 <bunzip2 src="kernel_vm.tar.bz2" />
129 <gunzip src="synctraces.tar.gz" />
130 <gunzip src="django-benchmark.tar.gz" />
131 <bunzip2 src="hello-lost.tar.bz2" />
132 <bunzip2 src="cyg-profile.tar.bz2" />
133 <bunzip2 src="funky_trace.tar.bz2" />
134 <bunzip2 src="bug446190.tar.bz2"/>
135 <bunzip2 src="flipping-endianness.tar.bz2"/>
136 <unzip src="testtraceExp.zip" dest="./exp" />
137
138 <untar src="sample-ctf-trace-20120412.tar" dest="." />
139 <untar src="trace2.tar" dest="." />
140 <untar src="kernel_vm.tar" dest="." />
141 <untar src="synctraces.tar" dest="." />
142 <untar src="django-benchmark.tar" dest="." />
143 <untar src="hello-lost.tar" dest="." />
144 <untar src="cyg-profile.tar" dest="." />
145 <untar src="funky_trace.tar" dest="." />
146 <untar src="bug446190.tar" dest="." />
147 <untar src="flipping-endianness.tar" dest="." />
148
149 <echo message="Traces extracted successfully"/>
150 </target>
151 </project>
This page took 0.03519 seconds and 5 git commands to generate.