From 18235d8e5f37c0e65b5f1e3cacb6e3d27c3e05eb Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 28 Oct 2016 00:50:02 +0300 Subject: Add support of paths cleanups to testscript runner --- build2/test/script/runner.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'build2') diff --git a/build2/test/script/runner.cxx b/build2/test/script/runner.cxx index 79cbfc4..23a4a5c 100644 --- a/build2/test/script/runner.cxx +++ b/build2/test/script/runner.cxx @@ -189,6 +189,10 @@ namespace build2 // // Note that we operate with normalized paths here. // + // @@ What if to make cleanup insensitive to the registration order, + // and sorting paths properly prior removal? Would it produce any + // testing flaws? + // set rp; for (auto& p: reverse_iterate (sp.cleanups)) { @@ -414,6 +418,11 @@ namespace build2 // pr.wait (); + // Register command-created paths for cleanup. + // + for (const auto& p: c.cleanups) + sp.cleanups.emplace_back (normalize (p)); + // If there is no correct exit status by whatever reason then dump // stderr (if cached), print the proper diagnostics and fail. // -- cgit v1.1