Commit 08c9cd97 by Geoff Lang

Remove last uses of the enumerate_files script.

BUG=angleproject:981 Change-Id: Ib91d4b515e129241814706351b69a74e8295a250 Reviewed-on: https://chromium-review.googlesource.com/266874Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 704c716a
import fnmatch
import os
import sys
dirs = [ ]
types = [ ]
excludes = [ ]
files = [ ]
# Default to accepting a list of directories first
curArray = dirs
# Iterate over the arguments and add them to the arrays
for i in range(1, len(sys.argv)):
arg = sys.argv[i]
if arg == "-dirs":
curArray = dirs
continue
if arg == "-types":
curArray = types
continue
if arg == "-excludes":
curArray = excludes
continue
curArray.append(arg)
# If no directories were specified, use the current directory
if len(dirs) == 0:
dirs.append(".")
# If no types were specified, accept all types
if len(types) == 0:
types.append("*")
# Walk the directories listed and compare with type and exclude lists
for rootdir in dirs:
for root, dirnames, filenames in os.walk(rootdir):
for file in filenames:
# Skip files that are "hidden"
if file.startswith("."):
continue;
fullPath = os.path.join(root, file).replace("\\", "/")
for type in types:
if fnmatch.fnmatchcase(fullPath, type):
excluded = False
for exclude in excludes:
if fnmatch.fnmatchcase(fullPath, exclude):
excluded = True
break
if not excluded:
files.append(fullPath)
break
files.sort()
for file in files:
print file
...@@ -5,9 +5,18 @@ ...@@ -5,9 +5,18 @@
{ {
'sources': 'sources':
[ [
'<!@(python <(angle_path)/enumerate_files.py \ 'API_test.cpp',
-dirs <(angle_path)/tests/compiler_tests \ 'CollectVariables_test.cpp',
-types *.cpp *.h \ 'ConstantFolding_test.cpp',
-excludes <(angle_path)/tests/compiler_tests/compiler_test_main.cpp)' 'DebugShaderPrecision_test.cpp',
'ExpressionLimit_test.cpp',
'MalformedShader_test.cpp',
'NV_draw_buffers_test.cpp',
'PruneUnusedFunctions_test.cpp',
'ShaderExtension_test.cpp',
'ShaderVariable_test.cpp',
'TypeTracking_test.cpp',
'UnrollFlatten_test.cpp',
'VariablePacker_test.cpp',
], ],
} }
...@@ -5,9 +5,22 @@ ...@@ -5,9 +5,22 @@
{ {
'sources': 'sources':
[ [
'<!@(python <(angle_path)/enumerate_files.py \ 'PreprocessorTest.cpp',
-dirs <(angle_path)/tests/preprocessor_tests \ 'PreprocessorTest.h',
-types *.cpp *.h \ 'char_test.cpp',
-excludes <(angle_path)/tests/preprocessor_tests/preprocessor_test_main.cpp)' 'comment_test.cpp',
'define_test.cpp',
'error_test.cpp',
'extension_test.cpp',
'identifier_test.cpp',
'if_test.cpp',
'input_test.cpp',
'location_test.cpp',
'number_test.cpp',
'operator_test.cpp',
'pragma_test.cpp',
'space_test.cpp',
'token_test.cpp',
'version_test.cpp',
], ],
} }
...@@ -254,7 +254,9 @@ ...@@ -254,7 +254,9 @@
}, },
'sources': 'sources':
[ [
'<!@(python <(angle_path)/enumerate_files.py gles_conformance_tests -types *.cpp *.h *.inl)', 'gles_conformance_tests/gles_conformance_tests.cpp',
'gles_conformance_tests/gles_conformance_tests.h',
'gles_conformance_tests/gles_conformance_tests_main.cpp',
'<(gles2_conformance_tests_generated_file)', '<(gles2_conformance_tests_generated_file)',
], ],
'include_dirs': 'include_dirs':
...@@ -319,7 +321,9 @@ ...@@ -319,7 +321,9 @@
}, },
'sources': 'sources':
[ [
'<!@(python <(angle_path)/enumerate_files.py gles_conformance_tests -types *.cpp *.h *.inl)', 'gles_conformance_tests/gles_conformance_tests.cpp',
'gles_conformance_tests/gles_conformance_tests.h',
'gles_conformance_tests/gles_conformance_tests_main.cpp',
'<(gles3_conformance_tests_generated_file)', '<(gles3_conformance_tests_generated_file)',
], ],
'include_dirs': 'include_dirs':
...@@ -396,7 +400,9 @@ ...@@ -396,7 +400,9 @@
}, },
'sources': 'sources':
[ [
'<!@(python <(angle_path)/enumerate_files.py deqp_tests -types *.cpp *.h *.inl)', 'deqp_tests/deqp_test_main.cpp',
'deqp_tests/deqp_tests.cpp',
'deqp_tests/deqp_tests.h',
'<(deqp_tests_generated_file)', '<(deqp_tests_generated_file)',
], ],
'actions': 'actions':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment