aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/test/script/runner.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/test/script/runner.cxx')
-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).
//