11load ("@bazel_binaries//:defs.bzl" , "bazel_binaries" )
2- load ("@bazel_skylib//:bzl_library.bzl" , "bzl_library" )
32load (
43 "@rules_bazel_integration_test//bazel_integration_test:defs.bzl" ,
54 "bazel_integration_tests" ,
@@ -23,13 +22,19 @@ default_test_runner(
2322 bazel_cmds = ["build --extra_toolchains=@bazeldnf//tools/e2e/output:toolchain //..." ],
2423)
2524
25+ DEFAULT_TEST_TAGS = [
26+ "manual" ,
27+ "exclusive" , # TODO: remove once we manage CI to work properly
28+ "no-sandbox" , # TODO: remove once we manage CI to work properly
29+ ]
30+
2631# bazel-workspace: legacy WORKSPACE mode (Bazel 6.x, 7.x)
2732bazel_integration_tests (
2833 name = "e2e_workspace" ,
2934 timeout = "short" ,
3035 bazel_binaries = bazel_binaries ,
3136 bazel_versions = WORKSPACE_BAZEL_VERSIONS ,
32- tags = [ "manual" ] ,
37+ tags = DEFAULT_TEST_TAGS ,
3338 test_runner = ":test-runner" ,
3439 workspace_files = glob_workspace_files (
3540 "bazel-workspace" ,
@@ -46,7 +51,7 @@ bazel_integration_tests(
4651 timeout = "short" ,
4752 bazel_binaries = bazel_binaries ,
4853 bazel_versions = BZLMOD_BAZEL_VERSIONS ,
49- tags = [ "manual" ] ,
54+ tags = DEFAULT_TEST_TAGS ,
5055 test_runner = ":test-runner" ,
5156 workspace_files = glob_workspace_files (
5257 "bazel-bzlmod" ,
@@ -63,7 +68,7 @@ bazel_integration_tests(
6368 timeout = "short" ,
6469 bazel_binaries = bazel_binaries ,
6570 bazel_versions = BZLMOD_BAZEL_VERSIONS ,
66- tags = [ "manual" ] ,
71+ tags = DEFAULT_TEST_TAGS ,
6772 test_runner = ":test-runner" ,
6873 workspace_files = glob_workspace_files ("bazel-bzlmod-lock-file" ) + [
6974 "//:local_repository_files" ,
@@ -77,7 +82,7 @@ bazel_integration_tests(
7782 timeout = "short" ,
7883 bazel_binaries = bazel_binaries ,
7984 bazel_versions = BZLMOD_BAZEL_VERSIONS ,
80- tags = [ "manual" ] ,
85+ tags = DEFAULT_TEST_TAGS ,
8186 test_runner = ":test-runner" ,
8287 workspace_files = glob_workspace_files (
8388 "bazel-bzlmod-toolchain-from-source" ,
@@ -94,7 +99,7 @@ bazel_integration_tests(
9499 timeout = "short" ,
95100 bazel_binaries = bazel_binaries ,
96101 bazel_versions = BZLMOD_BAZEL_VERSIONS ,
97- tags = [ "manual" ] ,
102+ tags = DEFAULT_TEST_TAGS ,
98103 test_runner = ":test-runner" ,
99104 workspace_files = glob_workspace_files (
100105 "bazel-bzlmod-toolchain-from-source-lock-file" ,
@@ -119,7 +124,7 @@ bazel_integration_tests(
119124 timeout = "short" ,
120125 bazel_binaries = bazel_binaries ,
121126 bazel_versions = BZLMOD_BAZEL_VERSIONS ,
122- tags = [ "manual" ] ,
127+ tags = DEFAULT_TEST_TAGS ,
123128 test_runner = ":lock-file-from-args-runner" ,
124129 workspace_files = glob_workspace_files ("bazel-bzlmod-lock-file-from-args" ) + [
125130 "//:local_repository_files" ,
@@ -141,9 +146,8 @@ bazel_integration_tests(
141146 timeout = "short" ,
142147 bazel_binaries = bazel_binaries ,
143148 bazel_versions = BZLMOD_BAZEL_VERSIONS ,
144- tags = [
149+ tags = DEFAULT_TEST_TAGS + [
145150 "allowed-to-fail" , # TODO: drop once the circular dependencies passes
146- "manual" ,
147151 ],
148152 test_runner = ":test-runner_circular_deps" ,
149153 workspace_files = glob_workspace_files (
@@ -155,9 +159,33 @@ bazel_integration_tests(
155159 workspace_path = "bzlmod-toolchain-circular-dependencies" ,
156160)
157161
162+ default_test_runner (
163+ name = "test-runner-repo-yaml" ,
164+ bazel_cmds = [
165+ "run :bazeldnf -- init --fc 44 --output $(pwd)/repo.yaml" ,
166+ "run :bazeldnf -- fetch --repofile $(pwd)/repo.yaml" ,
167+ "run :bazeldnf -- resolve --repofile $(pwd)/repo.yaml bash" ,
168+ ],
169+ )
170+
171+ bazel_integration_tests (
172+ name = "e2e_repo_yaml" ,
173+ timeout = "short" ,
174+ bazel_binaries = bazel_binaries ,
175+ bazel_versions = BZLMOD_BAZEL_VERSIONS ,
176+ tags = DEFAULT_TEST_TAGS ,
177+ test_runner = ":test-runner-repo-yaml" ,
178+ workspace_files = glob_workspace_files ("repo-yaml" ) + [
179+ "//:local_repository_files" ,
180+ ],
181+ workspace_path = "repo-yaml" ,
182+ )
183+
184+ DEFAULT_TEST_SUITE_TAGS = ["manual" ]
185+
158186test_suite (
159187 name = "workspace" ,
160- tags = [ "manual" ] ,
188+ tags = DEFAULT_TEST_SUITE_TAGS ,
161189 tests = integration_test_utils .bazel_integration_test_names (
162190 "e2e_workspace" ,
163191 WORKSPACE_BAZEL_VERSIONS ,
@@ -166,7 +194,7 @@ test_suite(
166194
167195test_suite (
168196 name = "bzlmod" ,
169- tags = [ "manual" ] ,
197+ tags = DEFAULT_TEST_SUITE_TAGS ,
170198 tests = integration_test_utils .bazel_integration_test_names (
171199 "e2e_bzlmod" ,
172200 BZLMOD_BAZEL_VERSIONS ,
@@ -175,7 +203,7 @@ test_suite(
175203
176204test_suite (
177205 name = "bzlmod-lock-file" ,
178- tags = [ "manual" ] ,
206+ tags = DEFAULT_TEST_SUITE_TAGS ,
179207 tests = integration_test_utils .bazel_integration_test_names (
180208 "e2e_bzlmod_lock_file" ,
181209 BZLMOD_BAZEL_VERSIONS ,
@@ -184,7 +212,7 @@ test_suite(
184212
185213test_suite (
186214 name = "bzlmod-toolchain-from-source" ,
187- tags = [ "manual" ] ,
215+ tags = DEFAULT_TEST_SUITE_TAGS ,
188216 tests = integration_test_utils .bazel_integration_test_names (
189217 "e2e_bzlmod_toolchain_from_source" ,
190218 BZLMOD_BAZEL_VERSIONS ,
@@ -193,9 +221,8 @@ test_suite(
193221
194222test_suite (
195223 name = "circular-deps" ,
196- tags = [
224+ tags = DEFAULT_TEST_SUITE_TAGS + [
197225 "allowed-to-fail" , # TODO: drop once the circular dependencies passes
198- "manual" ,
199226 ],
200227 tests = integration_test_utils .bazel_integration_test_names (
201228 "e2e_circular_deps" ,
@@ -205,29 +232,34 @@ test_suite(
205232
206233test_suite (
207234 name = "lock-file-from-args" ,
208- tags = [ "manual" ] ,
235+ tags = DEFAULT_TEST_SUITE_TAGS ,
209236 tests = integration_test_utils .bazel_integration_test_names (
210237 "e2e_lock_file_from_args" ,
211238 BZLMOD_BAZEL_VERSIONS ,
212239 ),
213240)
214241
242+ test_suite (
243+ name = "repo-yaml" ,
244+ tags = DEFAULT_TEST_SUITE_TAGS ,
245+ tests = integration_test_utils .bazel_integration_test_names (
246+ "e2e_repo_yaml" ,
247+ BZLMOD_BAZEL_VERSIONS ,
248+ ),
249+ )
250+
215251test_suite (
216252 name = "e2e" ,
217- tags = [ "manual" ] ,
253+ tags = DEFAULT_TEST_SUITE_TAGS ,
218254 tests = [
219255 ":workspace" ,
220256 ":bzlmod" ,
221257 ":bzlmod-lock-file" ,
222258 ":bzlmod-toolchain-from-source" ,
223259 # ":circular-deps", # TODO: uncomment once circular dependencies are fixed
224260 ":lock-file-from-args" ,
261+ ":repo-yaml" ,
225262 ],
226263)
227264
228- bzl_library (
229- name = "helpers" ,
230- srcs = ["helpers.bzl" ],
231- visibility = ["//visibility:public" ],
232- deps = ["@bazel_skylib//lib:paths" ],
233- )
265+ # gazelle:exclude helpers.bzl
0 commit comments