Merge pull request #682 from broadinstitute/ks_revert_md5_db_per_test
Reverting md5 db per test
This commit is contained in:
commit
4f4ff5c327
|
|
@ -204,10 +204,6 @@
|
|||
<includes>
|
||||
<include>**/*UnitTest.class</include>
|
||||
</includes>
|
||||
<systemPropertyVariables>
|
||||
<gatkdir>${gatk.basedir}</gatkdir>
|
||||
<testType>unit</testType>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
|
@ -240,10 +236,6 @@
|
|||
<includes>
|
||||
<include>**/*IntegrationTest.class</include>
|
||||
</includes>
|
||||
<systemPropertyVariables>
|
||||
<gatkdir>${gatk.basedir}</gatkdir>
|
||||
<testType>integrationtest</testType>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
|
|
|||
|
|
@ -424,10 +424,6 @@
|
|||
<includes>
|
||||
<include>**/*UnitTest.class</include>
|
||||
</includes>
|
||||
<systemPropertyVariables>
|
||||
<gatkdir>${gatk.basedir}</gatkdir>
|
||||
<testType>unit</testType>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
|
@ -478,10 +474,6 @@
|
|||
<includes>
|
||||
<include>**/*IntegrationTest.class</include>
|
||||
</includes>
|
||||
<systemPropertyVariables>
|
||||
<gatkdir>${gatk.basedir}</gatkdir>
|
||||
<testType>integration</testType>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
|
|
@ -499,10 +491,6 @@
|
|||
<includes>
|
||||
<include>**/*QueueTest.class</include>
|
||||
</includes>
|
||||
<systemPropertyVariables>
|
||||
<gatkdir>${gatk.basedir}</gatkdir>
|
||||
<testType>queue</testType>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
|
|
@ -519,10 +507,6 @@
|
|||
<includes>
|
||||
<include>**/*LargeScaleTest.class</include>
|
||||
</includes>
|
||||
<systemPropertyVariables>
|
||||
<gatkdir>${gatk.basedir}</gatkdir>
|
||||
<testType>largescale</testType>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
|
|
@ -539,10 +523,6 @@
|
|||
<includes>
|
||||
<include>**/*KnowledgeBaseTest.class</include>
|
||||
</includes>
|
||||
<systemPropertyVariables>
|
||||
<gatkdir>${gatk.basedir}</gatkdir>
|
||||
<testType>knowledgebasetests</testType>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
|
|
|||
|
|
@ -87,12 +87,6 @@ public abstract class BaseTest {
|
|||
/** our log, which we want to capture anything from org.broadinstitute.sting */
|
||||
public static final Logger logger = CommandLineUtils.getStingLogger();
|
||||
|
||||
private static final String CURRENT_DIRECTORY = System.getProperty("user.dir");
|
||||
public static final String gatkDirectory = System.getProperty("gatkdir", CURRENT_DIRECTORY) + "/";
|
||||
public static final String baseDirectory = System.getProperty("basedir", CURRENT_DIRECTORY) + "/";
|
||||
public static final String testType = System.getProperty("testType"); // May be null
|
||||
public static final String testTypeSubDirectory = testType == null ? "" : ("/" + testType); // May be empty
|
||||
|
||||
public static final String hg18Reference = "/seq/references/Homo_sapiens_assembly18/v0/Homo_sapiens_assembly18.fasta";
|
||||
public static final String hg19Reference = "/seq/references/Homo_sapiens_assembly19/v1/Homo_sapiens_assembly19.fasta";
|
||||
public static final String b36KGReference = "/humgen/1kg/reference/human_b36_both.fasta";
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public class MD5DB {
|
|||
*/
|
||||
private static final int MAX_RECORDS_TO_READ = 1000000;
|
||||
private static final int MAX_RAW_DIFFS_TO_SUMMARIZE = -1;
|
||||
public static final String LOCAL_MD5_DB_DIR = BaseTest.gatkDirectory + "integrationtests";
|
||||
public static final String LOCAL_MD5_DB_DIR = "integrationtests";
|
||||
public static final String GLOBAL_MD5_DB_DIR = "/humgen/gsa-hpprojects/GATK/data/integrationtests";
|
||||
|
||||
// tracking and emitting a data file of origina and new md5s
|
||||
|
|
@ -65,26 +65,14 @@ public class MD5DB {
|
|||
|
||||
ensureMd5DbDirectory();
|
||||
|
||||
boolean exists = MD5MismatchesFile.exists();
|
||||
|
||||
if (!exists) {
|
||||
logger.warn("Creating md5 mismatch db at " + MD5MismatchesFile);
|
||||
} else {
|
||||
logger.warn("Updating md5 mismatch db at " + MD5MismatchesFile);
|
||||
}
|
||||
logger.warn("GATK directory: " + BaseTest.gatkDirectory);
|
||||
logger.warn("Base directory: " + BaseTest.baseDirectory);
|
||||
logger.warn("Test type: " + BaseTest.testType);
|
||||
|
||||
logger.debug("Creating md5 mismatch db at " + MD5MismatchesFile);
|
||||
try {
|
||||
md5MismatchStream = new PrintStream(new FileOutputStream(MD5MismatchesFile, true));
|
||||
md5MismatchStream = new PrintStream(new FileOutputStream(MD5MismatchesFile));
|
||||
md5MismatchStream.printf("%s\t%s\t%s%n", "expected", "observed", "test");
|
||||
} catch ( FileNotFoundException e ) {
|
||||
throw new ReviewedGATKException("Failed to open md5 mismatch file", e);
|
||||
}
|
||||
|
||||
if (!exists) {
|
||||
md5MismatchStream.printf("%s\t%s\t%s%n", "expected", "observed", "test");
|
||||
}
|
||||
}
|
||||
|
||||
public void close() {
|
||||
|
|
@ -107,7 +95,7 @@ public class MD5DB {
|
|||
File dir = new File(LOCAL_MD5_DB_DIR);
|
||||
if ( ! dir.exists() ) {
|
||||
System.out.printf("##### Creating MD5 db %s%n", LOCAL_MD5_DB_DIR);
|
||||
if ( ! dir.mkdirs() ) {
|
||||
if ( ! dir.mkdir() ) {
|
||||
// Need to check AGAIN whether the dir exists, because we might be doing multi-process parallelism
|
||||
// within the same working directory, and another GATK instance may have come along and created the
|
||||
// directory between the calls to exists() and mkdir() above.
|
||||
|
|
|
|||
Loading…
Reference in New Issue