summaryrefslogtreecommitdiffstats
path: root/XQTS/ReportingResults/Build.xml
blob: 9d15ba83bd7a4e62c65a45a8417631aa4fcb7f26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!-- Ant Script                                                              -->
<!-- for more information, see http://ant.apache.org                         -->

<project name="Build XQTS Result Summary" default="createboth">
   
   <property name="catalog" location="..\XQTSCatalog.xml" />
   
   <property name="schema" location="XQTSResult.xsd" />
   
   <property
      name="schemaLocation"
      value="http://www.w3.org/2005/02/query-test-XQTSResult ${schema}" />
   
   <property name="results" location="Results.xml" />
   
   <property name="destination" location="." />
   
   <property name="title-annotation" value=""/>
   
   
   <target name="createboth">
      <antcall target="create"/>
      <antcall target="createsimple"/>
   </target>
   
   
   
   
   <target name="create">
      <tstamp>
         <format property="now" pattern="MM/dd/yyyy HH:mm" />
      </tstamp>
      
      <xslt
         in="${catalog}"
         out="${destination}/XQTSReport.html"
         destdir="${destination}"
         basedir="."
         style="XQTSResults.xsl"
         force="yes">
         <param name="creationDate" expression="${now}"/> 
         <param name="documentAuthor" expression="${user.name}"/> 
         <param name="resultFiles" expression="${results}"/> 
         <param name="title-annotation" expression="${title-annotation}"/>
      </xslt>     
   </target>
   
   
   
   
   <target name="createsimple">
      <tstamp>
         <format property="now" pattern="MM/dd/yyyy HH:mm" />
      </tstamp>
      
      <xslt
         in="${catalog}"
         out="${destination}/XQTSReportSimple.html"
         destdir="${destination}"
         basedir="."
         style="XQTSResults.xsl"
         force="yes">
         <param name="now" expression="${now}"/> 
         <param name="resultFiles" expression="${results}"/> 
         <param name="summary" expression="true"/>
         <param name="impdef" expression="false"/>
         <param name="details" expression="false"/>
         <param name="failures" expression="false"/> 
         <param name="test-run-details" expression="false"/>
         <param name="title-annotation" expression="${title-annotation}"/>
      </xslt>     
   </target>
   
   
   
   
   <target name='validate'>

      <!-- vaidate the result files that are in the same directory as the Results.xml file -->

      <xmlvalidate
         failonerror="yes"
         lenient="no"
         warn="yes"
         >
         <fileset dir="${results}/.." includes="*.xml">
            <contains text='http://www.w3.org/2005/02/query-test-XQTSResult' />
            <containsregexp expression='&lt;([^:]*[:])?test-suite-result' />
         </fileset>
         <attribute name="http://xml.org/sax/features/validation" value="true"/>
         <attribute name="http://apache.org/xml/features/validation/schema"  value="true"/>
         <attribute name="http://xml.org/sax/features/namespaces" value="true"/>
         <property name="http://apache.org/xml/properties/schema/external-schemaLocation" value="${schemaLocation}"/>
      </xmlvalidate>
   </target>
   
</project>