Description: modify a few tests when requiring unpackaged tools
 junitx.framework is not packaged, the test files TestSplicedSamHelper.java and
 TestAlignmentReader.java, that use it, are deactivated in
 goby-distribution/pom.xml.
 We also exclude TestGobyPaperTop5000s.java in this pom, as data files that it
 uses are not provided in the source.
 Two tests in TestSamRecordParser are skipped for the same reason.
 One test in TestConcatAlignmentReader needs a file that does not exist.
 The tests in TestIterateSortedAlignment all use a file that does not exist.
 One test in TestSkipTo needs to use the network.
 One test in TestStatistics is skipped as it expects a Fisher test p-value
 greater than 0.05, which seems false after a check with R and also with a
 script using libdistlib-java.
 Tests in TestDiscoverSequenceVariantsIndelGenotypes and in
 TestDiscoverSequenceVariantsMode need genotype.jar or somatic.jar,
 which are not in this package nor in a dependency.
 .
 Also I removed some tests that fail even in a classic Maven build. Maybe this
 is wrong, but anyway they are not run in the classic Maven build and so I am
 unsure upstream has kept them up to date. I opened an issue at the link below.
 Ignored tests are:
 - three tests in TestConcatSortedAlignmentReader;
 - all tests in TestIteratedSortedAlignment2;
 - one test in TestRealignmentProcessor;
 - all tests in TestDiscoverSVMethylationRatesMode;
 - five tests in TestDiscoverSequenceVariantsMode;
 - three tests in TestLastToCompact;
 - one test in TestReformatCompactReadsMode;
 - one test in TestSortMode;
 - two tests in TestCompareGroupsVCFOutputFormat;
 - two tests in MergeIndelFromTest.
 .
 Finally, I removed the tests
 - in ConcatenateAlignmentModeTest.java (one test);
 - HTSJDKReaderImplTest.testReadingBAM;
 - HTSJDKReaderImplTest.testWithPosition;
 - HTSJDKReaderImplTest.testWithSlices;
 - TestConcatAlignmentReader.testConcatSamBam
 which succeed, but need a lot of large data files which I removed when
 repacking.
Author: Pierre Gruet <pgt@debian.org>
Forwarded: https://github.com/CampagneLaboratory/goby3/issues/3
Last-Update: 2021-08-18

--- a/goby-distribution/pom.xml
+++ b/goby-distribution/pom.xml
@@ -39,6 +39,10 @@
                 <configuration>
                     <source>${java.version}</source>
                     <target>${java.version}</target>
+                    <testExcludes>
+                        <exclude>**/TestSplicedSamHelper.java</exclude>
+                        <exclude>**/TestAlignmentReader.java</exclude>
+                    </testExcludes>
                 </configuration>
             </plugin>
             <plugin>
@@ -73,6 +77,19 @@
                 </executions>
             </plugin>
             <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>debian</version>
+                <configuration>
+                    <excludes>
+                        <exclude>**/TestGobyPaperTop5000s.java</exclude>
+                        <exclude>**/TestIterateSortedAlignment.java</exclude>
+                        <exclude>**/TestIteratedSortedAlignment2.java</exclude>
+                        <exclude>**/TestDiscoverSVMethylationRatesMode.java</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+            <plugin>
                 <artifactId>maven-assembly-plugin</artifactId>
                 <version>2.6</version>
                 <configuration>
--- a/goby-distribution/src/test/java/org/campagnelab/goby/readers/sam/TestSamRecordParser.java
+++ b/goby-distribution/src/test/java/org/campagnelab/goby/readers/sam/TestSamRecordParser.java
@@ -29,6 +29,7 @@
 import org.apache.commons.io.FilenameUtils;
 import org.slf4j.Logger;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.LoggerFactory;
 
@@ -425,6 +426,7 @@
      *
      * @throws IOException error
      */
+    @Ignore
     @Test
     public void testRoundTripTrickySpliced18() throws IOException {
         final RoundTripAlignment rtc = new RoundTripAlignment();
@@ -672,6 +674,7 @@
      *
      * @throws java.io.IOException error
      */
+    @Ignore
     @Test
     public void testTestTargetIndexCreation() throws IOException {
         final RoundTripAlignment rtc = new RoundTripAlignment();
--- a/goby-distribution/src/test/java/org/campagnelab/goby/alignments/TestConcatAlignmentReader.java
+++ b/goby-distribution/src/test/java/org/campagnelab/goby/alignments/TestConcatAlignmentReader.java
@@ -26,6 +26,7 @@
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.File;
@@ -338,6 +339,7 @@
     }
 
 
+    @Ignore
     @Test
     public void testLoadTwoFromFileURLs() throws IOException {
         final int count;
@@ -381,6 +383,7 @@
 
     }
 
+    @Ignore
     @Test
     public void testConcatSamBam() throws IOException {
         final int count;
--- a/goby-distribution/src/test/java/org/campagnelab/goby/alignments/TestSkipTo.java
+++ b/goby-distribution/src/test/java/org/campagnelab/goby/alignments/TestSkipTo.java
@@ -24,6 +24,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.DataInputStream;
@@ -439,6 +440,7 @@
 
     }
 
+    @Ignore
     @Test
     public void testUrlRange() throws IOException {
 
--- a/goby-distribution/src/test/java/org/campagnelab/goby/stats/TestStatistics.java
+++ b/goby-distribution/src/test/java/org/campagnelab/goby/stats/TestStatistics.java
@@ -25,6 +25,7 @@
 import org.apache.commons.math.MathException;
 import org.apache.commons.math.stat.inference.ChiSquareTest;
 import org.apache.commons.math.stat.inference.ChiSquareTestImpl;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.IOException;
@@ -120,6 +121,7 @@
         results.write(new PrintWriter("test-results/out-stats.tsv"), '\t', deCalc);
     }
 
+    @Ignore
     @Test
     public void testTwoStats() {
         final Random randomEngine = new Random(37);
--- a/goby-distribution/src/test/java/org/campagnelab/goby/alignments/TestConcatSortedAlignmentReader.java
+++ b/goby-distribution/src/test/java/org/campagnelab/goby/alignments/TestConcatSortedAlignmentReader.java
@@ -30,6 +30,7 @@
 
 import org.junit.Before;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.File;
@@ -65,6 +66,7 @@
     }
 
 
+    @Ignore
     @Test
     public void testSortConcatWithGenomicRange() throws IOException {
         final ConcatSortedAlignmentReader concat = new ConcatSortedAlignmentReader(basename1, basename2, basename3);
@@ -102,6 +104,7 @@
     }
 
 
+    @Ignore
     @Test
     public void testSortConcatWithGenomicRangeSmaller() throws IOException {
         final ConcatSortedAlignmentReader concat = new ConcatSortedAlignmentReader(basename1, basename2, basename3);
@@ -120,6 +123,7 @@
         }
     }
 
+    @Ignore
     @Test
     public void testSortConcatWithGenomicRangeSmaller2() throws IOException {
         final ConcatSortedAlignmentReader concat = new ConcatSortedAlignmentReader(basename1, basename2, basename3);
--- a/goby-distribution/src/test/java/org/campagnelab/goby/alignments/TestRealignmentProcessor.java
+++ b/goby-distribution/src/test/java/org/campagnelab/goby/alignments/TestRealignmentProcessor.java
@@ -32,6 +32,7 @@
 import org.campagnelab.goby.modes.AbstractAlignmentToCompactMode;
 import org.campagnelab.goby.reads.RandomAccessSequenceInterface;
 import org.campagnelab.goby.reads.RandomAccessSequenceTestSupport;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.IOException;
@@ -435,6 +436,7 @@
         }
     }
 
+    @Ignore
     @Test
     public void testCase9() {
         ObjectListIterator<Alignments.AlignmentEntry> iterator = new ObjectArrayList().iterator();
--- a/goby-distribution/src/test/java/org/campagnelab/goby/modes/TestDiscoverSequenceVariantsIndelGenotypes.java
+++ b/goby-distribution/src/test/java/org/campagnelab/goby/modes/TestDiscoverSequenceVariantsIndelGenotypes.java
@@ -36,6 +36,7 @@
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.*;
@@ -77,6 +78,7 @@
         mode.setTestGenome(genomeForTest);
     }
 
+    @Ignore
     @Test
     public void testDiscoverWithIndelSamples() throws IOException, JSAPException {
 
--- a/goby-distribution/src/test/java/org/campagnelab/goby/modes/TestDiscoverSequenceVariantsMode.java
+++ b/goby-distribution/src/test/java/org/campagnelab/goby/modes/TestDiscoverSequenceVariantsMode.java
@@ -49,6 +49,7 @@
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.*;
@@ -81,6 +82,7 @@
         //    assertNotNull("R engine must be available", GobyRengine.getInstance().getRengine());
     }
 
+    @Ignore
     @Test
     public void testDiscoverSomaticVariation() throws IOException, JSAPException {
 
@@ -212,6 +214,7 @@
         return dest;
     }
 
+    @Ignore
     @Test
     public void testDiscoverAlleleImbalance() throws IOException, JSAPException {
 
@@ -242,6 +245,7 @@
 
     }
 
+    @Ignore
     @Test
     public void testDiscoverCheckSampleCountAssociation() throws IOException, JSAPException {
 
@@ -552,6 +556,7 @@
     }
 
 
+    @Ignore
     @Test
     public void testGenotypes() throws IOException, JSAPException {
         DiscoverSequenceVariantsMode mode = new DiscoverSequenceVariantsMode();
@@ -572,6 +577,7 @@
 
     }
 
+    @Ignore
     @Test
     public void testQualityScoreAdjuster() {
         QualityScoreFilter adjuster = new QualityScoreFilter();
@@ -593,6 +599,7 @@
 
     }
 
+    @Ignore
     @Test
     public void testAdjustVarCount() {
         QualityScoreFilter adjuster1 = new QualityScoreFilter();
@@ -641,6 +648,7 @@
     }
 
 
+    @Ignore
     @Test
     public void testAdjustVarCount2() {
         QualityScoreFilter adjuster1 = new QualityScoreFilter();
--- a/goby-distribution/src/test/java/org/campagnelab/goby/modes/TestLastToCompact.java
+++ b/goby-distribution/src/test/java/org/campagnelab/goby/modes/TestLastToCompact.java
@@ -32,6 +32,7 @@
 import static org.junit.Assert.assertTrue;
 
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.File;
@@ -39,6 +40,7 @@
 import java.io.IOException;
 
 public class TestLastToCompact {
+    @Ignore
     @Test
     public void testLastToCompact1() throws IOException {
 
@@ -154,6 +156,7 @@
         reader.close();
     }
 
+    @Ignore
     @Test
     public void testLastToCompact2() throws IOException {
 
@@ -652,6 +655,7 @@
      *
      * @throws IOException
      */
+    @Ignore
     @Test
     public void testLastToCompactVariations() throws IOException {
 
--- a/goby-distribution/src/test/java/org/campagnelab/goby/modes/TestReformatCompactReadsMode.java
+++ b/goby-distribution/src/test/java/org/campagnelab/goby/modes/TestReformatCompactReadsMode.java
@@ -22,6 +22,7 @@
 import org.campagnelab.goby.reads.ReadsReader;
 import org.campagnelab.goby.reads.ReadsToTextWriter;
 import org.apache.commons.io.FileUtils;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.File;
@@ -385,6 +386,7 @@
      *
      * @throws IOException if there is a problem reading or writing to the files
      */
+    @Ignore
     @Test
     public void reformatTransferMetaData() throws IOException {
         final ReformatCompactReadsMode reformat = new ReformatCompactReadsMode();
--- a/goby-distribution/src/test/java/org/campagnelab/goby/modes/TestSortMode.java
+++ b/goby-distribution/src/test/java/org/campagnelab/goby/modes/TestSortMode.java
@@ -24,6 +24,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.File;
@@ -60,6 +61,7 @@
       //  FileUtils.forceDeleteOnExit(new File(BASE_TEST_DIR));
     }
 
+    @Ignore
     @Test
     // check that large-sort can sort a small alignment (only one split):
     public void sortSmall() throws IOException {
--- a/goby-distribution/src/test/java/org/campagnelab/goby/modes/formats/TestCompareGroupsVCFOutputFormat.java
+++ b/goby-distribution/src/test/java/org/campagnelab/goby/modes/formats/TestCompareGroupsVCFOutputFormat.java
@@ -33,6 +33,7 @@
 import org.easymock.EasyMock;
 import org.junit.Before;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.PrintWriter;
@@ -128,6 +129,7 @@
     }
 
 
+    @Ignore
     @Test
     public void testNoDifference() throws Exception {
         synchronized (GobyRengine.getInstance().getRengine()) {
@@ -154,6 +156,7 @@
     }
 
 
+    @Ignore
     @Test
     public void testAllelicDifference() throws Exception {
         synchronized (GobyRengine.getInstance().getRengine()) {
--- a/goby-distribution/src/test/java/org/campagnelab/goby/predictions/MergeIndelFromTest.java
+++ b/goby-distribution/src/test/java/org/campagnelab/goby/predictions/MergeIndelFromTest.java
@@ -2,6 +2,7 @@
 
 import it.unimi.dsi.fastutil.objects.ObjectArraySet;
 import org.campagnelab.goby.util.Variant;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import java.util.Set;
@@ -59,6 +60,7 @@
 */
 
 
+    @Ignore
     @Test
     public void longestTailInDeletion() {
         final Set<Variant.FromTo> fromTos = new ObjectArraySet<>(4);
@@ -128,6 +130,7 @@
  */
 
 
+    @Ignore
     @Test
     public void longestTailInInsertion() {
         final Set<Variant.FromTo> fromTos = new ObjectArraySet<>(4);
@@ -183,4 +186,4 @@
             assertNotNull(merge.mapped(originalAllele));
         }
     }
-}
\ No newline at end of file
+}
--- a/goby-distribution/src/test/java/org/campagnelab/goby/alignments/htsjdk/HTSJDKReaderImplTest.java
+++ b/goby-distribution/src/test/java/org/campagnelab/goby/alignments/htsjdk/HTSJDKReaderImplTest.java
@@ -2,6 +2,7 @@
 
 import org.campagnelab.goby.alignments.Alignments;
 import htsjdk.samtools.Defaults;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.File;
@@ -33,6 +34,7 @@
         assertEquals(2, count);
 
     }
+    @Ignore
     @Test
     public void testReadingBAM() throws IOException {
         //   String filename = "test-data/bam/Example.bam";
@@ -52,6 +54,7 @@
         assertEquals(1969065, count);
 
     }
+    @Ignore
     @Test
     public void testWithPosition() throws IOException {
         //   String filename = "test-data/bam/Example.bam";
@@ -83,6 +86,7 @@
 
     }
 
+    @Ignore
     @Test
     public void testWithSlices() throws IOException {
         //   String filename = "test-data/bam/Example.bam";
@@ -125,4 +129,4 @@
         assertEquals(2, count);
 
     }*/
-}
\ No newline at end of file
+}
--- a/goby-distribution/src/test/java/org/campagnelab/goby/modes/ConcatenateAlignmentModeTest.java
+++ b/goby-distribution/src/test/java/org/campagnelab/goby/modes/ConcatenateAlignmentModeTest.java
@@ -1,5 +1,6 @@
 package org.campagnelab.goby.modes;
 
+import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.File;
@@ -10,6 +11,7 @@
  * Created by fac2003 on 5/10/16.
  */
 public class ConcatenateAlignmentModeTest {
+    @Ignore
     @Test
     public void execute() throws Exception {
         ConcatenateAlignmentMode concatMode = new ConcatenateAlignmentMode();
@@ -18,4 +20,4 @@
         assertTrue(new File("test-results/dup.entries").exists());
     }
 
-}
\ No newline at end of file
+}
