Commit c3597523 by Geoff Lang Committed by Geoff Lang

Refactored the tests.gyp file.

parent 0e435467
......@@ -8,13 +8,9 @@
'target_name': 'all',
'type': 'none',
'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:*',
'../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 @@
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'gtest',
'type': 'static_library',
'include_dirs': [
'../third_party/googletest',
'../third_party/googletest/include',
],
'sources': [
'../third_party/googletest/src/gtest-all.cc',
],
},
{
'target_name': 'gmock',
'type': 'static_library',
'include_dirs': [
'../third_party/googlemock',
'../third_party/googlemock/include',
'../third_party/googletest/include',
],
'sources': [
'../third_party/googlemock/src/gmock-all.cc',
],
},
{
'target_name': 'preprocessor_tests',
'type': 'executable',
'dependencies': [
'../src/angle.gyp:preprocessor',
'gtest',
'gmock',
],
'include_dirs': [
'../src/compiler/preprocessor',
'../third_party/googletest/include',
'../third_party/googlemock/include',
],
'sources': [
'../third_party/googlemock/src/gmock_main.cc',
'preprocessor_tests/char_test.cpp',
'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',
'type': 'executable',
'dependencies': [
'../src/angle.gyp:translator',
'gtest',
'gmock',
],
'include_dirs': [
'../include',
'../src',
'../third_party/googletest/include',
'../third_party/googlemock/include',
],
'sources': [
'../third_party/googlemock/src/gmock_main.cc',
'compiler_tests/ExpressionLimit_test.cpp',
'compiler_tests/VariablePacker_test.cpp',
],
},
],
'targets':
[
{
'target_name': 'gtest',
'type': 'static_library',
'include_dirs':
[
'../third_party/googletest',
'../third_party/googletest/include',
],
'sources':
[
'../third_party/googletest/src/gtest-all.cc',
],
},
{
'target_name': 'gmock',
'type': 'static_library',
'include_dirs':
[
'../third_party/googlemock',
'../third_party/googlemock/include',
'../third_party/googletest/include',
],
'sources':
[
'../third_party/googlemock/src/gmock-all.cc',
],
},
{
'target_name': 'preprocessor_tests',
'type': 'executable',
'dependencies':
[
'../src/angle.gyp:preprocessor',
'gtest',
'gmock',
],
'include_dirs':
[
'../src/compiler/preprocessor',
'../third_party/googletest/include',
'../third_party/googlemock/include',
],
'sources':
[
'../third_party/googlemock/src/gmock_main.cc',
'<!@(python enumerate_files.py preprocessor_tests -types *.cpp *.h)'
],
},
{
'target_name': 'compiler_tests',
'type': 'executable',
'dependencies':
[
'../src/angle.gyp:translator',
'gtest',
'gmock',
],
'include_dirs':
[
'../include',
'../src',
'../third_party/googletest/include',
'../third_party/googlemock/include',
],
'sources':
[
'../third_party/googlemock/src/gmock_main.cc',
'<!@(python enumerate_files.py compiler_tests -types *.cpp *.h)'
],
},
],
}
# 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