mirror of https://github.com/tc39/test262.git
Fix generator clean fail on .DS_Store
This commit is contained in:
parent
d6b5b1358c
commit
2e7cdfbe18
|
@ -9,6 +9,11 @@ import glob, os, sys
|
||||||
from lib.expander import Expander
|
from lib.expander import Expander
|
||||||
from lib.test import Test
|
from lib.test import Test
|
||||||
|
|
||||||
|
# base name of the files to be ignored
|
||||||
|
ignored_files = [
|
||||||
|
'.DS_Store',
|
||||||
|
]
|
||||||
|
|
||||||
def print_error(*values):
|
def print_error(*values):
|
||||||
print('ERROR:', *values, file=sys.stderr)
|
print('ERROR:', *values, file=sys.stderr)
|
||||||
|
|
||||||
|
@ -35,6 +40,8 @@ def find_cases(location):
|
||||||
def clean(args):
|
def clean(args):
|
||||||
for (subdir, _, fileNames) in os.walk(args.directory):
|
for (subdir, _, fileNames) in os.walk(args.directory):
|
||||||
for fileName in map(lambda x: os.path.join(subdir, x), fileNames):
|
for fileName in map(lambda x: os.path.join(subdir, x), fileNames):
|
||||||
|
if os.path.basename(fileName) in ignored_files:
|
||||||
|
continue
|
||||||
test = Test(fileName)
|
test = Test(fileName)
|
||||||
test.load()
|
test.load()
|
||||||
if test.is_generated():
|
if test.is_generated():
|
||||||
|
|
Loading…
Reference in New Issue