ctf: Depend on the tracecompass-test-traces project
[deliverable/tracecompass.git] / ctf / org.eclipse.tracecompass.ctf.core.tests / traces / get-traces.xml
CommitLineData
09e00e4a 1<?xml version="1.0" encoding="UTF-8" ?>
61dfcb35
AM
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
09e00e4a
AM
11<project name="Extract Traces" default="main" >
12<target name="main">
145d670f
MAL
13 <antcall>
14 <target name="checkAnyTraceExists"/>
15 <target name="verifyChecksum"/>
16 <target name="deleteFailedCheckSumTraces"/>
17 </antcall>
dcea0749 18 <antcall target="downloadTraceFiles"/>
09e00e4a
AM
19 <condition property="tracesExist">
20 <and>
e73a4ba5 21 <available file="synctraces.tar.gz" />
09e00e4a
AM
22 </and>
23 </condition>
24 <antcall target="extractTraces"/>
25</target>
26
145d670f
MAL
27<target name="checkAnyTraceExists">
28 <pathconvert property="anyTraceExists" setonempty="false" pathsep=" ">
29 <path>
145d670f 30 <fileset dir="." includes="*.tar.gz" />
145d670f
MAL
31 </path>
32 </pathconvert>
33</target>
34
35<target name="verifyChecksum">
36 <echo message="Verifying: ${anyTraceExists}"/>
37 <condition property="failedCheckSum">
38 <and>
39 <isset property="anyTraceExists"/>
40 <not>
41 <and>
42 <checksum>
145d670f 43 <fileset dir="." includes="*.tar.gz" />
145d670f
MAL
44 </checksum>
45 </and>
46 </not>
47 </and>
48 </condition>
49</target>
50
51
dcea0749
MAL
52<target name="deleteFailedCheckSumTraces" if="failedCheckSum">
53 <echo message="Some traces have failed the checksum tests. Deleting traces."/>
54 <delete verbose="true">
dcea0749 55 <fileset dir="." includes="*.tar.gz" />
dcea0749
MAL
56 </delete>
57</target>
58
145d670f 59<target name="warnFailedCheckSum" if="failedCheckSum">
dcea0749
MAL
60 <echo message="WARNING: Some downloaded traces failed the checkum."/>
61</target>
62
63<target name="downloadTraceFiles">
64 <echo message="Attempting to download test traces"/>
5fef1c2b 65 <get ignoreerrors="true" maxtime="60" skipexisting="true" dest="synctraces.tar.gz" src="http://archive.eclipse.org/tracecompass/test-traces/ctf/synctraces.tar.gz" />
4311ac8b
MAL
66</target>
67
09e00e4a 68<target name="extractTraces" if="tracesExist">
145d670f
MAL
69 <antcall>
70 <target name="checkAnyTraceExists"/>
71 <target name="verifyChecksum"/>
72 <target name="warnFailedCheckSum"/>
73 </antcall>
137828da 74 <gunzip src="synctraces.tar.gz" />
137828da 75 <untar src="synctraces.tar" dest="." />
137828da 76
09e00e4a
AM
77 <echo message="Traces extracted successfully"/>
78</target>
79</project>
This page took 0.083091 seconds and 5 git commands to generate.