-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest.xml
More file actions
126 lines (109 loc) · 4.52 KB
/
test.xml
File metadata and controls
126 lines (109 loc) · 4.52 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?xml version="1.0" encoding="UTF-8"?>
<property name="test.dir" value="uk/co/westhawk/test"/>
<target name="runAgentTestSuite" description="Runs the agent test suite">
<property name="optim.dir" value="/project/OptimizeIt311/lib"/>
<property name="xmlfilerarg" value="agentIPv4.xml"/>
<!--
<property name="xmlfilerarg" value="agentIPv6.xml"/>
-->
<copy file="${src.dir}/${test.dir}/agent.dtd"
todir="${classes.dir}/${test.dir}"/>
<copy file="${src.dir}/${test.dir}/${xmlfilerarg}"
todir="${classes.dir}/${test.dir}"/>
<java classname="uk.co.westhawk.test.Agent"
fork="true">
<classpath>
<pathelement location="${table.jar}"/>
<pathelement location="${snmp.jar}"/>
<pathelement location="${classes.dir}"/>
<pathelement location="${optim.dir}/optit.jar"/>
</classpath>
<!-- 3 slashes are necessary, else it won't work on Windows! -->
<arg value="file:///${user.dir}/${classes.dir}/${test.dir}/${xmlfilerarg}"/>
</java>
</target>
<target name="runTestSuite" description="Runs the test suite">
<property name="optim.dir" value="/project/OptimizeIt311/lib"/>
<property name="xmlfilerarg" value="testIPv4.xml"/>
<!--
<property name="xmlfilerarg" value="testIPv6.xml"/>
-->
<copy file="${src.dir}/${test.dir}/test.dtd"
todir="${classes.dir}/${test.dir}"/>
<copy file="${src.dir}/${test.dir}/${xmlfilerarg}"
todir="${classes.dir}/${test.dir}"/>
<java classname="uk.co.westhawk.test.TestSuite"
fork="true">
<classpath>
<pathelement location="${table.jar}"/>
<pathelement location="${snmp.jar}"/>
<pathelement location="${classes.dir}"/>
<pathelement location="${optim.dir}/optit.jar"/>
</classpath>
<!-- 3 slashes are necessary, else it won't work on Windows! -->
<arg value="file:///${user.dir}/${classes.dir}/${test.dir}/${xmlfilerarg}"/>
</java>
</target>
<target name="runTrapTestSuite" description="Runs the trap test suite">
<property name="optim.dir" value="/project/OptimizeIt311/lib"/>
<property name="xmlfilerarg" value="trapIPv4.xml"/>
<!--
<property name="xmlfilerarg" value="trapIPv6.xml"/>
-->
<copy file="${src.dir}/${test.dir}/trap.dtd"
todir="${classes.dir}/${test.dir}"/>
<copy file="${src.dir}/${test.dir}/${xmlfilerarg}"
todir="${classes.dir}/${test.dir}"/>
<java classname="uk.co.westhawk.test.TrapTestSuite"
fork="true">
<classpath>
<pathelement location="${table.jar}"/>
<pathelement location="${snmp.jar}"/>
<pathelement location="${classes.dir}"/>
<pathelement location="${optim.dir}/optit.jar"/>
</classpath>
<!-- 3 slashes are necessary, else it won't work on Windows! -->
<arg value="file:///${user.dir}/${classes.dir}/${test.dir}/${xmlfilerarg}"/>
</java>
</target>
<target name="styleTests" description="Transform testsuite into readable html">
<style basedir="."
in="${src.dir}/${test.dir}/testIPv4.xml"
out="${src.dir}/${test.dir}/testIPv4.html"
style="${src.dir}/${test.dir}/testToHtml.xsl">
</style>
<style basedir="."
in="${src.dir}/${test.dir}/testIPv6.xml"
out="${src.dir}/${test.dir}/testIPv6.html"
style="${src.dir}/${test.dir}/testToHtml.xsl">
</style>
<style basedir="."
in="${src.dir}/${test.dir}/trapIPv4.xml"
out="${src.dir}/${test.dir}/trapIPv4.html"
style="${src.dir}/${test.dir}/trapToHtml.xsl">
</style>
<style basedir="."
in="${src.dir}/${test.dir}/trapIPv6.xml"
out="${src.dir}/${test.dir}/trapIPv6.html"
style="${src.dir}/${test.dir}/trapToHtml.xsl">
</style>
</target>
<target name="treeviewer" description="Views a XML file as a tree">
<property name="xerces.dir" value="/project/xerces-2_6_2"/>
<fileset id="xerces.jars" dir="${xerces.dir}">
<include name="xercesImpl.jar"/>
<include name="xercesSamples.jar"/>
<include name="xmlParserAPIs.jar"/>
</fileset>
<path id="xerces.classpath">
<fileset refid="xerces.jars"/>
</path>
<property name="xmlfilerarg" value="agentIPv4.xml"/>
<java classname="ui.TreeViewer"
fork="true">
<classpath>
<path refid="xerces.classpath"/>
</classpath>
<arg value="${src.dir}/${test.dir}/${xmlfilerarg}"/>
</java>
</target>