diff --git a/.bcr/presubmit.yml b/.bcr/presubmit.yml index 17ad62c..3e1ffb4 100644 --- a/.bcr/presubmit.yml +++ b/.bcr/presubmit.yml @@ -8,5 +8,7 @@ bcr_test_module: name: "Run test module" bazel: ${{ bazel }} platform: ${{ platform }} + test_flags: + - "--test_tag_filters=-requires-docker" test_targets: - "//..." diff --git a/apt/extensions.bzl b/apt/extensions.bzl index 8166073..cea40e0 100644 --- a/apt/extensions.bzl +++ b/apt/extensions.bzl @@ -421,7 +421,7 @@ def _distroless_extension(mctx): ) # Key every package by the architecture we are resolving for, not by the - # package's own `Architecture` field. + # package's own `Architecture` field. # For arch-specific packages these are the same. # For `Architecture: all` packages this "expands" them into one entry per target architecture, # so each carries its own arch-specific dependency closure instead of a single frozen one shared across arches. diff --git a/apt/tests/deb_postfix_test.bzl b/apt/tests/deb_postfix_test.bzl index 45f06e9..0c373f6 100644 --- a/apt/tests/deb_postfix_test.bzl +++ b/apt/tests/deb_postfix_test.bzl @@ -5,7 +5,6 @@ load("//distroless/tests:asserts.bzl", "assert_tar_listing") _TEST_SUITE_PREFIX = "deb_postfix/" - def deb_postfix_tests(): native.genrule( name = "_deb_postfix_mergedusr_data", diff --git a/apt/tests/dpkg_status_test.bzl b/apt/tests/dpkg_status_test.bzl index be6c00f..391bb63 100644 --- a/apt/tests/dpkg_status_test.bzl +++ b/apt/tests/dpkg_status_test.bzl @@ -5,7 +5,6 @@ load("//distroless/tests:asserts.bzl", "assert_tar_listing") _TEST_SUITE_PREFIX = "dpkg_status/" - def dpkg_status_tests(): # Test with single control archive native.genrule( diff --git a/apt/tests/dpkg_statusd_test.bzl b/apt/tests/dpkg_statusd_test.bzl index 33a8668..9608531 100644 --- a/apt/tests/dpkg_statusd_test.bzl +++ b/apt/tests/dpkg_statusd_test.bzl @@ -5,7 +5,6 @@ load("//distroless/tests:asserts.bzl", "assert_tar_listing") _TEST_SUITE_PREFIX = "dpkg_statusd/" - def dpkg_statusd_tests(): # Test basic dpkg_statusd with single package native.genrule( diff --git a/distroless/tests/flatten_test.bzl b/distroless/tests/flatten_test.bzl index 6c1f810..3ced117 100644 --- a/distroless/tests/flatten_test.bzl +++ b/distroless/tests/flatten_test.bzl @@ -5,7 +5,6 @@ load("//distroless/tests:asserts.bzl", "assert_tar_listing") _TEST_SUITE_PREFIX = "flatten/" - def flatten_tests(): # Test flattening two simple tar archives native.genrule( diff --git a/distroless/tests/locale_test.bzl b/distroless/tests/locale_test.bzl index cfc699a..09e2205 100644 --- a/distroless/tests/locale_test.bzl +++ b/distroless/tests/locale_test.bzl @@ -5,7 +5,6 @@ load("//distroless/tests:asserts.bzl", "assert_tar_listing") _TEST_SUITE_PREFIX = "locale/" - def locale_tests(): # Test basic locale extraction native.genrule( diff --git a/e2e/smoke/BUILD b/e2e/smoke/BUILD index c97b224..32b9c97 100644 --- a/e2e/smoke/BUILD +++ b/e2e/smoke/BUILD @@ -1,4 +1,5 @@ load("@bazel_lib//lib:transitions.bzl", "platform_transition_filegroup") +load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@container_structure_test//:defs.bzl", "container_structure_test") load("@rules_distroless//distroless:defs.bzl", "cacerts", "group", "passwd") load("@rules_oci//oci:defs.bzl", "oci_image", "oci_load") @@ -121,12 +122,23 @@ oci_load( target_compatible_with = COMPATIBLE_WITH, ) +build_test( + name = "smoke_build_test", + targets = [ + ":image_platform", + ":tarball", + ], +) + container_structure_test( - name = "test", + name = "structure_test", configs = select({ "@platforms//cpu:arm64": ["test_linux_arm64.yaml"], "@platforms//cpu:x86_64": ["test_linux_amd64.yaml"], }), image = ":image_platform", + tags = [ + "requires-docker", + ], target_compatible_with = COMPATIBLE_WITH, )