aboutsummaryrefslogtreecommitdiff
path: root/build2/test/script/script
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-10-28 21:19:36 +0300
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 09:26:36 +0200
commit134b6691cb57bb0089889faea2e4788bd450941e (patch)
tree4cf89997580054c9b13677689501a5f47b74e833 /build2/test/script/script
parentbd6ebe8c2ca359fb201b84d9004b650d943b4d51 (diff)
Add support for &dir/*** test path cleanup syntax
Diffstat (limited to 'build2/test/script/script')
-rw-r--r--build2/test/script/script24
1 files changed, 18 insertions, 6 deletions
diff --git a/build2/test/script/script b/build2/test/script/script
index 362f0df..c3b717f 100644
--- a/build2/test/script/script
+++ b/build2/test/script/script
@@ -171,8 +171,23 @@ namespace build2
optional<description> desc;
// Files and directories that must be automatically cleaned up when
- // the scope is left. If the path ends with a trailing slash, then it
- // is assumed to be to a directory, otherwise -- to a file.
+ // the scope is left. If the path contains '*' it is a wildcard. If the
+ // path is not a wildcard and ends with a trailing slash, then it is
+ // assumed to be to a directory, otherwise -- to a file. A directory
+ // must be empty by the time of removal,
+ //
+ // The supported wildcards:
+ //
+ // dir/*** - remove directory 'dir' with all files and sub-directories
+ // recursively. Removing non-existing 'dir' is not an error.
+ //
+ // The not yet supported wildcards:
+ //
+ // &dir/* - remove all immediate files of directory 'dir';
+ // &dir/*/ - remove all immediate sub-directories (must be empty);
+ // &dir/** - remove all files recursively;
+ // &dir/**/ - remove all sub-directories recursively (must be empty by
+ // the time of removal).
//
paths cleanups;
@@ -206,10 +221,7 @@ namespace build2
// Register path for cleanup. Suppress duplicates.
//
void
- clean (const path& p);
-
- void
- clean (path&& p);
+ clean (path p);
public:
virtual