diff --git a/.travis.yml b/.travis.yml index 45bc976612..a176d9b1b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,13 +14,19 @@ jdk: matrix: fast_finish: true allow_failures: + - env: TEST_TYPE=EXTERNAL_APIS - env: TEST_TYPE=FTP include: + - jdk: oraclejdk8 + env: TEST_TYPE=EXTERNAL_APIS - jdk: oraclejdk8 env: TEST_TYPE=FTP + script: - if [[ $TEST_TYPE == "FTP" ]]; then ./gradlew testFTP jacocoTestReport; + elif [[ $TEST_TYPE == "EXTERNAL_APIS" ]]; then + ./gradlew testExternalApis jacocoTestReport; else ./gradlew test jacocoTestReport; fi diff --git a/build.gradle b/build.gradle index 49ffec0051..6b272c171b 100644 --- a/build.gradle +++ b/build.gradle @@ -104,16 +104,14 @@ test { events "failed", "skipped" } - if (System.env.CI == "true") { - jvmArgs += '-Dsamjdk.sra_libraries_download=true' - } - tags { exclude "slow" exclude "broken" exclude "defaultReference" exclude "ftp" - if (System.env.CI == "false") exclude "sra" + exclude "sra" + exclude "ena" + if (!OperatingSystem.current().isUnix()) exclude "unix" } } dependsOn findScalaAndJavaTypes, testWithDefaultReference @@ -128,11 +126,13 @@ task testFTP(type: Test) { } } -task testSRA(type: Test) { - description = "Run the SRA tests" +task testExternalApis(type: Test) { + description = "Run the SRA and ENA tests (tests that interact with external APIs)" jvmArgs += '-Dsamjdk.sra_libraries_download=true' tags { + include "sra" + include "ena" exclude "slow" exclude "broken" } diff --git a/src/test/java/htsjdk/TestClassDependenceTest.java b/src/test/java/htsjdk/TestClassDependenceTest.java index 9ed9a1167e..f487b27747 100644 --- a/src/test/java/htsjdk/TestClassDependenceTest.java +++ b/src/test/java/htsjdk/TestClassDependenceTest.java @@ -21,8 +21,7 @@ */ public class TestClassDependenceTest extends HtsjdkTest { - - // since there are assertions inside the dataprovider, this test check that the dataprovider completes succeessfully. + // since there are assertions inside the dataprovider, this test checks that the dataprovider completes succeessfully. // This is needed since a failing data-provider will result in silently skipping the tests that rely on it. // This idea led to the creation of {@link TestDataProviders}, which renders it no-longer needed.... diff --git a/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java b/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java index ce505f485b..57aa108776 100644 --- a/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java +++ b/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java @@ -7,6 +7,7 @@ import java.io.IOException; +@Test(groups="ena") public class EnaRefServiceTest extends HtsjdkTest { @DataProvider(name="testEnaRefServiceData") diff --git a/src/test/java/htsjdk/samtools/sra/SRAQueryTest.java b/src/test/java/htsjdk/samtools/sra/SRAQueryTest.java index 575b3dd902..46674b6088 100644 --- a/src/test/java/htsjdk/samtools/sra/SRAQueryTest.java +++ b/src/test/java/htsjdk/samtools/sra/SRAQueryTest.java @@ -68,6 +68,4 @@ public void testQueryCounts(String acc, String reference, int referenceStart, in assertCorrectCountsOfMappedAndUnmappedRecords(samRecordIterator, expectedNumMapped, expectedNumUnmapped); } - - }