ast10x0: Support runner passthrough for host-side tests Add support for `PW_RUNNER_PASSTHROUGH` in the AST10x0 QEMU runner. This allows bypassing QEMU for host-side tests like `no_panics_test` which run host tools on the binary rather than running the binary in QEMU. Also update `MODULE.bazel.lock` to match the resolved dependencies from the recent Pigweed roll. TAG=agy CONV=998cf98c-b89c-4331-9de9-713a3cef86a4
diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 8c16755..f01dfaa 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock
@@ -96,10 +96,10 @@ "https://bcr.bazel.build/modules/bazel_skylib/1.8.1/MODULE.bazel": "88ade7293becda963e0e3ea33e7d54d3425127e0a326e0d17da085a5f1f03ff6", "https://bcr.bazel.build/modules/bazel_skylib/1.8.2/MODULE.bazel": "69ad6927098316848b34a9142bcc975e018ba27f08c4ff403f50c1b6e646ca67", "https://bcr.bazel.build/modules/bazel_skylib/1.8.2/source.json": "34a3c8bcf233b835eb74be9d628899bb32999d3e0eadef1947a0a562a2b16ffb", - "https://bcr.bazel.build/modules/bazel_worker_api/0.0.8/MODULE.bazel": "396c1ef53835aafe3d42ce6619080531ee770648303731f16cfaa33fa056bf0c", - "https://bcr.bazel.build/modules/bazel_worker_api/0.0.8/source.json": "abaf8ac9d2ab2f47bda9af4c0c080ff7907378888e1f4bc62a0539dd13ba61e8", - "https://bcr.bazel.build/modules/bazel_worker_java/0.0.8/MODULE.bazel": "e76479eae70bd4e8f5f4c2dfc5d03ab971cfb18750246c7b3f3454c5c2ee6629", - "https://bcr.bazel.build/modules/bazel_worker_java/0.0.8/source.json": "9395c4679444bc47bf7e51a710366a4480aa371c6f6bed01868e2fabcf11acec", + "https://bcr.bazel.build/modules/bazel_worker_api/0.0.10/MODULE.bazel": "a426df551b40c3997c351d05f00f0d1f86b618ddb646012f1e9c72efce8ed939", + "https://bcr.bazel.build/modules/bazel_worker_api/0.0.10/source.json": "7f220d3edfeba5d1f61535fd8400338df74f8bdeb241ebe660534c6926a5a645", + "https://bcr.bazel.build/modules/bazel_worker_java/0.0.10/MODULE.bazel": "538f21f715cab81c4a43f73e1a91a0c1f8accd9b263dd2a831952805fcfc1a62", + "https://bcr.bazel.build/modules/bazel_worker_java/0.0.10/source.json": "1646d3aaf5a4bc0d587ecb33d81e93ea9284ff96f5ef579006a9c054945bbe7a", "https://bcr.bazel.build/modules/boringssl/0.0.0-20211025-d4f1ab9/MODULE.bazel": "6ee6353f8b1a701fe2178e1d925034294971350b6d3ac37e67e5a7d463267834", "https://bcr.bazel.build/modules/boringssl/0.0.0-20230215-5c22014/MODULE.bazel": "4b03dc0d04375fa0271174badcd202ed249870c8e895b26664fd7298abea7282", "https://bcr.bazel.build/modules/boringssl/0.0.0-20240530-2db0eb3/MODULE.bazel": "d0405b762c5e87cd445b7015f2b8da5400ef9a8dbca0bfefa6c1cea79d528a97", @@ -275,8 +275,8 @@ "https://bcr.bazel.build/modules/riegeli/0.0.0-20250706-c4d1f27/MODULE.bazel": "b8b7309fb00c6b545fafcdfc3bf8cba168a61d37d841b9d90bacf7e70ae6627c", "https://bcr.bazel.build/modules/riegeli/0.0.0-20250706-c4d1f27/source.json": "af3e2998bdf2f0ca3695816695c079f885d1e5b838e1d05ca82450aba4941762", "https://bcr.bazel.build/modules/rules_android/0.1.1/MODULE.bazel": "48809ab0091b07ad0182defb787c4c5328bd3a278938415c00a7b69b50c4d3a8", - "https://bcr.bazel.build/modules/rules_android/0.7.0/MODULE.bazel": "929facc633889d48d8074c5c8867c331f0a5db93a5cde377ff5c5c2883ce0672", - "https://bcr.bazel.build/modules/rules_android/0.7.0/source.json": "35fbd8385fdde75430cd9a71b7eab7bd821f311e053898a401f826f72f04e312", + "https://bcr.bazel.build/modules/rules_android/0.7.2/MODULE.bazel": "0862d727582c8d117ac09cd3451b5e93d8b91033f0f13bb61a4a10334958130d", + "https://bcr.bazel.build/modules/rules_android/0.7.2/source.json": "bf2dfc8dc72ffd2b58643c9d547f1b7faea4de65aa28ac4894687fa6afa09861", "https://bcr.bazel.build/modules/rules_apple/3.16.0/MODULE.bazel": "0d1caf0b8375942ce98ea944be754a18874041e4e0459401d925577624d3a54a", "https://bcr.bazel.build/modules/rules_apple/3.16.0/source.json": "d8b5fe461272018cc07cfafce11fe369c7525330804c37eec5a82f84cd475366", "https://bcr.bazel.build/modules/rules_apple/3.5.1/MODULE.bazel": "3d1bbf65ad3692003d36d8a29eff54d4e5c1c5f4bfb60f79e28646a924d9101c", @@ -421,7 +421,8 @@ "https://bcr.bazel.build/modules/rules_python/1.6.0/MODULE.bazel": "7e04ad8f8d5bea40451cf80b1bd8262552aa73f841415d20db96b7241bd027d8", "https://bcr.bazel.build/modules/rules_python/1.6.3/MODULE.bazel": "a7b80c42cb3de5ee2a5fa1abc119684593704fcd2fec83165ebe615dec76574f", "https://bcr.bazel.build/modules/rules_python/1.8.3/MODULE.bazel": "f343e159b59701334be3914416b9f1b72845801ba47920fcb288af4ce8c5cce3", - "https://bcr.bazel.build/modules/rules_python/1.8.3/source.json": "e5439f308e3c6f79f318a0f87108db46fc575be89370c3dfb3f7e0eaa571a3f8", + "https://bcr.bazel.build/modules/rules_python/1.8.5/MODULE.bazel": "28b2d79ed8368d7d45b34bacc220e3c0b99cbcd9392641961b849e4c3f55dd30", + "https://bcr.bazel.build/modules/rules_python/1.8.5/source.json": "e261b03c8804f2582c9536013f987e1ea105a2b38c238aa2ac8f98fc34c8b18a", "https://bcr.bazel.build/modules/rules_robolectric/4.14.1.2/MODULE.bazel": "d44fec647d0aeb67b9f3b980cf68ba634976f3ae7ccd6c07d790b59b87a4f251", "https://bcr.bazel.build/modules/rules_robolectric/4.14.1.2/source.json": "37c10335f2361c337c5c1f34ed36d2da70534c23088062b33a8bdaab68aa9dea", "https://bcr.bazel.build/modules/rules_rust/0.45.1/MODULE.bazel": "a69d0db3a958fab2c6520961e1b2287afcc8b36690fd31bbc4f6f7391397150d", @@ -1414,7 +1415,7 @@ "@@pigweed+//pw_toolchain/rust:extensions.bzl%pw_rust": { "general": { "bzlTransitiveDigest": "VbWv5Ea8Ymo5+WBLsxmIiRRjVMUDImyeIdt8xvmCgsU=", - "usagesDigest": "YzpIXmFoIn9Cty7YZXsgNJ/4mLBN2bczMIkTIU/Lf2o=", + "usagesDigest": "Mn1vx1ylzaCYMjD+mP21TLMrkq8VuEnezRq7Qnt4k3Q=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -1440,7 +1441,7 @@ "attributes": { "build_file": "@@pigweed+//pw_toolchain/rust:rust_analyzer.BUILD", "path": "fuchsia/third_party/rust-analyzer/linux-arm64", - "tag": "git_revision:451a56a69d6c75d84f94255e8fee7e65f5d69697" + "tag": "git_revision:96556515cd87746f53d67aec3015775d6c97ef00" } }, "rust_toolchain_host_linux_x86_64": { @@ -1464,7 +1465,7 @@ "attributes": { "build_file": "@@pigweed+//pw_toolchain/rust:rust_analyzer.BUILD", "path": "fuchsia/third_party/rust-analyzer/linux-amd64", - "tag": "git_revision:451a56a69d6c75d84f94255e8fee7e65f5d69697" + "tag": "git_revision:96556515cd87746f53d67aec3015775d6c97ef00" } }, "rust_toolchain_host_macos_aarch64": { @@ -1488,7 +1489,7 @@ "attributes": { "build_file": "@@pigweed+//pw_toolchain/rust:rust_analyzer.BUILD", "path": "fuchsia/third_party/rust-analyzer/mac-arm64", - "tag": "git_revision:451a56a69d6c75d84f94255e8fee7e65f5d69697" + "tag": "git_revision:96556515cd87746f53d67aec3015775d6c97ef00" } }, "rust_toolchain_host_macos_x86_64": { @@ -1512,7 +1513,7 @@ "attributes": { "build_file": "@@pigweed+//pw_toolchain/rust:rust_analyzer.BUILD", "path": "fuchsia/third_party/rust-analyzer/mac-amd64", - "tag": "git_revision:451a56a69d6c75d84f94255e8fee7e65f5d69697" + "tag": "git_revision:96556515cd87746f53d67aec3015775d6c97ef00" } }, "rust_toolchain_target_thumbv6m-none-eabi_armv6-m": { @@ -1559,8 +1560,8 @@ }, "@@rules_android+//bzlmod_extensions:apksig.bzl%apksig_extension": { "general": { - "bzlTransitiveDigest": "xeN+uPP1PKslnv5h3+uyhGaFXC4IIzcFwX/nQHlNwZk=", - "usagesDigest": "rHfA6bMg3ctHXSOf9PtupLLie0fpKjh4zfajt3dbw9k=", + "bzlTransitiveDigest": "e3tZv7PITDbeQ2FdfXQDCXE9ZDeLwFF1AAn0QsumcIE=", + "usagesDigest": "S8lLnnZxdeYUYq3kIGhVMk0wQ9Fd6elmCskvn+SL6iw=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -1568,7 +1569,10 @@ "apksig": { "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", "attributes": { - "url": "https://android.googlesource.com/platform/tools/apksig/+archive/24e3075e68ebe17c0b529bb24bfda819db5e2f3b.tar.gz", + "urls": [ + "https://mirror.bazel.build/android.googlesource.com/platform/tools/apksig/+archive/24e3075e68ebe17c0b529bb24bfda819db5e2f3b.tar.gz" + ], + "sha256": "12e44fdbd219c5e1cc62099c2a01d775957603d2d4f693f8285f9d95d9a04e77", "build_file": "@@rules_android+//bzlmod_extensions:apksig.BUILD" } } @@ -1584,8 +1588,8 @@ }, "@@rules_android+//bzlmod_extensions:com_android_dex.bzl%com_android_dex_extension": { "general": { - "bzlTransitiveDigest": "2icqERrdWnpamgt/akEgAtfBsjNG1/st+AAFRZx9aH4=", - "usagesDigest": "1sVFzDM28cga/brtXsfsI+G21CqIYNRw7kn/AjL6CLg=", + "bzlTransitiveDigest": "dg5WUiBG+9ZvwJ6EWK9WkoBnYb/RL6UjDmDcTpkctck=", + "usagesDigest": "0hluQmaWiWak6sVMP5L4wXhNyIwv9fw0y5JJ8lnPb1c=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -1593,8 +1597,11 @@ "com_android_dex": { "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", "attributes": { - "url": "https://android.googlesource.com/platform/dalvik/+archive/5a81c499a569731e2395f7c8d13c0e0d4e17a2b6.tar.gz", - "build_file": "@@rules_android+//bzlmod_extensions:com_android_dex.BUILD" + "urls": [ + "https://mirror.bazel.build/android.googlesource.com/platform/dalvik/+archive/5a81c499a569731e2395f7c8d13c0e0d4e17a2b6.tar.gz" + ], + "build_file": "@@rules_android+//bzlmod_extensions:com_android_dex.BUILD", + "sha256": "86b4848c038bf687fadc812239cb01fb8d1d15cef3125b480a0448360992b95d" } } }, @@ -1609,8 +1616,8 @@ }, "@@rules_android+//rules/android_sdk_repository:rule.bzl%android_sdk_repository_extension": { "general": { - "bzlTransitiveDigest": "+rMrzIrv7sImYmkbXJYv+gFpTJQ79X3MpwwMLI2A+oA=", - "usagesDigest": "62SD846d7zsiEOnzDL1vF3xvvKorkOdLFCj7LYcmDvk=", + "bzlTransitiveDigest": "qHbR00gVzVzkxX+PRtv4UGcUFMtBz7TK9CNYUWH8nIE=", + "usagesDigest": "tTIw/WMyb1t/LzacDY8lDjUznzxQ3MyXW6474WIS3WQ=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -2469,7 +2476,7 @@ "@@rules_python+//python/extensions:config.bzl%config": { "general": { "bzlTransitiveDigest": "uo49IDITNsksO4x76pZ7eYlLKomkU77mK8VTrbCHXZM=", - "usagesDigest": "HZ99ezJBkgjKcxXQ3OBxGgesUIMF6eg7E0TUNOait2I=", + "usagesDigest": "lDbpRfhoWmZCHSaNxwZv/8fF2y0wu2th0G0f/uqX7VM=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -2704,7 +2711,7 @@ "@@rules_python+//python/uv:uv.bzl%uv": { "general": { "bzlTransitiveDigest": "zyNsrbgVKwpA0B3zI84imAfuC424VSzYNPgjr/HJy5M=", - "usagesDigest": "XRYYokHTb3p1WwpZj2sncZ1bh8zJfO4YrKJ2PkapnO8=", + "usagesDigest": "c4BCoL7WnccEomzDYulDuOys9pd6N93KaNI4mTVbqi0=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {},
diff --git a/target/ast10x0/harness/qemu_runner.py b/target/ast10x0/harness/qemu_runner.py index a00b525..198698a 100644 --- a/target/ast10x0/harness/qemu_runner.py +++ b/target/ast10x0/harness/qemu_runner.py
@@ -10,6 +10,7 @@ import argparse import logging +import os import subprocess import sys import tempfile @@ -60,7 +61,7 @@ default=30, help="Seconds to wait for a test result sentinel (0 = no timeout, default: 30)", ) - return parser.parse_args() + return parser.parse_known_args() def _detokenizer(image: Path, tokenized_file: Path, qemu_finished: threading.Event): @@ -189,4 +190,10 @@ if __name__ == "__main__": - _main(_parse_args()) + known_args, remaining_args = _parse_args() + if os.environ.get("PW_RUNNER_PASSTHROUGH") == "1": + _LOG.info("Bypassing QEMU: %s", known_args.image) + res = subprocess.run([known_args.image] + remaining_args) + sys.exit(res.returncode) + + _main(known_args)