From f7c880765e0b15a65044ec894e42fe0786eed69d Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Fri, 30 Mar 2012 14:52:38 +0000 Subject: [PATCH] Reduce pauses. [SVN r77648] --- test/BoostBuild.py | 13 ++++++++++++- test/absolute_sources.py | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/test/BoostBuild.py b/test/BoostBuild.py index f93130da5..9ad920287 100644 --- a/test/BoostBuild.py +++ b/test/BoostBuild.py @@ -381,9 +381,16 @@ class Tester(TestCmd.TestCmd): os.utime(self.native_file_name(name), None) def rm(self, names): - self.wait_for_time_change_since_last_build() if not type(names) == types.ListType: names = [names] + + if names == ["."]: + # If we're deleting the entire workspace, there's no + # need to wait for a clock tick. + self.last_build_time_start = 0 + self.last_build_time_finish = 0 + + self.wait_for_time_change_since_last_build() # Avoid attempts to remove the current directory. os.chdir(self.original_workdir) @@ -511,6 +518,10 @@ class Tester(TestCmd.TestCmd): self.tree = tree.build_tree(self.workdir) self.difference = tree.trees_difference(self.previous_tree, self.tree) + if self.difference.empty(): + # If nothing was changed, there's no need to wait + self.last_build_time_start = 0 + self.last_build_time_finish = 0 self.difference.ignore_directories() self.unexpected_difference = copy.deepcopy(self.difference) diff --git a/test/absolute_sources.py b/test/absolute_sources.py index 58e2cf451..4053b35ca 100644 --- a/test/absolute_sources.py +++ b/test/absolute_sources.py @@ -26,6 +26,7 @@ t.write("empty.cpp", "\n") t.run_build_system() t.expect_addition("bin/$toolset/debug/hello.exe") +t.rm(".") # Test a contrived case. There, absolute name is used in a standalone project # (not Jamfile). Moreover, the target with an absolute name is returned by