Skip to content

Commit

Permalink
Moving the SRA tests to a separate env (#1272)
Browse files Browse the repository at this point in the history
- moving the SRA tests to a separate test target
- moving the ENA tests to a separate test target
  • Loading branch information
Yossi Farjoun authored Feb 6, 2019
1 parent 3ae552f commit 52169ed
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
}
Expand Down
3 changes: 1 addition & 2 deletions src/test/java/htsjdk/TestClassDependenceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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....
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import java.io.IOException;

@Test(groups="ena")
public class EnaRefServiceTest extends HtsjdkTest {

@DataProvider(name="testEnaRefServiceData")
Expand Down
2 changes: 0 additions & 2 deletions src/test/java/htsjdk/samtools/sra/SRAQueryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,4 @@ public void testQueryCounts(String acc, String reference, int referenceStart, in

assertCorrectCountsOfMappedAndUnmappedRecords(samRecordIterator, expectedNumMapped, expectedNumUnmapped);
}


}

0 comments on commit 52169ed

Please sign in to comment.