|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <!-- |
|
3 ============================================================================ |
|
4 Name : file-comparison.ant.xml |
|
5 Part of : Helium |
|
6 |
|
7 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
8 All rights reserved. |
|
9 This component and the accompanying materials are made available |
|
10 under the terms of the License "Eclipse Public License v1.0" |
|
11 which accompanies this distribution, and is available |
|
12 at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
13 |
|
14 Initial Contributors: |
|
15 Nokia Corporation - initial contribution. |
|
16 |
|
17 Contributors: |
|
18 |
|
19 Description: |
|
20 |
|
21 ============================================================================ |
|
22 --> |
|
23 <project name="quality.file-comparison" xmlns:hlm="http://www.nokia.com/helium"> |
|
24 <description> |
|
25 File comparison integration using Beyond Compare. |
|
26 </description> |
|
27 |
|
28 <property name="file-comparison.bcomp_path" location="C:\APPS\bc\BComp.exe" /> |
|
29 <property name="file-comparison.bcomp_conf" location="${helium.dir}/tools/quality/file-comparison/BCompare-config.txt" /> |
|
30 <property name="file-comparison.output" location="${build.output.dir}/file_comparison" /> |
|
31 <property name="file-comparison.left_name" value="left" /> |
|
32 <property name="file-comparison.right_name" value="right" /> |
|
33 <property name="file-comparison.regexp.from" value="(.*)" /> |
|
34 <property name="file-comparison.regexp.to" value="\1" /> |
|
35 |
|
36 <!-- |
|
37 Target to run the file-comparison with Beyond Compare. |
|
38 Compares two filesets: file-comparison.left_side and file-comparison.right_side. |
|
39 It is also possible to use regexps to replace text in file names. |
|
40 --> |
|
41 <target name="file-comparison"> |
|
42 <trycatch property="file-comparison.exception"> |
|
43 <try> |
|
44 <copy todir="${file-comparison.output}/${file-comparison.left_name}"> |
|
45 <fileset refid="file-comparison.left_side" /> |
|
46 <regexpmapper from="${file-comparison.regexp.from}" to="${file-comparison.regexp.to}" /> |
|
47 </copy> |
|
48 <copy todir="${file-comparison.output}/${file-comparison.right_name}"> |
|
49 <fileset refid="file-comparison.right_side" /> |
|
50 <regexpmapper from="${file-comparison.regexp.from}" to="${file-comparison.regexp.to}" /> |
|
51 </copy> |
|
52 <exec executable="${file-comparison.bcomp_path}"> |
|
53 <arg value="@${file-comparison.bcomp_conf}" /> |
|
54 <arg value="/closescript"/> |
|
55 <arg value="${file-comparison.output}/${file-comparison.left_name}" /> |
|
56 <arg value="${file-comparison.output}/${file-comparison.right_name}" /> |
|
57 <arg value="${file-comparison.output}/file_comparison_report" /> |
|
58 </exec> |
|
59 <delete dir="${file-comparison.output}/${file-comparison.left_name}" /> |
|
60 <delete dir="${file-comparison.output}/${file-comparison.right_name}" /> |
|
61 </try> |
|
62 <catch> |
|
63 <echo>WARNING: Caught exception in file-comparison target: ${file-comparison.exception}</echo> |
|
64 </catch> |
|
65 </trycatch> |
|
66 </target> |
|
67 |
|
68 </project> |