kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aw...@apache.org
Subject [4/4] kudu git commit: dist_test: collect the correct tmpdir
Date Tue, 16 Oct 2018 04:34:47 GMT
dist_test: collect the correct tmpdir

Over the course of many refactors, we've come to not properly collect
the test tmpdir on failed executions of run_dist_test.py.

I tested this to ensure we are now getting the right tmpdir for C++
tests: http://dist-test.cloudera.org/job?job_id=awong.1539136867.37741

It seems like Java tests will wipe the tmpdir before returning control
to run_dist_test.py, so just stdout and sterr are collected (as was the
case before), though this includes logs from the minicluster:
http://dist-test.cloudera.org/job?job_id=awong.1539137951.43284#

Change-Id: I34d7a3bbca52ac8229364564833654126c371086
Reviewed-on: http://gerrit.cloudera.org:8080/11642
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <adar@cloudera.com>


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

Branch: refs/heads/master
Commit: 1197eb01a21519c71a19f15d5133485a6aa82ec3
Parents: f6eddf2
Author: Andrew Wong <awong@cloudera.com>
Authored: Tue Oct 9 19:02:45 2018 -0700
Committer: Andrew Wong <awong@cloudera.com>
Committed: Tue Oct 16 03:55:40 2018 +0000

----------------------------------------------------------------------
 build-support/run_dist_test.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/1197eb01/build-support/run_dist_test.py
----------------------------------------------------------------------
diff --git a/build-support/run_dist_test.py b/build-support/run_dist_test.py
index 1edcce2..7982f30 100755
--- a/build-support/run_dist_test.py
+++ b/build-support/run_dist_test.py
@@ -167,6 +167,10 @@ def main():
   stderr = None
   if options.test_language == 'cpp':
     cmd = [os.path.join(ROOT, "build-support/run-test.sh")] + args
+    # Get the grandparent directory of the test executable, which takes the
+    # form "../release/bin/foo-test", so we can get the build directory.
+    relative_build_dir = os.path.dirname(os.path.dirname(args[0]))
+    test_logdir = os.path.abspath(os.path.join(os.getcwd(), relative_build_dir, "test-logs"))
   elif options.test_language == 'java':
     test_logdir = os.path.abspath(os.path.join(ROOT, "build/java/test-logs"))
     if not os.path.exists(test_logdir):
@@ -183,7 +187,7 @@ def main():
   rc = subprocess.call(cmd, env=env, stdout=stdout, stderr=stderr)
 
   if rc != 0 and options.collect_tmpdir:
-    os.system("tar czf %s %s" % (os.path.join(test_dir, "..", "test-logs", "test_tmpdir.tgz"),
test_tmpdir))
+    os.system("tar czf %s %s" % (os.path.join(test_logdir, "test_tmpdir.tgz"), test_tmpdir))
   sys.exit(rc)
 
 


Mime
View raw message