This is an automated email from the ASF dual-hosted git repository.

altay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 77d48f9  Exercise ValidatesRunner batch tests in Python 3
     new e52eb75  Merge pull request #7825 from markflyhigh/py3-vr
77d48f9 is described below

commit 77d48f92f51f50cd0f26dfa3fa3eb76472f7fcdf
Author: Mark Liu <mark...@google.com>
AuthorDate: Tue Feb 12 13:29:03 2019 -0800

    Exercise ValidatesRunner batch tests in Python 3
---
 build.gradle                                      |  1 +
 sdks/python/test-suites/dataflow/build.gradle     |  6 ++++-
 sdks/python/test-suites/dataflow/py3/build.gradle | 31 +++++++++++++++++++----
 sdks/python/test-suites/direct/py3/build.gradle   |  2 +-
 4 files changed, 33 insertions(+), 7 deletions(-)

diff --git a/build.gradle b/build.gradle
index 9d24315..823e888 100644
--- a/build.gradle
+++ b/build.gradle
@@ -199,6 +199,7 @@ task pythonPostCommit() {
 
 task python3PostCommit() {
   dependsOn ":beam-sdks-python-test-suites-dataflow-py3:postCommitIT"
+  dependsOn 
":beam-sdks-python-test-suites-dataflow-py3:validatesRunnerBatchTests"
   dependsOn ":beam-sdks-python-test-suites-direct-py3:postCommitIT"
 }
 
diff --git a/sdks/python/test-suites/dataflow/build.gradle 
b/sdks/python/test-suites/dataflow/build.gradle
index 95892b0..fe21d90 100644
--- a/sdks/python/test-suites/dataflow/build.gradle
+++ b/sdks/python/test-suites/dataflow/build.gradle
@@ -34,10 +34,14 @@ task preCommitIT(dependsOn: ['sdist', 'installGcpTest']) {
         "--processes=2",    // Number of tests running in parallel
         "--process-timeout=1800",   // Timeout of whole command execution
     ]
+    def cmdArgs = project.mapToArgString([
+        "test_opts": testOpts,
+        "sdk_location": "${project.buildDir}/apache-beam.tar.gz"
+    ])
 
     exec {
       executable 'sh'
-      args '-c', ". ${project.ext.envdir}/bin/activate && 
${runScriptsDir}/run_integration_test.sh --test_opts \"${testOpts.join(' ')}\""
+      args '-c', ". ${project.ext.envdir}/bin/activate && 
${runScriptsDir}/run_integration_test.sh $cmdArgs"
     }
   }
 }
diff --git a/sdks/python/test-suites/dataflow/py3/build.gradle 
b/sdks/python/test-suites/dataflow/py3/build.gradle
index 26ab0f1..f6465b7 100644
--- a/sdks/python/test-suites/dataflow/py3/build.gradle
+++ b/sdks/python/test-suites/dataflow/py3/build.gradle
@@ -24,17 +24,38 @@ project.ext.python3 = true
 
 def runScriptsDir = "${project.rootDir}/sdks/python/scripts"
 
+// Basic test options for ITs running on Jenkins.
+def basicTestOpts = [
+    "--nocapture",  // print stdout instantly
+    "--processes=4",  // run tests in parallel
+    "--process-timeout=4500", // timeout of whole command execution
+]
+
 task postCommitIT(dependsOn: ['sdist', 'installGcpTest']) {
   doLast {
     def tests = [
         "apache_beam.examples.wordcount_it_test:WordCountIT.test_wordcount_it",
         
"apache_beam.examples.cookbook.bigquery_tornadoes_it_test:BigqueryTornadoesIT.test_bigquery_tornadoes_it",
     ]
-    def testOpts = [
-        "--tests=${tests.join(',')}",
-        "--nocapture",    // Print stdout instantly
-    ]
-    def cmdArgs = project.mapToArgString(["test_opts": testOpts])
+    def testOpts = basicTestOpts + ["--tests=${tests.join(',')}"]
+    def cmdArgs = project.mapToArgString([
+        "test_opts": testOpts,
+        "sdk_location": "${project.buildDir}/apache-beam.tar.gz"
+    ])
+    exec {
+      executable 'sh'
+      args '-c', ". ${project.ext.envdir}/bin/activate && 
${runScriptsDir}/run_integration_test.sh $cmdArgs"
+    }
+  }
+}
+
+task validatesRunnerBatchTests(dependsOn: ['installGcpTest', 'sdist']) {
+  doLast {
+    def testOpts = basicTestOpts + ["--attr=ValidatesRunner"]
+    def cmdArgs = project.mapToArgString([
+        "test_opts": testOpts,
+        "sdk_location": "${project.buildDir}/apache-beam.tar.gz"
+    ])
     exec {
       executable 'sh'
       args '-c', ". ${project.ext.envdir}/bin/activate && 
${runScriptsDir}/run_integration_test.sh $cmdArgs"
diff --git a/sdks/python/test-suites/direct/py3/build.gradle 
b/sdks/python/test-suites/direct/py3/build.gradle
index 3e362ad..f8b58ea 100644
--- a/sdks/python/test-suites/direct/py3/build.gradle
+++ b/sdks/python/test-suites/direct/py3/build.gradle
@@ -24,7 +24,7 @@ project.ext.python3 = true
 
 def runScriptsDir = "${project.rootDir}/sdks/python/scripts"
 
-task postCommitIT(dependsOn: ['sdist', 'installGcpTest']) {
+task postCommitIT(dependsOn: 'installGcpTest') {
   // Run IT tests with TestDirectRunner in batch in Python 3.
   doLast {
     def batchTests = [

Reply via email to