diff options
author | Timothy J Fontaine <tjfontaine@gmail.com> | 2013-11-10 15:15:34 -0800 |
---|---|---|
committer | Timothy J Fontaine <tjfontaine@gmail.com> | 2013-11-10 15:15:34 -0800 |
commit | 201098535443ef6588b0fd176a425fdf3213ee70 (patch) | |
tree | 3259766e34c4a70f087c0ea52c16e0bc74eb11a7 /tools/gyp/gyptest.py | |
parent | 3dcc9b93e1e4d80aa15a40a9d82a6b9f0bef0ec0 (diff) | |
download | android-node-v8-201098535443ef6588b0fd176a425fdf3213ee70.tar.gz android-node-v8-201098535443ef6588b0fd176a425fdf3213ee70.tar.bz2 android-node-v8-201098535443ef6588b0fd176a425fdf3213ee70.zip |
gyp: update to bebdcea
Diffstat (limited to 'tools/gyp/gyptest.py')
-rwxr-xr-x | tools/gyp/gyptest.py | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/tools/gyp/gyptest.py b/tools/gyp/gyptest.py index efa75a7aa8..a80dfbf2df 100755 --- a/tools/gyp/gyptest.py +++ b/tools/gyp/gyptest.py @@ -130,15 +130,18 @@ sys.stdout = Unbuffered(sys.stdout) sys.stderr = Unbuffered(sys.stderr) +def is_test_name(f): + return f.startswith('gyptest') and f.endswith('.py') + + def find_all_gyptest_files(directory): - result = [] - for root, dirs, files in os.walk(directory): - if '.svn' in dirs: - dirs.remove('.svn') - result.extend([ os.path.join(root, f) for f in files - if f.startswith('gyptest') and f.endswith('.py') ]) - result.sort() - return result + result = [] + for root, dirs, files in os.walk(directory): + if '.svn' in dirs: + dirs.remove('.svn') + result.extend([ os.path.join(root, f) for f in files if is_test_name(f) ]) + result.sort() + return result def main(argv=None): @@ -186,6 +189,9 @@ def main(argv=None): if os.path.isdir(arg): tests.extend(find_all_gyptest_files(os.path.normpath(arg))) else: + if not is_test_name(os.path.basename(arg)): + print >>sys.stderr, arg, 'is not a valid gyp test name.' + sys.exit(1) tests.append(arg) if opts.list: @@ -210,6 +216,7 @@ def main(argv=None): else: # TODO: not duplicate this mapping from pylib/gyp/__init__.py format_list = { + 'aix5': ['make'], 'freebsd7': ['make'], 'freebsd8': ['make'], 'openbsd5': ['make'], |