File: Exclude-some-tests.patch

package info (click to toggle)
starjava-table 3.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,560 kB
  • sloc: java: 26,746; xml: 480; makefile: 18; sh: 10
file content (145 lines) | stat: -rw-r--r-- 6,061 bytes parent folder | download
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
From: Ole Streicher <olebole@debian.org>
Date: Mon, 20 Feb 2017 11:01:05 +0100
Subject: Exclude some tests

FormatsTest and StorageTest depend on fits and votable, which shall
not be build-deps to avoid circular dependencies. So, during build we can't
test them. However, for CI tests we have everything available, and they
will be included in the test.

The FormatsTest needs to be adjusted to the supported formats.
---
 build.xml                                          | 11 +++++++
 .../uk/ac/starlink/table/FormatsTest.java          | 34 ----------------------
 2 files changed, 11 insertions(+), 34 deletions(-)

diff --git a/build.xml b/build.xml
index ff8149c..cdfd3ea 100644
--- a/build.xml
+++ b/build.xml
@@ -313,6 +313,11 @@
                classname="uk.ac.starlink.util.DataSource"/>
     <fail message="No Util available" unless="util.present"/>
 
+    <!-- Need Votable and Fits for some testcases, not essential -->
+    <available property="votable.present"
+               classpathref="classpath"
+               classname="uk.ac.starlink.votable.VOTableWriter"/>
+
     <!-- Need JUnit for testcases, not essential -->
     <available property="junit.present"
                classpathref="classpath"
@@ -929,6 +934,9 @@
 
       <classpath refid="tests-classpath"/>
       <exclude name="uk/ac/starlink/table/join/SkyPixellatorTest.java"/>
+      <exclude name="uk/ac/starlink/table/FormatsTest.java" unless="votable.present"/>
+      <exclude name="uk/ac/starlink/table/HealpixTest.java" unless="votable.present"/>
+      <exclude name="uk/ac/starlink/table/storage/StorageTest.java" unless="votable.present"/>
 
     </javac>
 
@@ -967,6 +975,9 @@
         <fileset dir="${tests.dir}">
           <include name="**/*Test*"/>
           <exclude name="uk/ac/starlink/table/join/SkyPixellatorTest.java"/>
+          <exclude name="uk/ac/starlink/table/FormatsTest.java" unless="votable.present"/>
+          <exclude name="uk/ac/starlink/table/HealpixTest.java" unless="votable.present"/>
+          <exclude name="uk/ac/starlink/table/storage/StorageTest.java" unless="votable.present"/>
         </fileset>
       </batchtest>
 
diff --git a/src/testcases/uk/ac/starlink/table/FormatsTest.java b/src/testcases/uk/ac/starlink/table/FormatsTest.java
index d5ca62c..1263c0f 100644
--- a/src/testcases/uk/ac/starlink/table/FormatsTest.java
+++ b/src/testcases/uk/ac/starlink/table/FormatsTest.java
@@ -17,10 +17,6 @@ import java.util.logging.Logger;
 import junit.framework.AssertionFailedError;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
-import uk.ac.starlink.ecsv.EcsvTableBuilder;
-import uk.ac.starlink.ecsv.EcsvTableWriter;
-import uk.ac.starlink.feather.FeatherTableBuilder;
-import uk.ac.starlink.feather.FeatherTableWriter;
 import uk.ac.starlink.fits.AbstractWideFits;
 import uk.ac.starlink.fits.BintableStarTable;
 import uk.ac.starlink.fits.ColFitsTableWriter;
@@ -92,8 +88,6 @@ public class FormatsTest extends TableCase {
         Logger.getLogger( "uk.ac.starlink.table" ).setLevel( Level.WARNING );
         Logger.getLogger( "uk.ac.starlink.fits" ).setLevel( Level.SEVERE );
         Logger.getLogger( "uk.ac.starlink.votable" ).setLevel( Level.WARNING );
-        Logger.getLogger( "uk.ac.starlink.feather" ).setLevel( Level.SEVERE );
-        Logger.getLogger( "uk.ac.starlink.ecsv" ).setLevel( Level.SEVERE );
 
         FitsConstants.configureHierarch();
     }
@@ -224,10 +218,6 @@ public class FormatsTest extends TableCase {
             "colfits-basic",
             "FITS",
             "VOTable",
-            "CDF",
-            "ECSV",
-            "feather",
-            "GBIN",
         };
         String[] knownFormats = new String[] {
             "FITS-plus",
@@ -235,10 +225,6 @@ public class FormatsTest extends TableCase {
             "colfits-basic",
             "FITS",
             "VOTable",
-            "CDF",
-            "ECSV",
-            "feather",
-            "GBIN",
             "ASCII",
             "CSV",
             "TST",
@@ -295,9 +281,6 @@ public class FormatsTest extends TableCase {
             "votable-binary-href",
             "votable-binary2-href",
             "votable-fits-inline",
-            "ecsv-space",
-            "ecsv-comma",
-            "feather",
             "text",
             "ascii",
             "csv",
@@ -308,7 +291,6 @@ public class FormatsTest extends TableCase {
             "html-element",
             "latex",
             "latex-document",
-            "mirage",
         };
         String[] gotFormats = new String[ handlers.size() ];
         for ( int j = 0; j < handlers.size(); j++ ) {
@@ -497,16 +479,6 @@ public class FormatsTest extends TableCase {
         }
         exerciseReadWrite( new VOTableWriter(),
                            new VOTableBuilder(), "votable" );
-        exerciseReadWrite( EcsvTableWriter.SPACE_WRITER,
-                           new EcsvTableBuilder(), "ecsv" );
-        exerciseReadWrite( EcsvTableWriter.COMMA_WRITER,
-                           new EcsvTableBuilder(), "ecsv" );
-        exerciseReadWrite(
-            new FeatherTableWriter( false, StoragePolicy.PREFER_MEMORY ),
-            new FeatherTableBuilder(), "feather" );
-        exerciseReadWrite(
-            new FeatherTableWriter( true, StoragePolicy.PREFER_MEMORY ),
-            new FeatherTableBuilder(), "feather" );
         exerciseReadWrite( new AsciiTableWriter(),
                            new AsciiTableBuilder(), "text" );
         exerciseReadWrite( new CsvTableWriter( true ),
@@ -564,12 +536,6 @@ public class FormatsTest extends TableCase {
         else if ( "ipac".equals( equalMethod ) ) {
             assertIpacTableEquals( t1, t2 );
         }
-        else if ( "ecsv".equals( equalMethod ) ) {
-            assertEcsvTableEquals( t1, t2 );
-        }
-        else if ( "feather".equals( equalMethod ) ) {
-            assertFeatherTableEquals( t1, t2 );
-        }
         else if ( "exact".equals( equalMethod ) ) {
             assertTableEquals( t1, t2 );
         }