Skip to content

Commit 37c2413

Browse files
JakobDegenfacebook-github-bot
authored andcommitted
tests: Remove deps on the prelude and ovr_config
Summary: I didn't notice until after the previous diff that some of these tests are not actually isolated. These ones were easy to fix, and almost certainly the result of copy + paste Reviewed By: IanChilds Differential Revision: D63972133 fbshipit-source-id: 03a1fdb2fa63b81d0bcb3e9d77b07df9bb72eef0
1 parent e443eed commit 37c2413

File tree

11 files changed

+53
-85
lines changed

11 files changed

+53
-85
lines changed

tests/core/build/BUCK

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ buck2_e2e_test(
66
name = "test_build_output_file_hashes",
77
srcs = ["test_build_output_file_hashes.py"],
88
data_dir = "test_build_output_file_hashes_data",
9-
env = {
10-
"OVR_CONFIG": "1",
11-
"PRELUDE": "$(location prelude//:prelude)",
12-
},
139
serialize_test_cases = False,
1410
)
1511

@@ -88,30 +84,18 @@ buck2_e2e_test(
8884
name = "test_out_flag",
8985
srcs = ["test_out_flag.py"],
9086
data_dir = "test_out_flag_data",
91-
env = {
92-
"OVR_CONFIG": "1",
93-
"PRELUDE": "$(location prelude//:prelude)",
94-
},
9587
)
9688

9789
buck2_e2e_test(
9890
name = "test_nested_subtargets",
9991
srcs = ["test_nested_subtargets.py"],
10092
data_dir = "test_nested_subtargets_data",
101-
env = {
102-
"OVR_CONFIG": "1",
103-
"PRELUDE": "$(location prelude//:prelude)",
104-
},
10593
)
10694

10795
buck2_e2e_test(
10896
name = "test_build_report",
10997
srcs = ["test_build_report.py"],
11098
data_dir = "test_build_report_data",
111-
env = {
112-
"OVR_CONFIG": "1",
113-
"PRELUDE": "$(location prelude//:prelude)",
114-
},
11599
deps = [
116100
"//buck2/tests/e2e_util:utils",
117101
],
@@ -155,10 +139,6 @@ buck2_e2e_test(
155139
name = "test_build_response",
156140
srcs = ["test_build_response.py"],
157141
data_dir = "test_build_response_data",
158-
env = {
159-
"OVR_CONFIG": "1",
160-
"PRELUDE": "$(location prelude//:prelude)",
161-
},
162142
deps = [
163143
"//buck2/tests/e2e_util:utils",
164144
],
@@ -168,10 +148,6 @@ buck2_e2e_test(
168148
name = "test_build_rule_type_name_logging",
169149
srcs = ["test_build_rule_type_name_logging.py"],
170150
data_dir = "test_build_rule_type_name_logging_data",
171-
env = {
172-
"OVR_CONFIG": "1",
173-
"PRELUDE": "$(location prelude//:prelude)",
174-
},
175151
deps = [
176152
"//buck2/tests/e2e_util:utils",
177153
],
Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
[buildfile]
2-
name=TARGETS.fixture
1+
[cells]
2+
root = .
33

4-
[repositories]
5-
root = .
6-
fbcode = fbcode
7-
fbsource = fbsource
8-
buck = buck
9-
toolchains = toolchains
10-
prelude = prelude
11-
config = config
4+
[buildfile]
5+
name=TARGETS.fixture

tests/core/build/test_build_output_file_hashes_data/TARGETS.fixture

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load(":defs.bzl", "export_file")
2+
13
export_file(
24
name = "file.txt",
35
src = "file.txt",
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
#
3+
# This source code is licensed under both the MIT license found in the
4+
# LICENSE-MIT file in the root directory of this source tree and the Apache
5+
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6+
# of this source tree.
7+
8+
def _export_file_impl(ctx):
9+
return [DefaultInfo(default_output = ctx.attrs.src)]
10+
11+
export_file = rule(
12+
impl = _export_file_impl,
13+
attrs = {
14+
"src": attrs.source(allow_directory = True),
15+
},
16+
)
Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
[buildfile]
2-
name=TARGETS.fixture
1+
[cells]
2+
root = .
33

4-
[repositories]
5-
root = .
6-
fbcode = fbcode
7-
fbsource = fbsource
8-
buck = buck
9-
toolchains = toolchains
10-
prelude = prelude
11-
config = config
4+
[buildfile]
5+
name=TARGETS.fixture
Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
[buildfile]
2-
name=TARGETS.fixture
1+
[cells]
2+
root = .
33

4-
[repositories]
5-
root = .
6-
fbcode = fbcode
7-
fbsource = fbsource
8-
buck = buck
9-
toolchains = toolchains
10-
prelude = prelude
11-
config = config
4+
[buildfile]
5+
name=TARGETS.fixture
Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
[buildfile]
2-
name=TARGETS.fixture
1+
[cells]
2+
root = .
33

4-
[repositories]
5-
root = .
6-
fbcode = fbcode
7-
fbsource = fbsource
8-
buck = buck
9-
toolchains = toolchains
10-
prelude = prelude
11-
config = config
4+
[buildfile]
5+
name=TARGETS.fixture
Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
[buildfile]
2-
name=TARGETS.fixture
1+
[cells]
2+
root = .
33

4-
[repositories]
5-
root = .
6-
fbcode = fbcode
7-
fbsource = fbsource
8-
buck = buck
9-
toolchains = toolchains
10-
prelude = prelude
11-
config = config
4+
[buildfile]
5+
name=TARGETS.fixture
Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
[buildfile]
2-
name=TARGETS.fixture
1+
[cells]
2+
root = .
33

4-
[repositories]
5-
root = .
6-
fbcode = fbcode
7-
fbsource = fbsource
8-
buck = buck
9-
toolchains = toolchains
10-
prelude = prelude
11-
config = config
4+
[buildfile]
5+
name=TARGETS.fixture

tests/core/build/test_out_flag_data/TARGETS.fixture

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load(":defs.bzl", "out_library")
1+
load(":defs.bzl", "export_file", "out_library")
22

33
export_file(
44
name = "a.txt",

0 commit comments

Comments
 (0)