diff --git a/test/TestCmd.py b/test/TestCmd.py index 5c3685aab..196719825 100644 --- a/test/TestCmd.py +++ b/test/TestCmd.py @@ -259,6 +259,8 @@ class TestCmd: condition = self.condition #print "cleanup(" + condition + "): ", self._preserve if self._preserve[condition]: + for dir in self._dirlist: + print "Preserved directory", dir return os.chdir(self._cwd) self.workdir = None diff --git a/test/test_system.html b/test/test_system.html index f00ad9925..815423b71 100644 --- a/test/test_system.html +++ b/test/test_system.html @@ -17,6 +17,7 @@ img.banner { border: 0; float: left } h1 { text-align: right } br.clear { clear: left } + div.attention { color: red } @@ -38,6 +39,8 @@
Examining the working directory and changing it
+ +
Test result
@@ -69,6 +72,9 @@
Methods for ignoring changes
+
Methods for explicitly specifying + results
+
Helper class List
@@ -196,6 +202,23 @@ FAILED test of D:\MyDocu~1\Work\build\boost-build\boost-build -d0 yet accounted for. It is possible to assure that this list is empty by calling expect_nothing_more member function.

+

Test result

+ +

Any of the expect* methods below will fail the test if the + expectation is not met. It is also possible to perform manually arbitrary + test and explicitly cause the test to either pass or fail. Ordinary + filesystem functions can be used to work with the directory tree. Methods + pass_test and fail_test are used to explicitly give the + test outcome.

+ +

Typically, after test termination, the working directory is erased. If + is possible to prevent it by setting environmental variables + PRESERVE, PRESERVE_PASS and PRESERVE_FAIL. + Non-zero value of the first makes the working directory preserved in all + cases, while the other variables apply only to specific outcomes. When a + directory is preserved, its name will be printed to the standard + output.

+

Reference documentation

The test system is composed of class Tester, derived form @@ -394,6 +417,20 @@ FAILED test of D:\MyDocu~1\Work\build\boost-build\boost-build -d0

The method ignore(self, wildcard) ignores all the changes made to files that match a wildcard.

+

Methods for explicitly specifying + results

+ +

Method pass_test(self, condition=1)

+ +
+ At this moment, the method should not be used. +
+ +

Method fail_test(self, condition=1)

+ +

Effects: Cause the test to fail if condition is + true.

+

Helper class List

The class has sequence interface and two additional methods. diff --git a/v2/test/TestCmd.py b/v2/test/TestCmd.py index 5c3685aab..196719825 100644 --- a/v2/test/TestCmd.py +++ b/v2/test/TestCmd.py @@ -259,6 +259,8 @@ class TestCmd: condition = self.condition #print "cleanup(" + condition + "): ", self._preserve if self._preserve[condition]: + for dir in self._dirlist: + print "Preserved directory", dir return os.chdir(self._cwd) self.workdir = None diff --git a/v2/test/test_system.html b/v2/test/test_system.html index f00ad9925..815423b71 100644 --- a/v2/test/test_system.html +++ b/v2/test/test_system.html @@ -17,6 +17,7 @@ img.banner { border: 0; float: left } h1 { text-align: right } br.clear { clear: left } + div.attention { color: red } @@ -38,6 +39,8 @@
Examining the working directory and changing it
+ +
Test result
@@ -69,6 +72,9 @@
Methods for ignoring changes
+
Methods for explicitly specifying + results
+
Helper class List
@@ -196,6 +202,23 @@ FAILED test of D:\MyDocu~1\Work\build\boost-build\boost-build -d0 yet accounted for. It is possible to assure that this list is empty by calling expect_nothing_more member function.

+

Test result

+ +

Any of the expect* methods below will fail the test if the + expectation is not met. It is also possible to perform manually arbitrary + test and explicitly cause the test to either pass or fail. Ordinary + filesystem functions can be used to work with the directory tree. Methods + pass_test and fail_test are used to explicitly give the + test outcome.

+ +

Typically, after test termination, the working directory is erased. If + is possible to prevent it by setting environmental variables + PRESERVE, PRESERVE_PASS and PRESERVE_FAIL. + Non-zero value of the first makes the working directory preserved in all + cases, while the other variables apply only to specific outcomes. When a + directory is preserved, its name will be printed to the standard + output.

+

Reference documentation

The test system is composed of class Tester, derived form @@ -394,6 +417,20 @@ FAILED test of D:\MyDocu~1\Work\build\boost-build\boost-build -d0

The method ignore(self, wildcard) ignores all the changes made to files that match a wildcard.

+

Methods for explicitly specifying + results

+ +

Method pass_test(self, condition=1)

+ +
+ At this moment, the method should not be used. +
+ +

Method fail_test(self, condition=1)

+ +

Effects: Cause the test to fail if condition is + true.

+

Helper class List

The class has sequence interface and two additional methods.