Commit Graph

290 Commits (fdfe4e41d5d8c92fad74f56e654992f3a97ab602)

Author SHA1 Message Date
David Roazen ed4f19d79b Restore scala compilation by default in build.xml
-This was accidentally clobbered in a recent commit.

-If you want to compile Java-only, easiest thing to
 do is run "ant gatk" rather than modifying build.xml
2013-05-31 11:28:29 -04:00
Chris Hartl 199476eae1 Three squashed commits:
1) Add in checks for input parameters in MathUtils method. I was careful to use the bottom-level methods whenever possible, so that parameters don't needlessly go through multiple checks (so for instance, the parameters n and k for a binomial aren't checked on log10binomial, but rather in the log10binomialcoefficient subroutine).

This addresses JIRA GSA-767

Unit tests pass (we'll let bamboo deal with the integrations)

2) Address reviewer comments (change UserExceptions to IllegalArgumentExceptions).

3) .isWellFormedDouble() tests for infinity and not strictly positive infinity. Allow negative-infinity values for log10sumlog10 (as these just correspond to p=0).

After these commits, unit and integration tests now pass, and GSA-767 is done.

rebase and fix conflict:

public/java/src/org/broadinstitute/sting/utils/MathUtils.java
2013-05-31 00:26:50 -04:00
David Roazen 639030bd6d Enable convenient display of diff engine output in Bamboo, plus misc. minor test-related improvements
-Diff engine output is now included in the actual exception message thrown as a
 result of an MD5 mismatch, which allows it to be conveniently viewed on the
 main page of a build in Bamboo.

Minor Additional Improvements:

-WalkerTestSpec now auto-detects test class name via new JVMUtils.getCallingClass()
 method, and the test class name is now included as a regular part of integration
 test output for each test.

-Fix race condition in MD5DB.ensureMd5DbDirectory()

-integrationtests dir is now cleaned by "ant clean"

GSA-915 #resolve
2013-05-10 19:00:33 -04:00
David Roazen 3390fc7d67 Include cofoja jar in classpath when testing release jars
-Even though we're no longer compiling/using contracts in tests,
 we still need the cofoja jar in the classpath when testing the
 release jars due to some bad behavior on the part of TestNG in
 not being able to handle missing annotation classes.

-We don't need to package the cofoja classes in the actual GATK
 jar, however (and we never have).
2013-04-30 22:16:58 -04:00
Jacob Silterra 75184614c6 Add additional necessary class files to na12878kb.jar target 2013-04-23 14:03:48 -04:00
David Roazen 6197078c5d Disable Contracts for Java for tests
-cofoja is not compatible with Java 7, so we're forced to disable
 it for now until a replacement can be found
2013-04-04 11:56:17 -04:00
David Roazen 3ab78543a7 Fix tests that were consistently or intermittently failing when run in parallel on the farm
-Make MaxRuntimeIntegrationTest more lenient by assuming that startup overhead
 might be as long as 120 seconds on a very slow node, rather than the original
 assumption of 20 seconds

-In TraverseActiveRegionsUnitTest, write temp bam file to the temp directory, not
 to the current working directory

-SimpleTimerUnitTest: This test was internally inconsistent. It asserted that
 a particular operation should take no more than 10 milliseconds, and then asserted
 again that this same operation should take no more than 100 microseconds (= 0.1 millisecond).
 On a slow node it could take slightly longer than 100 microseconds, however.
 Changed the test to assert that the operation should require no more than 10000 microseconds
 (= 10 milliseconds)

-change global default test timeout from 20 to 40 minutes (things just take longer
 on the farm!)

-build.xml: allow runtestonly target to work with scala test classes
2013-03-06 13:56:54 -05:00
David Roazen a0be74c2ef Ant target to package a GATK jar with private included
Needed before we can start emitting full unstable jars from
Bamboo for our internal use.
2013-03-01 15:33:59 -05:00
David Roazen e6ac94fd75 Experimental script to run tests using class-level parallelism on the farm
-script to dispatch one farm job per test class and monitor jobs until completion

-new ant target to run tests without doing ANY compilation or extra steps at all
 allows multiple instances of the test suite to share the same working directory
2013-02-28 16:51:58 -05:00
Mauricio Carneiro 4ac50c89ad Updating TestNG to the latest version
-- changed SkipException constructors that are now private in TestNG
-- Updated build.xml to use the latest testng
-- Added guice dependency to ivy
-- Fixed broken SampleDBUnitTest

The SampleDBUnitTest was only passing before because the map comparison in the old TestNG was broken. It was comparing two DIFFERENT samples and testing for "equals"

GSA-695 #resolve
2013-02-22 09:40:23 -05:00
David Roazen df142a389f Minor build.xml cleanup post-variant-migration
-Stop emitting our own (now empty) variant jar
-Correct BaseUtils package for the na12878kb jar
2013-02-06 11:16:52 -05:00
David Roazen 6ec1e613a2 Move AWS keys to a resources subdirectory within the phonehome package
Resources must be in a subdirectory called "resources" in the package
hierarchy to be picked up by the packaging system. Adding each resource
manually to the jars in build.xml does not cause the resource to be
added to the standalone GATK jar when we package the GATK, so it's best
to always use this convention.
2013-01-31 11:56:34 -05:00
Mark DePristo b707331332 Encrypt GATK AWS keys using the GATK private key, and decrypt as needed as a resource when uploading to AWS logs
-- Has the overall effect that the GATK user AWS keys are no longer visible in the gatk source as plain text.  This will stop AWS from emailing me (they crawl the web looking for keys)
-- Added utility EncryptAWSKeys that takes as command line arguments the GATK user AWS access and secret keys, encrypts them with the GATK private key, and writes out the resulting file to resources in phonehome.
-- GATKRunReport now decrypts as needed these keys using the GATK public key as resources in the GATK bundle
-- Refactored the essential function of Resource (reading the resource) from IOUtils into the class itself.  Now how to get the data in the resouce is straightforward
-- Refactored md5 calculation code from a byte[] into Utils.  Added unit tests
-- Committing the encrypted AWS keys
-- #resolves https://jira.broadinstitute.org/browse/GSA-730
2013-01-30 16:42:23 -05:00
David Roazen 1599c9a20e Remove the ability to package GATK/Queue Lite from the build system
Still need to reconfigure Bamboo to open-source protected, but this
can be done during the 2.4 release freeze.
2013-01-28 02:42:37 -05:00
Mauricio Carneiro f801cb3be5 Updating Queue maven version to 0.0.2
- After changes to the repositories, we are making sure that cmi-queueext is getting the right file.
2013-01-10 13:46:49 -05:00
Mark DePristo c1c5737f80 Re-enabling contracts in tests in build.xml
-- Left contracts turned off in original clover commit
2013-01-02 11:29:25 -05:00
Mark DePristo 3d1c107f9d Detect if clover is present in build.xml. Automatically clean clover db in ant clean, if present 2013-01-02 11:29:24 -05:00
Mark DePristo 5f84a4ad82 Clover report excludes test files and other non-interesting files from the clover reports 2012-12-29 13:31:07 -05:00
Mark DePristo 64c3a0ff62 Remove dependance on clover in build.xml 2012-12-24 13:53:29 -05:00
Mark DePristo 7ec7a5d6b6 Misc. improvements to clover in build.xml
-- Allow instrument level to be overridden on command line with -Dclover.instrument.level=statement
2012-12-24 13:35:58 -05:00
Mark DePristo 14944b5d73 Incorporating clover into build.xml
-- See http://gatkforums.broadinstitute.org/discussion/2002/clover-coverage-analysis-with-ant for use docs
-- Fix for artificial reads not having proper read groups, causing NPE in some tests
-- Added clover itself to private/resources
2012-12-24 13:35:57 -05:00
David Roazen 07b369ca7e Move VCF/BCF2/VariantContext to new standalone org.broadinstitute.variant package
This is an intermediate commit so that there is a record of these changes in our
commit history. Next step is to isolate the test classes as well, and then move
the entire package to the Picard repository and replace it with a jar in our repo.

-Removed all dependencies on org.broadinstitute.sting (still need to do the test classes,
though)

-Had to split some of the utility classes into "GATK-specific" vs generic methods
(eg., GATKVCFUtils vs. VCFUtils)

-Placement of some methods and choice of exception classes to replace the StingExceptions
and UserExceptions may need to be tweaked until everyone is happy, but this can be
done after the move.
2012-12-19 10:25:22 -05:00
Mark DePristo f837e6ced7 Refactored entire NA12878KB to allow us to easily build a na12878kb.jar for IGV integration
-- Just separated infrastructure into core package, away from the walkers themselves.
-- Added na12878kb.jar target that builds a jar that can run a test main function (see testNA12878kbJar.csh)
2012-11-29 14:38:09 -05:00
David Roazen b06e71cedf Use build jars in test classpaths by default
-Allows packaged resource files to be accessed within tests

-Guards against packaging errors in dist/ jars by testing the
jars that actually get run rather than unpackaged class files.
Previously we were only protected against packaging errors in the
monolithic jars posted to our website, not the dist/ jars used in
everyday runs.

-"ant fasttest" still uses the unpackaged class files for speed
(don't want to have to rebuild the jars in fasttest). Relies on
dubious methods to get at the resource files that would end up
in the jars.

-Eliminated the stupid separate "test" ivy config. Now we only
invoke ivy ONCE during an ant build that includes tests.
2012-11-28 22:57:04 -05:00
David Roazen 26d9c41615 Allow arbitrary resources to be packaged in the GATK jar, selecting among public/private/protected appropriately
-Resources must be in a "resources" or "templates" subdirectory within the Java package hierarchy

-Remove direct inclusion of private resources from the main jar packaging target added in Jacob's
patch: this would break builds where the private directory was absent, and did not respect build
settings (include.private, etc.)
2012-11-28 14:53:08 -05:00
Jacob Silterra 1cc0b48caa Abstract connection to MongoDB so we can specify it through JSON file. Include 2 JSON spec files in GenomeAnalysisTK.jar
Create MongoDBManager, which keeps track of connections based on Locator class. Locators can be instantiated directly, or read from JSON files (NA12878DBArgumentCollection uses the GSon library)
2012-11-27 17:44:55 -05:00
Mauricio Carneiro e35fd1c717 Merging CMI-0.5.0 and GATK-2.2 together. 2012-11-14 10:42:03 -05:00
David Roazen bf7c832d25 Merged bug fix from Stable into Unstable 2012-11-02 19:23:11 -04:00
David Roazen eae2d019cf Refuse to package the GATK from a non-clean working directory
Packaging from a non-clean working directory can result in an incorrect
jar. Now that we have external collaborators packaging and distributing
the GATK, not enforcing the clean requirement has become far too dangerous.
At the same time, invoking "clean" automatically through a direct
dependency would also be dangerous -- instead, it's better to error out
if a packaging target is invoked from a non-clean working dir.
2012-11-02 19:11:24 -04:00
Mark DePristo 872abddfce Add custom TestNGTestTransformer that adds a maximum test runtime of 10 minutes to all testng tests
-- Closes GSA-494 / Add maximum runtime for integration tests, running them in timeout thread
-- Needed to debug locking issues
-- Needed to debug excessively long running integrationtests
-- Added build.xml maximum runtime for all testng tests of 10 hours.  We will ultimately fail the build if it goes on for more than 10 hours
2012-11-01 15:34:12 -04:00
kshakir f5697532d6 Added mvninstall.queue.all target which includes private, along with supporting sub-targets. 2012-10-31 11:49:50 -04:00
kshakir 9fcf71c031 Updated google reflections due to stale slf4j version conflicting with other projects also trying to use Queue as a component.
Added targets to build.xml to effectively 'mvn install' packaged GATK/Queue from ant.
TODO: Versions during 'mvn install' are hardcoded at 0.0.1 until a better versioning scheme that works with maven dependencies has been identified.
2012-10-16 02:22:30 -04:00
Mark DePristo 2267b722b2 Proper error handling in NanoScheduler
-- Renamed TraversalErrorManager to the more general MultiThreadedErrorTracker
-- ErrorTracker is now used throughout the NanoScheduler.  In order to properly handle errors, the work previously done by main thread (submit jobs, block on reduce) is now handled in a separate thread.  The main thread simply wakes up peroidically and checks whether the reduce result is available or if an error has occurred, and handles each appropriately.
-- EngineFeaturesIntegrationTest checks that -nt and -nct properly throw errors in Walkers
-- Added NanoSchedulerUnitTest for input errors
-- ThreadEfficiencyMonitoring is now disabled by default, and can be enabled with a GATK command line option.  This is because the monitoring doesn't differentiate between threads that are supposed to do work, and those that are supposed to wait, and therefore gives misleading results.
-- Build.xml no longer copies the unittest results verbosely
2012-09-19 17:03:13 -04:00
Mark DePristo 397a5551ef More memory for gatkdocs and extracthelp targets 2012-09-05 15:45:22 -04:00
David Roazen fa7605c643 Convert external.build.dir and external.dist.dir back to paths
The previous push fixed the external classpath issue but broke external
builds in a new way by changing the above from paths to properties. This
was a mistake, since external builds require absolute, not relative, paths

Thanks to akiezun for the bug report and patch
2012-08-15 23:04:10 -04:00
David Roazen 9b84fa20bf Fix an issue with the classpath for external builds in build.xml
Use "path" instead of "pathconvert" to construct the external.gatk.classpath.
This allows the path to evolve as the build progresses, instead of being
fixed early on to a value that (in some cases) could be incorrect.
2012-08-15 16:08:21 -04:00
David Roazen d56a4631dc Update cofoja version in build.xml 2012-08-09 17:08:43 -04:00
Mark DePristo fcefa61bce Remove reference dependence in BCF2Codec
-- Adding BCF2Codec to VCF.jar and associated unit tests

Signed-off-by: Mark DePristo <depristo@broadinstitute.org>
2012-07-25 08:56:38 -04:00
Khalid Shakir 46ca49b63d Removed 'Walker' suffix from packages/GATKEngine.xml that were breaking the packaged release.
Archived AnalyzeCovariates scripts and removed references in build packages / GATK extensions.
2012-07-23 16:32:31 -04:00
David Roazen fd0c2d269e Change committest target to allow inheritance of properties
Needed for a fix I'm working on for the Bamboo release plan
2012-07-18 12:45:51 -04:00
David Roazen 3b20b4615d ant fasttest: for when you just can't wait
Cuts major corners for speed. Tests start in SECONDS instead of minutes.
SIGNIFICANT limitations (see below!)

Usage: ant fasttest -Dsingle=TestClass

The idea is that you do a regular "ant test -Dsingle=TestClass" (or "ant committests")
FIRST, then do "ant fasttest -Dsingle=TestClass" for all subsequent runs until
satisfied.

LIMITATIONS:

-REQUIRES that a full test build has already been done (using one of the
 test targets like committests, or a manual "ant test.compile").
-Java only
-Single test class only
-No contracts
-Build jars in dist/ not updated, only classes in build/
-Version number output at runtime may be incorrect
2012-06-01 15:17:18 -04:00
David Roazen 2e3af1a739 Enable contracts for the release jar tests (whoops...) 2012-06-01 13:08:46 -04:00
David Roazen 1fa88fd389 Fixing some problems with the binary release tests
-Classpaths to test the release jars were being constructed prematurely,
 before all needed properties had been defined
-Added reportng as a TestNG dependency for testing purposes
2012-05-29 16:29:22 -04:00
David Roazen 5e76c811b9 Build system round 2: finished preparing the packaging system for dual protected/lite releases
* Targets to package and release lite/protected versions of the GATK/Queue
* Still TODO: -determine the actual directories where the protected releases should go
              -update the Bamboo release plan
              -fix a bug in the binary release test targets
2012-05-29 13:54:51 -04:00
Mark DePristo dcad4b865c build.xml now copies report files to ~/private_html for convenient viewing 2012-05-28 10:22:09 -04:00
Mark DePristo e9c22b9aad Final updates to integration tests for BCF2
-- Fully working version
-- Use -generateShadowBCF to write out foo.bcf as well as foo.vcf anywhere you use -o foo.vcf
-- Moved MedianUnitTest to its proper home in Utils
-- Added reportng to ivy and testng, so build/report/X/html/ is a nicely formatted output for Unit and Integration tests.  From this website it's easy to see md5 diffs, etc.  This is a vastly better way to manage unit and integration test output
2012-05-24 10:58:59 -04:00
Mark DePristo 6f469305ab Don't try to share BCF2 yet 2012-05-24 10:57:06 -04:00
Mark DePristo afd2f1a3f9 Individual VariantContextWriters are now package protected
-- Added VCFHeader() constructor that makes an empty header, and updated VariantRecalibrator to use it
-- Update build.xml to build vcf.jar with updated paths and bcf2 support.
2012-05-24 10:57:00 -04:00
David Roazen 9c6bccfd8b build system overhaul
* Added support for a protected directory whose contents are only made public in binary form

* Simplified and reorganized build.xml to improve readability and maintainability

* build.xml now autodetects most build properties:
    -Includes private/protected if they exist
    -No more STING_BUILD_TYPE or specialized targets for public-only, etc.

* Build targets have changed! There are now two main build options:

"ant"       build everything (GATK and Queue)
"ant gatk"  build just the GATK

It was too hard to build everything before -- now it is the default.

* To run tests with debugging, use -Dtest.debug=true -Dtest.debug.port=XXXX on the command line.
  Much better than the old comment/uncomment method!
2012-05-17 15:16:29 -04:00
Mark DePristo 58c470a6c5 Rev'ing Tribble from 53 to 94
-- Other tribble contributors did major refactoring / simplification of tribble, which required some changes to GATK code
-- Integrationtests pass without modification, though some very old index files (callable loci beds) were apparently corrupt and no longer tolerated by the newer tribble codebase
2012-05-03 07:31:47 -04:00