forked from tree-sitter/tree-sitter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests.gyp
123 lines (117 loc) · 3.61 KB
/
tests.gyp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
{
'targets': [
{
'target_name': 'benchmarks',
'default_configuration': 'Release',
'type': 'executable',
'dependencies': [
'project.gyp:runtime',
'project.gyp:compiler'
],
'include_dirs': [
'src',
'test',
'externals/utf8proc',
],
'sources': [
'test/benchmarks.cc',
'test/helpers/file_helpers.cc',
'test/helpers/load_language.cc',
'test/helpers/read_test_entries.cc',
'test/helpers/stderr_logger.cc',
],
},
{
'target_name': 'tests',
'default_configuration': 'Test',
'type': 'executable',
'dependencies': [
'project.gyp:runtime',
'project.gyp:compiler'
],
'include_dirs': [
'src',
'test',
'externals/bandit',
'externals/utf8proc',
'externals/crypto-algorithms',
],
'sources': [
'test/compiler/build_tables/lex_item_test.cc',
'test/compiler/build_tables/parse_item_set_builder_test.cc',
'test/compiler/build_tables/rule_can_be_blank_test.cc',
'test/compiler/prepare_grammar/expand_repeats_test.cc',
'test/compiler/prepare_grammar/expand_tokens_test.cc',
'test/compiler/prepare_grammar/extract_choices_test.cc',
'test/compiler/prepare_grammar/extract_tokens_test.cc',
'test/compiler/prepare_grammar/flatten_grammar_test.cc',
'test/compiler/prepare_grammar/intern_symbols_test.cc',
'test/compiler/prepare_grammar/parse_regex_test.cc',
'test/compiler/rules/character_set_test.cc',
'test/compiler/rules/rule_test.cc',
'test/compiler/util/string_helpers_test.cc',
'test/helpers/file_helpers.cc',
'test/helpers/load_language.cc',
'test/helpers/point_helpers.cc',
'test/helpers/random_helpers.cc',
'test/helpers/read_test_entries.cc',
'test/helpers/record_alloc.cc',
'test/helpers/scope_sequence.cc',
'test/helpers/spy_input.cc',
'test/helpers/spy_logger.cc',
'test/helpers/stderr_logger.cc',
'test/helpers/stream_methods.cc',
'test/helpers/tree_helpers.cc',
'test/integration/fuzzing-examples.cc',
'test/integration/real_grammars.cc',
'test/integration/test_grammars.cc',
'test/runtime/language_test.cc',
'test/runtime/node_test.cc',
'test/runtime/parser_test.cc',
'test/runtime/stack_test.cc',
'test/runtime/subtree_test.cc',
'test/runtime/tree_test.cc',
'test/tests.cc',
],
'cflags': [
'-g',
'-O0',
'-Wall',
'-Wextra',
'-Wno-unused-parameter',
'-Wno-unknown-pragmas',
],
'ldflags': ['-g'],
'xcode_settings': {
'ARCHS': ['x86_64'],
'OTHER_LDFLAGS': ['-g'],
'OTHER_CPLUSPLUSFLAGS': ['-fsanitize=address'],
'GCC_OPTIMIZATION_LEVEL': '0',
'WARNING_CFLAGS': [
'-Wall',
'-Wextra',
'-Wno-unused-parameter'
],
},
}
],
'target_defaults': {
'configurations': {'Test': {}, 'Release': {}},
'cflags_cc': ['-std=c++14'],
'conditions': [
['OS=="linux"', {
'libraries': ['-ldl', '-lpthread'],
}],
# For 64-bit builds on appveyor, we need to explicitly tell gyp
# to generate an x64 target in the MSVS project file.
['"<!(echo %PLATFORM%)" == "x64"', {
'msvs_configuration_platform': 'x64',
}]
],
'xcode_settings': {
'ARCHS': ['x86_64'],
'CLANG_CXX_LANGUAGE_STANDARD': 'c++14',
'ALWAYS_SEARCH_USER_PATHS': 'NO',
}
}
}