You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by jo...@apache.org on 2015/06/25 00:12:40 UTC

spark git commit: [SPARK-8558] [BUILD] Script /dev/run-tests fails when _JAVA_OPTIONS env var set

Repository: spark
Updated Branches:
  refs/heads/master 8ab50765c -> dca21a83a


[SPARK-8558] [BUILD] Script /dev/run-tests fails when _JAVA_OPTIONS env var set

Author: fe2s <ak...@gmail.com>
Author: Oleksiy Dyagilev <ol...@epam.com>

Closes #6956 from fe2s/fix-run-tests and squashes the following commits:

31b6edc [fe2s] str is a built-in function, so using it as a variable name will lead to spurious warnings in some Python linters
7d781a0 [fe2s] fixing for openjdk/IBM, seems like they have slightly different wording, but all have 'version' word. Surrounding with spaces for the case if version word appears in _JAVA_OPTIONS
cd455ef [fe2s] address comment, looking for java version string rather than expecting to have on a certain line number
ad577d7 [Oleksiy Dyagilev] [SPARK-8558][BUILD] Script /dev/run-tests fails when _JAVA_OPTIONS env var set


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/dca21a83
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/dca21a83
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/dca21a83

Branch: refs/heads/master
Commit: dca21a83ac33813dd8165acb5f20d06e4f9b9034
Parents: 8ab5076
Author: fe2s <ak...@gmail.com>
Authored: Wed Jun 24 15:12:23 2015 -0700
Committer: Josh Rosen <jo...@databricks.com>
Committed: Wed Jun 24 15:12:23 2015 -0700

----------------------------------------------------------------------
 dev/run-tests.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/dca21a83/dev/run-tests.py
----------------------------------------------------------------------
diff --git a/dev/run-tests.py b/dev/run-tests.py
index de1b453..e7c09b0 100755
--- a/dev/run-tests.py
+++ b/dev/run-tests.py
@@ -477,7 +477,12 @@ def determine_java_version(java_exe):
 
     raw_output = subprocess.check_output([java_exe, "-version"],
                                          stderr=subprocess.STDOUT)
-    raw_version_str = raw_output.split('\n')[0]  # eg 'java version "1.8.0_25"'
+
+    raw_output_lines = raw_output.split('\n')
+
+    # find raw version string, eg 'java version "1.8.0_25"'
+    raw_version_str = next(x for x in raw_output_lines if " version " in x)
+
     version_str = raw_version_str.split()[-1].strip('"')  # eg '1.8.0_25'
     version, update = version_str.split('_')  # eg ['1.8.0', '25']
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org