From 3848159086bfc6d3f1d1db199d7174b56a5c0c81 Mon Sep 17 00:00:00 2001 From: Khalid Shakir Date: Thu, 6 Feb 2014 01:17:26 +0800 Subject: [PATCH] Added a set of serial tests to gatk/queue packages, which runs all tests under their package in one TestNG execution. New properties to disable regenerating example resources artifact when each parallel test runs under packagetest. Moved collection of packagetest parameters from shell scripts into maven profiles. Fixed necessity of test-utils jar by removing incorrect dependenciesToScan element during packagetests. When building picard libraries, run clean first. Fixed tools jar dependency in picard pom. Integration tests properly use the ant-bridge.sh test.debug.port variable, like unit tests. --- ant-bridge.sh | 11 +-- pom.xml | 92 +++++++++++------ protected/gatk-protected/pom.xml | 10 -- public/external-example/pom.xml | 18 ---- public/gatk-framework/pom.xml | 20 +--- public/gatk-package/pom.xml | 98 +++++++++++++++++++ public/gsalib/pom.xml | 2 +- public/package-tests/pom.xml | 25 +++-- public/queue-framework/pom.xml | 4 +- public/queue-package/pom.xml | 97 ++++++++++++++++++ .../picard/1.107.1676/picard-1.107.1676.pom | 4 +- public/sting-utils/pom.xml | 1 - 12 files changed, 284 insertions(+), 98 deletions(-) diff --git a/ant-bridge.sh b/ant-bridge.sh index e76e03930..860b3ecc5 100755 --- a/ant-bridge.sh +++ b/ant-bridge.sh @@ -33,6 +33,7 @@ for arg in "${@}" ; do elif [[ "${property_name}" == "test.debug.port" ]] ; then mvn_properties="${mvn_properties} -Dmaven.surefire.debug=\"-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=${property_value}\"" + mvn_properties="${mvn_properties} -Dmaven.failsafe.debug=\"-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=${property_value}\"" elif [[ "${property_name}" == "test.default.maxmemory" ]] ; then mvn_properties="${mvn_properties} -Dtest.maxmemory=${property_value}" @@ -98,18 +99,16 @@ for arg in "${@}" ; do elif [[ "${arg}" == "gatkfull.binary.release.tests" ]] ; then local_repo="sitetemprepo" mvn_args="install -Dmaven.repo.local=${local_repo} && mvn verify" - mvn_args="${mvn_args} -Dmaven.repo.local=${local_repo} -Dmaven.javadoc.skip=true" - mvn_args="${mvn_args} -Dsting.generate-gatk-extensions.skipped=true" - mvn_args="${mvn_args} -Dsting.jar.phase=none -Dsting.unpack.phase=none -Dsting.shade.phase=none" + mvn_args="${mvn_args} -Dmaven.repo.local=${local_repo}" + mvn_args="${mvn_args} -Dsting.packagetests.enabled=true" mvn_args="${mvn_args} -Dsting.packagecommittests.skipped=false" # TODO: This runs only the pipeline tests (full, non-dry run), but not the commit tests for Queue. elif [[ "${arg}" == "queuefull.binary.release.tests" ]] ; then local_repo="sitetemprepo" mvn_args="install -Dmaven.repo.local=${local_repo} && mvn verify" - mvn_args="${mvn_args} -Dmaven.repo.local=${local_repo} -Dmaven.javadoc.skip=true" - mvn_args="${mvn_args} -Dsting.generate-gatk-extensions.skipped=true" - mvn_args="${mvn_args} -Dsting.jar.phase=none -Dsting.unpack.phase=none -Dsting.shade.phase=none" + mvn_args="${mvn_args} -Dmaven.repo.local=${local_repo}" + mvn_args="${mvn_args} -Dsting.packagetests.enabled=true" mvn_args="${mvn_args} -Dsting.packagepipelinetests.skipped=false" mvn_args="${mvn_args} -Dsting.pipelinetests.run=true" diff --git a/pom.xml b/pom.xml index 60b19f1b2..aef2baab3 100644 --- a/pom.xml +++ b/pom.xml @@ -32,13 +32,37 @@ false -build-timestamp "${maven.build.timestamp}" + + package - none + generate-resources + process-resources + process-test-resources + + true ${sting.packagecommittests.skipped} ${sting.packagecommittests.skipped} ${sting.packagecommittests.skipped} true + + + true + ${sting.serialcommittests.skipped} + ${sting.serialcommittests.skipped} + ${sting.serialcommittests.skipped} + true @@ -109,6 +133,20 @@ org.apache.maven.plugins maven-resources-plugin + + default-resources + + resources + + ${sting.process-resources.phase} + + + default-testResources + + testResources + + ${sting.process-test-resources.phase} + copy-resource-bundle-log4j @@ -277,38 +315,13 @@ ${sting.jar.phase} - test-utils + test-jar - jar + test-jar - ${sting.test-utils-jar.phase} + ${sting.jar.phase} - ${project.build.testOutputDirectory} - test-utils - - - **/*UnitTest.class - **/*UnitTest$*.class - **/*IntegrationTest.class - **/*IntegrationTest$*.class - **/*PipelineTest.class - **/*PipelineTest$*.class - **/*LargeScaleTest.class - **/*LargeScaleTest.class - + true @@ -773,6 +786,25 @@ private + + + + packagetests-enabled + + + sting.packagetests.enabled + true + + + + true + true + none + none + none + none + + diff --git a/protected/gatk-protected/pom.xml b/protected/gatk-protected/pom.xml index c0074b8bc..9fcd6f6cf 100644 --- a/protected/gatk-protected/pom.xml +++ b/protected/gatk-protected/pom.xml @@ -40,20 +40,10 @@ fastutil - - ${project.groupId} - sting-utils - ${project.version} - test-utils - test-jar - test - - ${project.groupId} gatk-framework ${project.version} - test-utils test-jar test diff --git a/public/external-example/pom.xml b/public/external-example/pom.xml index 0f5e3934e..299216cc2 100644 --- a/public/external-example/pom.xml +++ b/public/external-example/pom.xml @@ -38,27 +38,10 @@ ${sting.version} - - - org.broadinstitute.sting - sting-utils - ${sting.version} - test-utils - test-jar - test - - org.broadinstitute.sting gatk-framework ${sting.version} - test-utils test-jar test @@ -208,7 +191,6 @@ none - unit-tests test diff --git a/public/gatk-framework/pom.xml b/public/gatk-framework/pom.xml index bf46e8951..956cf693a 100644 --- a/public/gatk-framework/pom.xml +++ b/public/gatk-framework/pom.xml @@ -16,7 +16,6 @@ ${project.basedir}/../.. gatk-package - ${sting.jar.phase} @@ -26,15 +25,6 @@ ${project.version} - - ${project.groupId} - sting-utils - ${project.version} - test-utils - test-jar - test - - org.testng testng @@ -55,7 +45,7 @@ example-resources - generate-resources + ${sting.generate-resources.phase} @@ -79,14 +69,6 @@ - org.apache.maven.plugins maven-invoker-plugin diff --git a/public/gatk-package/pom.xml b/public/gatk-package/pom.xml index 48c6168d3..0ff69b047 100644 --- a/public/gatk-package/pom.xml +++ b/public/gatk-package/pom.xml @@ -51,10 +51,79 @@ example-resources tar.bz2 + + + ${project.groupId} + gatk-framework + ${project.version} + test-jar + + + + org.testng + testng + test + + + + com.google.caliper + caliper + test + + + org.apache.maven.plugins + maven-surefire-plugin + + + unit-tests + + ${sting.serialunittests.skipped} + + org.broadinstitute.sting:.* + + + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + integration-tests + + ${sting.serialintegrationtests.skipped} + + org.broadinstitute.sting:.* + + + + + pipeline-tests + + ${sting.serialpipelinetests.skipped} + + org.broadinstitute.sting:.* + + + + + large-scale-tests + + ${sting.seriallargescaletests.skipped} + + org.broadinstitute.sting:.* + + + + + + org.apache.maven.plugins maven-dependency-plugin @@ -132,6 +201,14 @@ ${project.version} true + + ${project.groupId} + gatk-protected + ${project.version} + test-jar + test + true + @@ -148,8 +225,29 @@ ${project.version} true + + ${project.groupId} + gatk-private + ${project.version} + test-jar + test + true + + + packagetests-enabled + + + sting.packagetests.enabled + true + + + + none + none + + diff --git a/public/gsalib/pom.xml b/public/gsalib/pom.xml index c751bc0f0..66845f584 100644 --- a/public/gsalib/pom.xml +++ b/public/gsalib/pom.xml @@ -30,7 +30,7 @@ single - generate-resources + ${sting.generate-resources.phase} false diff --git a/public/package-tests/pom.xml b/public/package-tests/pom.xml index 62a1d570b..8b7c4e7f7 100644 --- a/public/package-tests/pom.xml +++ b/public/package-tests/pom.xml @@ -48,13 +48,29 @@ cofoja + ${project.groupId} gatk-framework ${project.version} - test-utils test-jar test + @@ -95,13 +111,9 @@ ${sting.packagetests.basedir} ${project.build.outputDirectory}/ignored_by_package_test ${sting.packagetests.testClasses} - - org.broadinstitute.sting:.* - - unit-tests test @@ -137,9 +149,6 @@ ${project.build.outputDirectory}/ignored_by_package_test ${sting.packagetests.testClasses} ${failsafe.summaryFile} - - org.broadinstitute.sting:.* - diff --git a/public/queue-framework/pom.xml b/public/queue-framework/pom.xml index 7146e9694..7a292ffe4 100644 --- a/public/queue-framework/pom.xml +++ b/public/queue-framework/pom.xml @@ -18,7 +18,6 @@ ${project.build.directory}/generated-sources/gatk-extensions false queue-package - ${sting.jar.phase} @@ -66,7 +65,6 @@ ${project.groupId} gatk-framework ${project.version} - test-utils test-jar test @@ -130,7 +128,7 @@ example-resources - generate-resources + ${sting.generate-resources.phase} diff --git a/public/queue-package/pom.xml b/public/queue-package/pom.xml index 3bd9f262e..b909e6ba2 100644 --- a/public/queue-package/pom.xml +++ b/public/queue-package/pom.xml @@ -82,10 +82,86 @@ example-resources tar.bz2 + + + ${project.groupId} + queue-framework + ${project.version} + test-jar + + + + ${project.groupId} + gatk-framework + ${project.version} + test-jar + + + + org.testng + testng + test + + + + com.google.caliper + caliper + test + + + org.apache.maven.plugins + maven-surefire-plugin + + + unit-tests + + ${sting.serialunittests.skipped} + + org.broadinstitute.sting:.* + + + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + integration-tests + + ${sting.serialintegrationtests.skipped} + + org.broadinstitute.sting:.* + + + + + pipeline-tests + + ${sting.serialpipelinetests.skipped} + + org.broadinstitute.sting:.* + + + + + large-scale-tests + + ${sting.seriallargescaletests.skipped} + + org.broadinstitute.sting:.* + + + + + + org.apache.maven.plugins maven-dependency-plugin @@ -163,8 +239,29 @@ ${project.version} true + + ${project.groupId} + queue-private + ${project.version} + test-jar + test + true + + + packagetests-enabled + + + sting.packagetests.enabled + true + + + + none + none + + diff --git a/public/repo/net/sf/picard/1.107.1676/picard-1.107.1676.pom b/public/repo/net/sf/picard/1.107.1676/picard-1.107.1676.pom index 6fa774352..5cb3de5fd 100644 --- a/public/repo/net/sf/picard/1.107.1676/picard-1.107.1676.pom +++ b/public/repo/net/sf/picard/1.107.1676/picard-1.107.1676.pom @@ -37,8 +37,8 @@ com.sun tools.jar 1.5 - system - ${java.home}../lib/tools.jar + system + ${java.home}/../lib/tools.jar diff --git a/public/sting-utils/pom.xml b/public/sting-utils/pom.xml index 043be645f..f30d02736 100644 --- a/public/sting-utils/pom.xml +++ b/public/sting-utils/pom.xml @@ -17,7 +17,6 @@ ${project.basedir}/../.. org/broadinstitute/sting/utils/R gsalib.tar.gz - ${sting.jar.phase}