@@ -3,18 +3,7 @@ load("@fbsource//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
3
3
load ("@fbsource//tools/build_defs:fb_xplat_cxx_binary.bzl" , "fb_xplat_cxx_binary" )
4
4
load ("@fbsource//tools/build_defs/oss:rn_defs.bzl" , "rn_xplat_cxx_library" )
5
5
load ("@fbsource//tools/build_defs/third_party:yarn_defs.bzl" , "yarn_workspace" )
6
- load ("@fbsource//xplat/js/react-native-github/packages/react-native-codegen:DEFS.bzl" , "rn_codegen_test" )
7
-
8
- fb_native .sh_binary (
9
- name = "copy_fixture_schema" ,
10
- main = "buck_tests/copy_fixture.sh" ,
11
- resources = [
12
- "buck_tests/copy-fixture.js" ,
13
- "buck_tests/copy_fixture.sh" ,
14
- "fbsource//xplat/js:setup_env" ,
15
- "src/generators/__test_fixtures__/fixtures.js" ,
16
- ],
17
- )
6
+ load ("@fbsource//xplat/js/react-native-github/packages/react-native-codegen:DEFS.bzl" , "rn_codegen" )
18
7
19
8
fb_native .sh_binary (
20
9
name = "write_to_json" ,
@@ -44,64 +33,20 @@ fb_native.sh_binary(
44
33
visibility = ["PUBLIC" ],
45
34
)
46
35
47
- rn_codegen_test (
48
- fixture_name = "INTERFACE_ONLY" ,
49
- )
50
-
51
- rn_codegen_test (
52
- fixture_name = "BOOLEAN_PROP" ,
53
- )
54
-
55
- rn_codegen_test (
56
- fixture_name = "STRING_PROP" ,
57
- )
58
-
59
- rn_codegen_test (
60
- fixture_name = "INTEGER_PROPS" ,
61
- )
62
-
63
- rn_codegen_test (
64
- fixture_name = "FLOAT_PROPS" ,
65
- )
66
-
67
- rn_codegen_test (
68
- fixture_name = "COLOR_PROP" ,
69
- )
70
-
71
- rn_codegen_test (
72
- fixture_name = "IMAGE_PROP" ,
73
- )
74
-
75
- rn_codegen_test (
76
- fixture_name = "POINT_PROP" ,
77
- )
78
-
79
- rn_codegen_test (
80
- fixture_name = "ARRAY_PROPS" ,
81
- )
82
-
83
- rn_codegen_test (
84
- fixture_name = "MULTI_NATIVE_PROP" ,
85
- )
86
-
87
- rn_codegen_test (
88
- fixture_name = "ENUM_PROP" ,
89
- )
90
-
91
- rn_codegen_test (
92
- fixture_name = "EVENT_PROPS" ,
93
- )
94
-
95
- rn_codegen_test (
96
- fixture_name = "EVENT_NESTED_OBJECT_PROPS" ,
97
- )
98
-
99
- rn_codegen_test (
100
- fixture_name = "TWO_COMPONENTS_SAME_FILE" ,
36
+ fb_native .genrule (
37
+ name = "codegen_tests_schema" ,
38
+ srcs = glob (
39
+ [
40
+ "**/e2e/__test_fixtures__/*NativeComponent.js" ,
41
+ ],
42
+ ),
43
+ cmd = "$(exe fbsource//xplat/js/react-native-github/packages/react-native-codegen:write_to_json) $OUT $SRCS" ,
44
+ out = "schema-codegen_tests.json" ,
101
45
)
102
46
103
- rn_codegen_test (
104
- fixture_name = "TWO_COMPONENTS_DIFFERENT_FILES" ,
47
+ rn_codegen (
48
+ name = "codegen_tests" ,
49
+ schema_target = ":codegen_tests_schema" ,
105
50
)
106
51
107
52
fb_xplat_cxx_binary (
@@ -120,21 +65,7 @@ fb_xplat_cxx_binary(
120
65
],
121
66
visibility = ["PUBLIC" ],
122
67
deps = [
123
- ":generated_components-ARRAY_PROPS" ,
124
- ":generated_components-BOOLEAN_PROP" ,
125
- ":generated_components-COLOR_PROP" ,
126
- ":generated_components-ENUM_PROP" ,
127
- ":generated_components-EVENT_NESTED_OBJECT_PROPS" ,
128
- ":generated_components-EVENT_PROPS" ,
129
- ":generated_components-FLOAT_PROPS" ,
130
- ":generated_components-IMAGE_PROP" ,
131
- ":generated_components-INTEGER_PROPS" ,
132
- ":generated_components-INTERFACE_ONLY" ,
133
- ":generated_components-MULTI_NATIVE_PROP" ,
134
- ":generated_components-POINT_PROP" ,
135
- ":generated_components-STRING_PROP" ,
136
- ":generated_components-TWO_COMPONENTS_DIFFERENT_FILES" ,
137
- ":generated_components-TWO_COMPONENTS_SAME_FILE" ,
68
+ ":generated_components-codegen_tests" ,
138
69
],
139
70
)
140
71
@@ -157,21 +88,7 @@ rn_xplat_cxx_library(
157
88
"PUBLIC" ,
158
89
],
159
90
deps = [
160
- ":generated_components-ARRAY_PROPS" ,
161
- ":generated_components-BOOLEAN_PROP" ,
162
- ":generated_components-COLOR_PROP" ,
163
- ":generated_components-ENUM_PROP" ,
164
- ":generated_components-EVENT_NESTED_OBJECT_PROPS" ,
165
- ":generated_components-EVENT_PROPS" ,
166
- ":generated_components-FLOAT_PROPS" ,
167
- ":generated_components-IMAGE_PROP" ,
168
- ":generated_components-INTEGER_PROPS" ,
169
- ":generated_components-INTERFACE_ONLY" ,
170
- ":generated_components-MULTI_NATIVE_PROP" ,
171
- ":generated_components-POINT_PROP" ,
172
- ":generated_components-STRING_PROP" ,
173
- ":generated_components-TWO_COMPONENTS_DIFFERENT_FILES" ,
174
- ":generated_components-TWO_COMPONENTS_SAME_FILE" ,
91
+ ":generated_components-codegen_tests" ,
175
92
],
176
93
)
177
94
0 commit comments