diff options
Diffstat (limited to 'libbuild2/test')
-rw-r--r-- | libbuild2/test/script/runner.cxx | 6 | ||||
-rw-r--r-- | libbuild2/test/script/script.cxx | 6 | ||||
-rw-r--r-- | libbuild2/test/script/script.hxx | 5 |
3 files changed, 16 insertions, 1 deletions
diff --git a/libbuild2/test/script/runner.cxx b/libbuild2/test/script/runner.cxx index 98d6868..54009f6 100644 --- a/libbuild2/test/script/runner.cxx +++ b/libbuild2/test/script/runner.cxx @@ -182,7 +182,11 @@ namespace build2 }); ++sp.exec_level; - build2::script::run (sp, expr, ii, li, ll, cf); + build2::script::run (sp, + expr, + ii, li, + ll, + cf, (cf != nullptr) /* replace_last_cmd */); --sp.exec_level; } diff --git a/libbuild2/test/script/script.cxx b/libbuild2/test/script/script.cxx index 7862120..176daf3 100644 --- a/libbuild2/test/script/script.cxx +++ b/libbuild2/test/script/script.cxx @@ -181,6 +181,12 @@ namespace build2 : exported_vars; } + void scope:: + sleep (const duration& d) + { + context.sched->sleep (d); + } + // script_base // script_base:: diff --git a/libbuild2/test/script/script.hxx b/libbuild2/test/script/script.hxx index 9409b01..d1e0f53 100644 --- a/libbuild2/test/script/script.hxx +++ b/libbuild2/test/script/script.hxx @@ -140,6 +140,11 @@ namespace build2 virtual void create_temp_dir () override {assert (false);}; + // Call the scheduler's sleep() function. + // + virtual void + sleep (const duration&) override; + // Return true if this is a test program path. // // Note that currently the test program is only specified via the test |