This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new 4c83217d9 [test] leave generated files on a non-fatal failure as well
4c83217d9 is described below
commit 4c83217d95ec97801675feb36be3d70984eb29f7
Author: Alexey Serbin <[email protected]>
AuthorDate: Fri Sep 13 17:49:15 2024 -0700
[test] leave generated files on a non-fatal failure as well
Kudu tests have been leaving generated files in case of a fatal failure
(e.g., ASSERT_XXX, FAIL macros, etc.), but not for non-fatal ones
(e.g., EXPECT_XXX macros). Tests scenarios that tend to print out all
the errors before exiting use EXPECT_XXX macros, and sometimes it might
be not a single fatal failure generated, but many non-fatal ones.
This patch updates the code to leave the generated files if a non-fatal
failure is detected as well.
Change-Id: Id39b70bd357f47e85f7f9b7b145520b824d5d496
Reviewed-on: http://gerrit.cloudera.org:8080/21804
Tested-by: Alexey Serbin <[email protected]>
Reviewed-by: Yifan Zhang <[email protected]>
---
src/kudu/util/test_util.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/kudu/util/test_util.cc b/src/kudu/util/test_util.cc
index 4afc40fc7..b6e5512da 100644
--- a/src/kudu/util/test_util.cc
+++ b/src/kudu/util/test_util.cc
@@ -63,7 +63,7 @@
DEFINE_string(test_leave_files, "on_failure",
"Whether to leave test files around after the test run. "
- " Valid values are 'always', 'on_failure', or 'never'");
+ "Valid values are 'always', 'on_failure', or 'never'");
DEFINE_int32(test_random_seed, 0, "Random seed to use for randomized tests");
@@ -177,9 +177,9 @@ KuduTest::~KuduTest() {
if (FLAGS_test_leave_files == "always") {
LOG(INFO) << "-----------------------------------------------";
LOG(INFO) << "--test_leave_files specified, leaving files in " <<
test_dir_;
- } else if (FLAGS_test_leave_files == "on_failure" && HasFatalFailure()) {
+ } else if (FLAGS_test_leave_files == "on_failure" && HasFailure()) {
LOG(INFO) << "-----------------------------------------------";
- LOG(INFO) << "Had fatal failures, leaving test files at " << test_dir_;
+ LOG(INFO) << "Had failures, leaving test files at " << test_dir_;
} else {
VLOG(1) << "Cleaning up temporary test files...";
WARN_NOT_OK(env_->DeleteRecursively(test_dir_),