Appending to md5db in the gatkdir, with additional logging.

This commit is contained in:
Khalid Shakir 2014-07-09 23:12:56 +08:00
parent 465c5ed9b0
commit a7d1904c63
4 changed files with 47 additions and 4 deletions

View File

@ -204,6 +204,10 @@
<includes>
<include>**/*UnitTest.class</include>
</includes>
<systemPropertyVariables>
<gatkdir>${gatk.basedir}</gatkdir>
<testType>unit</testType>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
@ -236,6 +240,10 @@
<includes>
<include>**/*IntegrationTest.class</include>
</includes>
<systemPropertyVariables>
<gatkdir>${gatk.basedir}</gatkdir>
<testType>integrationtest</testType>
</systemPropertyVariables>
</configuration>
</execution>
</executions>

View File

@ -424,6 +424,10 @@
<includes>
<include>**/*UnitTest.class</include>
</includes>
<systemPropertyVariables>
<gatkdir>${gatk.basedir}</gatkdir>
<testType>unit</testType>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
@ -474,6 +478,10 @@
<includes>
<include>**/*IntegrationTest.class</include>
</includes>
<systemPropertyVariables>
<gatkdir>${gatk.basedir}</gatkdir>
<testType>integration</testType>
</systemPropertyVariables>
</configuration>
</execution>
<execution>
@ -491,6 +499,10 @@
<includes>
<include>**/*QueueTest.class</include>
</includes>
<systemPropertyVariables>
<gatkdir>${gatk.basedir}</gatkdir>
<testType>queue</testType>
</systemPropertyVariables>
</configuration>
</execution>
<execution>
@ -507,6 +519,10 @@
<includes>
<include>**/*LargeScaleTest.class</include>
</includes>
<systemPropertyVariables>
<gatkdir>${gatk.basedir}</gatkdir>
<testType>largescale</testType>
</systemPropertyVariables>
</configuration>
</execution>
<execution>
@ -523,6 +539,10 @@
<includes>
<include>**/*KnowledgeBaseTest.class</include>
</includes>
<systemPropertyVariables>
<gatkdir>${gatk.basedir}</gatkdir>
<testType>knowledgebasetests</testType>
</systemPropertyVariables>
</configuration>
</execution>
</executions>

View File

@ -88,7 +88,10 @@ public abstract class BaseTest {
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";

View File

@ -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.baseDirectory + "integrationtests";
public static final String LOCAL_MD5_DB_DIR = BaseTest.gatkDirectory + "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,14 +65,26 @@ public class MD5DB {
ensureMd5DbDirectory();
logger.debug("Creating md5 mismatch db at " + MD5MismatchesFile);
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);
try {
md5MismatchStream = new PrintStream(new FileOutputStream(MD5MismatchesFile));
md5MismatchStream.printf("%s\t%s\t%s%n", "expected", "observed", "test");
md5MismatchStream = new PrintStream(new FileOutputStream(MD5MismatchesFile, true));
} 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() {