From db47f3b176421d4325c3439ae54a3cabf953ae7b Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 6 May 2020 19:21:19 +0300 Subject: Fix 'registered for cleanup directory not empty' testscript error due to unregistered .regex file --- libbuild2/test/script/runner.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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). // -- cgit v1.1