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,87 +3,82 @@ ...@@ -3,87 +3,82 @@
# found in the LICENSE file. # found in the LICENSE file.
{ {
'targets': [ 'targets':
{ [
'target_name': 'gtest', {
'type': 'static_library', 'target_name': 'gtest',
'include_dirs': [ 'type': 'static_library',
'../third_party/googletest', 'include_dirs':
'../third_party/googletest/include', [
], '../third_party/googletest',
'sources': [ '../third_party/googletest/include',
'../third_party/googletest/src/gtest-all.cc', ],
], 'sources':
}, [
{ '../third_party/googletest/src/gtest-all.cc',
'target_name': 'gmock', ],
'type': 'static_library', },
'include_dirs': [
'../third_party/googlemock', {
'../third_party/googlemock/include', 'target_name': 'gmock',
'../third_party/googletest/include', 'type': 'static_library',
], 'include_dirs':
'sources': [ [
'../third_party/googlemock/src/gmock-all.cc', '../third_party/googlemock',
], '../third_party/googlemock/include',
}, '../third_party/googletest/include',
{ ],
'target_name': 'preprocessor_tests', 'sources':
'type': 'executable', [
'dependencies': [ '../third_party/googlemock/src/gmock-all.cc',
'../src/angle.gyp:preprocessor', ],
'gtest', },
'gmock',
], {
'include_dirs': [ 'target_name': 'preprocessor_tests',
'../src/compiler/preprocessor', 'type': 'executable',
'../third_party/googletest/include', 'dependencies':
'../third_party/googlemock/include', [
], '../src/angle.gyp:preprocessor',
'sources': [ 'gtest',
'../third_party/googlemock/src/gmock_main.cc', 'gmock',
'preprocessor_tests/char_test.cpp', ],
'preprocessor_tests/comment_test.cpp', 'include_dirs':
'preprocessor_tests/define_test.cpp', [
'preprocessor_tests/error_test.cpp', '../src/compiler/preprocessor',
'preprocessor_tests/extension_test.cpp', '../third_party/googletest/include',
'preprocessor_tests/identifier_test.cpp', '../third_party/googlemock/include',
'preprocessor_tests/if_test.cpp', ],
'preprocessor_tests/input_test.cpp', 'sources':
'preprocessor_tests/location_test.cpp', [
'preprocessor_tests/MockDiagnostics.h', '../third_party/googlemock/src/gmock_main.cc',
'preprocessor_tests/MockDirectiveHandler.h', '<!@(python enumerate_files.py preprocessor_tests -types *.cpp *.h)'
'preprocessor_tests/number_test.cpp', ],
'preprocessor_tests/operator_test.cpp', },
'preprocessor_tests/pragma_test.cpp',
'preprocessor_tests/PreprocessorTest.cpp', {
'preprocessor_tests/PreprocessorTest.h', 'target_name': 'compiler_tests',
'preprocessor_tests/space_test.cpp', 'type': 'executable',
'preprocessor_tests/token_test.cpp', 'dependencies':
'preprocessor_tests/version_test.cpp', [
], '../src/angle.gyp:translator',
}, 'gtest',
{ 'gmock',
'target_name': 'compiler_tests', ],
'type': 'executable', 'include_dirs':
'dependencies': [ [
'../src/angle.gyp:translator', '../include',
'gtest', '../src',
'gmock', '../third_party/googletest/include',
], '../third_party/googlemock/include',
'include_dirs': [ ],
'../include', 'sources':
'../src', [
'../third_party/googletest/include', '../third_party/googlemock/src/gmock_main.cc',
'../third_party/googlemock/include', '<!@(python enumerate_files.py compiler_tests -types *.cpp *.h)'
], ],
'sources': [ },
'../third_party/googlemock/src/gmock_main.cc', ],
'compiler_tests/ExpressionLimit_test.cpp',
'compiler_tests/VariablePacker_test.cpp',
],
},
],
} }
# Local Variables: # Local Variables:
......
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