aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-11-23 02:57:08 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-11-23 02:57:08 +0300
commit0a4f6bd240a512dadc54afd3116d8b8d03879de4 (patch)
tree12e23a98a3c04cd10e80cd7e97ac555b071587b1
parent4dbbb01d07b2620efebad994ab869725c8ea6e20 (diff)
Print test scope directory changes in verbose (-v) mode
-rw-r--r--build2/test/script/runner.cxx14
-rw-r--r--tests/test/script/buildfile2
2 files changed, 15 insertions, 1 deletions
diff --git a/build2/test/script/runner.cxx b/build2/test/script/runner.cxx
index ef086f5..8e336a3 100644
--- a/build2/test/script/runner.cxx
+++ b/build2/test/script/runner.cxx
@@ -193,6 +193,12 @@ namespace build2
//
assert (empty (sp.wd_path));
+ // We don't change the current directory here but indicate that the
+ // scope test commands will be executed in that directory.
+ //
+ if (verb >= 2)
+ text << "cd " << sp.wd_path;
+
sp.clean ({cleanup_type::always, sp.wd_path}, true);
}
@@ -272,6 +278,14 @@ namespace build2
fail (ll) << "registered for cleanup file " << p
<< " does not exist";
}
+
+ // Return to the parent scope directory or to the out_base one for the
+ // script scope.
+ //
+ if (verb >= 2)
+ text << "cd " << (sp.parent != nullptr
+ ? sp.parent->wd_path
+ : sp.wd_path.directory ());
}
void concurrent_runner::
diff --git a/tests/test/script/buildfile b/tests/test/script/buildfile
index 82af4dd..2c98193 100644
--- a/tests/test/script/buildfile
+++ b/tests/test/script/buildfile
@@ -2,6 +2,6 @@
# copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
-d = builtin/ runner/ integration/
+d = builtin/ integration/ runner/
./: $d
include $d