aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-05-06 19:21:19 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-05-06 19:21:19 +0300
commitdb47f3b176421d4325c3439ae54a3cabf953ae7b (patch)
treeec93245de361fe765469e4ca66c392a7b9cba1e4
parent630b498533f5a9a1e9d40893f4806ef855f1e03b (diff)
Fix 'registered for cleanup directory not empty' testscript error due to unregistered .regex file
-rw-r--r--libbuild2/test/script/runner.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/libbuild2/test/script/runner.cxx b/libbuild2/test/script/runner.cxx
index 3d03bd8..b40dea8 100644
--- a/libbuild2/test/script/runner.cxx
+++ b/libbuild2/test/script/runner.cxx
@@ -663,7 +663,9 @@ namespace build2
// Output doesn't match the regex. We save the regex to file for
// troubleshooting regardless of whether we print the diagnostics or
- // not.
+ // not. We, however, register it for cleanup in the later case (the
+ // expression may still succeed, we can be evaluating the if
+ // condition, etc).
//
path rp (save_regex ());
@@ -680,6 +682,8 @@ namespace build2
//
print_file (d, op, ll);
}
+ else
+ sp.clean_special (rp);
// Fall through (to return false).
//