Skip to content

Commit

Permalink
pw_build: Make pw_load_phase_test host only
Browse files Browse the repository at this point in the history
Change-Id: I51064a9468fdf1f232fd16221705eb053571d368
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/230072
Commit-Queue: Dave Roth <davidroth@google.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
  • Loading branch information
davexroth authored and CQ Bot Account committed Aug 16, 2024
1 parent 39884c8 commit 52fbfaf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pw_build/load_phase_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"""Test helpers for glob_dirs()."""

load("@bazel_skylib//lib:unittest.bzl", "analysistest", "asserts")
load("//pw_build:compatibility.bzl", "incompatible_with_mcu")

def return_error(err):
"""Testing helper to return an error string rather than fail().
Expand Down Expand Up @@ -70,7 +71,6 @@ PW_LOAD_PHASE_TEST_TYPES = struct(
def _load_phase_test_impl(ctx):
env = analysistest.begin(ctx)
target_under_test = analysistest.target_under_test(env)

asserts.equals(
env,
target_under_test[_TestExpectationInfo].expected,
Expand All @@ -89,6 +89,7 @@ def pw_load_phase_test(comparison_type):
expected = expected,
actual = actual,
tags = tags + ["manual"],
target_compatible_with = incompatible_with_mcu(),
testonly = True,
**rule_kwargs
)
Expand All @@ -97,6 +98,7 @@ def pw_load_phase_test(comparison_type):
name = name,
target_under_test = name + ".case",
tags = tags,
target_compatible_with = incompatible_with_mcu(),
**rule_kwargs
)

Expand Down

0 comments on commit 52fbfaf

Please sign in to comment.