Skip to content

Commit

Permalink
bzlmod test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rickvanprim committed May 15, 2023
1 parent 23d9c92 commit aea405f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 2 additions & 0 deletions testing/core/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,5 @@ nix_pkg.local_expr(

non_module_deps = use_extension("//:non_module_deps.bzl", "non_module_deps")
use_repo(non_module_deps, "nixpkgs_location_expansion_test")
use_repo(non_module_deps, "flake-hello")
use_repo(non_module_deps, "flake-hello-with-build-file")
17 changes: 15 additions & 2 deletions testing/core/tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ expand_location_unit_test_suite()
"expr-attribute-test",
"relative-imports",
"extra-args-test",
"flake-hello",
"flake-hello-with-build-file",
]
] + [
# These tests use the nix package generated by ./output.nix
Expand Down Expand Up @@ -63,6 +61,21 @@ expand_location_unit_test_suite()
],
data = [nix_pkg("rules_nixpkgs_core_testing", "output-filegroup-manual-test", "//:manual-filegroup")],
),
] + [
# All of these tests use the "hello" binary to see
# whether different invocations of `nixpkgs_flake_package`
# produce a valid bazel repository.
sh_test(
name = "run-{0}".format(test),
timeout = "short",
srcs = ["test_bin.sh"],
args = ["$(location @{0}//:bin)".format(test)],
data = ["@{0}//:bin".format(test)],
)
for test in [
"flake-hello",
"flake-hello-with-build-file",
]
]

# Test nixopts location expansion
Expand Down

0 comments on commit aea405f

Please sign in to comment.