Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/10907 )
Change subject: Add support for running Java tests in dist-test ...................................................................... Patch Set 3: (9 comments) http://gerrit.cloudera.org:8080/#/c/10907/3/build-support/run_dist_test.py File build-support/run_dist_test.py: http://gerrit.cloudera.org:8080/#/c/10907/3/build-support/run_dist_test.py@41 PS3, Line 41: JAVA_CANDIDATES = """ This is cribbed from cmake_modules/FindJavaHome.cmake, right? Can we share the list in a common data file? http://gerrit.cloudera.org:8080/#/c/10907/3/build-support/run_dist_test.py@178 PS3, Line 178: os.path.join(ROOT, "build/lib/")] + What is this directory? Isn't the build tree comprised of build/debug, build/asan, build/tsan, build/latest, etc? http://gerrit.cloudera.org:8080/#/c/10907/3/build-support/run_dist_test.py@179 PS3, Line 179: glob.glob(os.path.abspath((os.path.join(ROOT, "build/*/lib"))))) Why do we need this glob? http://gerrit.cloudera.org:8080/#/c/10907/3/build-support/run_dist_test.py@181 PS3, Line 181: # GTEST_OUTPUT must be canonicalized and have a trailing slash for gtest to : # properly interpret it as a directory. : test_logdir = os.path.abspath(os.path.join(ROOT, "build/test-logs")) : env['GTEST_OUTPUT'] = 'xml:' + test_logdir + '/' : env['TEST_LOGDIR'] = test_logdir This is already set up for C++ tests in run-test.sh. Why do we need to duplicate it here? Is it because C++ tests will use build/<build_type>/test-logs as their log directory? If so, why do we need to override that? http://gerrit.cloudera.org:8080/#/c/10907/3/java/buildSrc/src/main/groovy/org/apache/kudu/gradle/DistTestTask.java File java/buildSrc/src/main/groovy/org/apache/kudu/gradle/DistTestTask.java: http://gerrit.cloudera.org:8080/#/c/10907/3/java/buildSrc/src/main/groovy/org/apache/kudu/gradle/DistTestTask.java@65 PS3, Line 65: : String distTestBin = getProject().getRootDir() + "/../build-support/dist_test.py"; : : @OutputDirectory : File outputDir = new File(getProject().getBuildDir(), "dist-test"); : : List<Test> testTasks = Lists.newArrayList(); private? http://gerrit.cloudera.org:8080/#/c/10907/3/java/buildSrc/src/main/groovy/org/apache/kudu/gradle/DistTestTask.java@73 PS3, Line 73: public void testTask(Test t) { Maybe addTestTask? Also, where is this called? If it's used by Gradle I'm surprised it doesn't need some kind of annotation. Maybe a comment would help? http://gerrit.cloudera.org:8080/#/c/10907/3/java/buildSrc/src/main/groovy/org/apache/kudu/gradle/DistTestTask.java@91 PS3, Line 91: if (fc == null) { : fc = t.getCandidateClassFiles(); : } else { : fc = fc.plus(t.getCandidateClassFiles()); : } Maybe clearer as: FileCollection tfc = t.GetCandidateClassFiles(); fc = (fc == null) ? tfc : fc.plus(tfc); http://gerrit.cloudera.org:8080/#/c/10907/3/java/buildSrc/src/main/groovy/org/apache/kudu/gradle/DistTestTask.java@156 PS3, Line 156: // This hack replaces jars from the gradle cache in ~/.gradle/caches/... : // with jars copied under the project build directory. As worded it sort of sounds like the hack will overwrite the files in ~/.gradle/caches. Can you reword? http://gerrit.cloudera.org:8080/#/c/10907/3/java/buildSrc/src/main/groovy/org/apache/kudu/gradle/DistTestTask.java@255 PS3, Line 255: Can you add class comments to these to explain why the layout is the way it is? -- To view, visit http://gerrit.cloudera.org:8080/10907 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I446a15192a45e296b323a4c7d305f236e22ab557 Gerrit-Change-Number: 10907 Gerrit-PatchSet: 3 Gerrit-Owner: Grant Henke <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-Comment-Date: Thu, 12 Jul 2018 17:13:01 +0000 Gerrit-HasComments: Yes
