diff --git a/tools/impl/test_config.py b/tools/impl/test_config.py index f1269def68..6166b45be1 100755 --- a/tools/impl/test_config.py +++ b/tools/impl/test_config.py @@ -32,7 +32,6 @@ class TestOption(enum.Enum): # Please add a bug number when restricting a tests. CRATE_OPTIONS: dict[str, list[TestOption]] = { "aarch64": [TestOption.BUILD_ARM_ONLY, TestOption.DO_NOT_BUILD_ARMHF], #b/210015864 - "bit_field_derive": [TestOption.RUN_X86_ONLY], # b/206843832 "crosvm_plugin": [TestOption.BUILD_X86_ONLY], "devices": [TestOption.SINGLE_THREADED, TestOption.DO_NOT_BUILD_ARMHF], "disk": [TestOption.RUN_X86_ONLY], # b/202294155 diff --git a/tools/impl/test_runner.py b/tools/impl/test_runner.py index 150c04cd48..2e4ad13643 100755 --- a/tools/impl/test_runner.py +++ b/tools/impl/test_runner.py @@ -74,6 +74,7 @@ class Executable(NamedTuple): binary_path: Path crate_name: str cargo_target: str + kind: str is_test: bool is_fresh: bool @@ -168,6 +169,7 @@ def cargo( Path(json_line.get("executable")), crate_name=json_line.get("package_id", "").split(" ")[0], cargo_target=json_line.get("target").get("name"), + kind=json_line.get("target").get("kind")[0], is_test=json_line.get("profile", {}).get("test", False), is_fresh=json_line.get("fresh", False), ) @@ -245,8 +247,12 @@ def execute_test(target: TestTarget, executable: Executable): if TestOption.SINGLE_THREADED in options: args += ["--test-threads=1"] + # proc-macros and their tests are executed on the host. + if executable.kind == "proc-macro": + target = TestTarget("host") + if VERBOSE: - print(f"Running test {executable.name}...") + print(f"Running test {executable.name} on {target}...") try: # Pipe stdout/err to be printed in the main process if needed. test_process = test_target.exec_file_on_target(