File: skyTest.xml

package info (click to toggle)
skyview 3.5.6%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,288 kB
  • sloc: java: 29,138; perl: 208; xml: 63; makefile: 19; sh: 1
file content (94 lines) | stat: -rw-r--r-- 3,850 bytes parent folder | download | duplicates (3)
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="SkyView" default="test">
    
    <!-- This testing script makes use of four environment variables:
           - BZIP_DECOMPRESSOR   This is used for rapid decompression of SDSS data and
                                 should normally be set to /usr/bin/bunzip2.
                                 It is required to be set for historical reasons.
           - MIN_TEST            The lowest test to be run.  Tests are numbered hierarchically
                                 as n.m.o.p...   so that e.g., 1.1.3 and might immediately follow 1.1.2 but
                                 there could be tests like 1.1.2.1, 1.1.2.2, 1.1.2.3, 1.1.3, ...
           - MAX_TEST            The highest test to run
           - NO_COMPARISON       If set then ignore the comparisons.setting file, run the tests
                                 and write out the hash values found.
      -->
    <description> The SkyView Virtual Observatory Java implementation </description>
    
    <property environment="env" />
    <property name="proj"     value="skyview" />
    <property name="ljar"     value="${env.jira}/ljar"  />
    <property name="fjar"     value="${env.jira}/fjar" />
    <property name="temp"     value="./skyviewtemp" />
    <property name="jar"      value="../jar/skyview.jar"    />
    <property name="browser"  value="firefox"    />
    
    <target name="test" depends="tclean,qtest" />
    
    <target name="tclean">
        <delete failonerror="false" >
	    <fileset dir="${temp}" />
	</delete>
    </target>
    
    <target name="qtest">
	<fail unless="env.BZIP_DECOMPRESSOR" message="BZIP_DECOMPRESSOR needs to be set to run SkyView Tests.  You can set it to a random string if you are not testing the SDSS DR8.
For a full test set it to /usr/bin/bunzip2" />
	
	<mkdir dir="${temp}" />
        <echo message="Making directory: ${temp}" />       
	
	<unzip src="${jar}" dest="${temp}">
	   <patternset>
	      <include name="skyview/test/comparison.settings" />
	      <include name="skyview/test/*.drw" />
	      <include name="skyview/test/*.fits" />
	   </patternset>
	   <mapper type="flatten" />
	</unzip>
	
	<echo message="Testing SkyView" />
        <java fork="true" maxmemory="512M" classname="org.junit.runner.JUnitCore" dir="${temp}">
	   <sysproperty key="java.awt.headless" value="true" />
           <classpath>
	      <pathelement location="." />
	      <pathelement location="${jar}" />
	      <pathelement location="${fjar}/junit-4.1.jar" />
	   </classpath>
	   
	   <arg value="skyview.test.NewTester"      />
	</java>

    </target>




    <target name="localtest">
	<!-- Test case for local jar file like skyview-in-a-jar getting a new survey from the web -->
	<copy file="${jar}" tofile="./skyview.jar"/>

	<java jar="./skyview.jar" fork="true">
	  <arg line="output=${temp}/hi4pi_m31.fits size=5,5 coordinates=galactic survey=hi4pi position=m31 projection=Car"/>
	</java>

	<java jar="./skyview.jar" fork="true">
	  <arg line="output=${temp}/foobar_m31.fits size=5,5 coordinates=galactic survey=foobar position=m31 projection=Car  XMLURLPREFIX=https://skyview.gsfc.nasa.gov/dummy_build/jar/"/>
	</java>

	<echo message=""/>
	<echo message="Now manually compare ${temp}/foobar_m31.fits ${temp}/hi4pi_m31.fits;  they should be mostly the same except a band of fudged pixels on the upper left of the foobar image."/>
	<echo message=""/>
    </target>

     <target name="webtest" >
       	<echo message="Testing SkyView - web tests" />
        <java classname="skyview.ops.webtests.SkyViewTests" >
           <classpath>
              <pathelement location="${fjar}/selenium-server-standalone-2.39.0.jar" />
              <pathelement location="${jar}" />
           </classpath>
           <arg value="${browser}" />
        </java>
    </target>

</project>