From e4f1fcd76add853b0ae2d1624059e5daaab8774f Mon Sep 17 00:00:00 2001 From: James Cancilla Date: Mon, 27 Mar 2017 10:41:03 -0400 Subject: [PATCH] Resolves #99, refers to #98 --- .../build.gradle | 2 +- .../build.gradle | 3 +- test/test-builds.py | 33 +++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 test/test-builds.py diff --git a/ingest/common/com.ibm.streamsx.health.ingest/build.gradle b/ingest/common/com.ibm.streamsx.health.ingest/build.gradle index 71baf61..40a2d52 100644 --- a/ingest/common/com.ibm.streamsx.health.ingest/build.gradle +++ b/ingest/common/com.ibm.streamsx.health.ingest/build.gradle @@ -39,5 +39,5 @@ task deleteDeps(type: Delete) { delete 'com.ibm.streamsx.health.ingest.types.resolver' } -build.dependsOn buildToolkit +build.finalizedBy buildToolkit clean.dependsOn deleteDeps, cleanToolkit diff --git a/ingest/physionet/com.ibm.streamsx.health.ingest.physionet/build.gradle b/ingest/physionet/com.ibm.streamsx.health.ingest.physionet/build.gradle index 8ebfda8..29c99c4 100644 --- a/ingest/physionet/com.ibm.streamsx.health.ingest.physionet/build.gradle +++ b/ingest/physionet/com.ibm.streamsx.health.ingest.physionet/build.gradle @@ -16,6 +16,7 @@ repositories { dependencies { compile fileTree(dir: System.getenv("STREAMS_INSTALL") + '/lib', include: ['*.jar']) compile files(System.getenv("STREAMS_INSTALL") + '/toolkits/com.ibm.streamsx.topology/lib/com.ibm.streamsx.topology.jar') + compile project(':ingest:common:com.ibm.streamsx.health.ingest') testCompile 'junit:junit:4.12' } @@ -35,7 +36,7 @@ task buildToolkit { } } -task buildServices { +task buildServices(dependsOn: ':ingest:common:com.ibm.streamsx.health.ingest:buildToolkit') { doLast { def serviceToolkitPath = "${project(':ingest:common:com.ibm.streamsx.health.ingest').projectDir}" + ':' + ':' + jsonToolkitPath + ':' + topologyToolkitPath + ':' + ':' + dateTimeToolkitPath compileApp('com.ibm.streamsx.health.ingest.physionet.service', 'PhysionetIngestService', serviceToolkitPath) diff --git a/test/test-builds.py b/test/test-builds.py new file mode 100644 index 0000000..3b59bd7 --- /dev/null +++ b/test/test-builds.py @@ -0,0 +1,33 @@ +import glob +from subprocess import call + +test_failures = {} +test_successes = {} + +files = [file for file in glob.glob('../**/build.gradle', recursive=True)] +for f in files: + if f.startswith('../test'): + continue + + # clean all projects in the platform before executing build + print("Cleaning all projects first...") + call(['../gradlew', '-p', '../', 'clean']) + + print("Executing " + f + "...") + rc = call(['../gradlew', '-b', f, 'build', 'clean']) + if rc == 0: + test_successes[f] = rc + else: + test_failures[f] = rc + + print("Return code: " + str(rc)) + +print("FAILURES:") +for key in test_failures: + print(key + ": " + "FAILED(rc=" + str(test_failures[key]) + ")!") + +print("\n\n") +print("SUCCESSES:") +for key in test_successes: + print(key + ": PASS") +