Commit c3597523 by Geoff Lang Committed by Geoff Lang

Refactored the tests.gyp file.

parent 0e435467
...@@ -8,13 +8,9 @@ ...@@ -8,13 +8,9 @@
'target_name': 'all', 'target_name': 'all',
'type': 'none', 'type': 'none',
'dependencies': [ 'dependencies': [
# TODO(alokp): build_ prefix should be removed from the gyp files
# as soon as we can get rid of manually-maintained sln files.
# Otherwise auto-generated sln files will overwrite/conflict the
# manually maintained ones.
'../samples/samples.gyp:*', '../samples/samples.gyp:*',
'../src/angle.gyp:*', '../src/angle.gyp:*',
'../tests/build_tests.gyp:*', '../tests/tests.gyp:*',
], ],
}, },
], ],
......
import fnmatch
import os
import sys
rootdirs = [ ]
filetypes = [ ]
foundTypesArg = False
for i in range(1, len(sys.argv)):
arg = sys.argv[i]
if arg == "-types":
foundTypesArg = True
continue
if foundTypesArg:
filetypes.append(arg)
else:
rootdirs.append(arg)
for rootdir in rootdirs:
for root, dirnames, filenames in os.walk(rootdir):
for file in filenames:
for type in filetypes:
if fnmatch.fnmatchcase(file, type):
print os.path.join(root, file).replace("\\", "/")
break
...@@ -3,84 +3,79 @@ ...@@ -3,84 +3,79 @@
# found in the LICENSE file. # found in the LICENSE file.
{ {
'targets': [ 'targets':
[
{ {
'target_name': 'gtest', 'target_name': 'gtest',
'type': 'static_library', 'type': 'static_library',
'include_dirs': [ 'include_dirs':
[
'../third_party/googletest', '../third_party/googletest',
'../third_party/googletest/include', '../third_party/googletest/include',
], ],
'sources': [ 'sources':
[
'../third_party/googletest/src/gtest-all.cc', '../third_party/googletest/src/gtest-all.cc',
], ],
}, },
{ {
'target_name': 'gmock', 'target_name': 'gmock',
'type': 'static_library', 'type': 'static_library',
'include_dirs': [ 'include_dirs':
[
'../third_party/googlemock', '../third_party/googlemock',
'../third_party/googlemock/include', '../third_party/googlemock/include',
'../third_party/googletest/include', '../third_party/googletest/include',
], ],
'sources': [ 'sources':
[
'../third_party/googlemock/src/gmock-all.cc', '../third_party/googlemock/src/gmock-all.cc',
], ],
}, },
{ {
'target_name': 'preprocessor_tests', 'target_name': 'preprocessor_tests',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies':
[
'../src/angle.gyp:preprocessor', '../src/angle.gyp:preprocessor',
'gtest', 'gtest',
'gmock', 'gmock',
], ],
'include_dirs': [ 'include_dirs':
[
'../src/compiler/preprocessor', '../src/compiler/preprocessor',
'../third_party/googletest/include', '../third_party/googletest/include',
'../third_party/googlemock/include', '../third_party/googlemock/include',
], ],
'sources': [ 'sources':
[
'../third_party/googlemock/src/gmock_main.cc', '../third_party/googlemock/src/gmock_main.cc',
'preprocessor_tests/char_test.cpp', '<!@(python enumerate_files.py preprocessor_tests -types *.cpp *.h)'
'preprocessor_tests/comment_test.cpp',
'preprocessor_tests/define_test.cpp',
'preprocessor_tests/error_test.cpp',
'preprocessor_tests/extension_test.cpp',
'preprocessor_tests/identifier_test.cpp',
'preprocessor_tests/if_test.cpp',
'preprocessor_tests/input_test.cpp',
'preprocessor_tests/location_test.cpp',
'preprocessor_tests/MockDiagnostics.h',
'preprocessor_tests/MockDirectiveHandler.h',
'preprocessor_tests/number_test.cpp',
'preprocessor_tests/operator_test.cpp',
'preprocessor_tests/pragma_test.cpp',
'preprocessor_tests/PreprocessorTest.cpp',
'preprocessor_tests/PreprocessorTest.h',
'preprocessor_tests/space_test.cpp',
'preprocessor_tests/token_test.cpp',
'preprocessor_tests/version_test.cpp',
], ],
}, },
{ {
'target_name': 'compiler_tests', 'target_name': 'compiler_tests',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies':
[
'../src/angle.gyp:translator', '../src/angle.gyp:translator',
'gtest', 'gtest',
'gmock', 'gmock',
], ],
'include_dirs': [ 'include_dirs':
[
'../include', '../include',
'../src', '../src',
'../third_party/googletest/include', '../third_party/googletest/include',
'../third_party/googlemock/include', '../third_party/googlemock/include',
], ],
'sources': [ 'sources':
[
'../third_party/googlemock/src/gmock_main.cc', '../third_party/googlemock/src/gmock_main.cc',
'compiler_tests/ExpressionLimit_test.cpp', '<!@(python enumerate_files.py compiler_tests -types *.cpp *.h)'
'compiler_tests/VariablePacker_test.cpp',
], ],
}, },
], ],
......
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