support globbing in extra_clean([...])
authorSimon Marlow <marlowsd@gmail.com>
Tue, 2 Aug 2011 13:11:11 +0000 (14:11 +0100)
committerSimon Marlow <marlowsd@gmail.com>
Wed, 3 Aug 2011 12:12:13 +0000 (13:12 +0100)
testsuite/driver/testlib.py

index 7fdc6e6..0728cc3 100644 (file)
@@ -598,11 +598,12 @@ def test_common_work (name, opts, func, args):
     if package_conf_cache_file_start_timestamp != package_conf_cache_file_end_timestamp:
         framework_fail(name, 'whole-test', 'Package cache timestamps do not match: ' + str(package_conf_cache_file_start_timestamp) + ' ' + str(package_conf_cache_file_end_timestamp))
 
-def clean(names):
-    clean_full_paths(map (lambda name: in_testdir(name), names))
+def clean(strs):
+    for str in strs:
+        for name in glob.glob(in_testdir(str)):
+            clean_full_path(name)
 
-def clean_full_paths(names):
-    for name in names:
+def clean_full_path(name):
         try:
             # Remove files...
             os.remove(name)