functional2: fix in the development shell

The functional2 test suite was broken in the development shell for two mostly
separate reasons leading to "no such file or directory" errors:

* The `BUILD_TEST_SHELL` (already containing the correct path) would always be
  set from the Meson option `build_test_shell`, even to the empty string if
  that option is not set. Skip the overwrite in this case to make the
  environment variable work again.
* Sandboxed builds would fail to find their builder `/bin/sh`, since in the
  development shell busybox is not found, so no sandbox shell gets configured.
  Use the shell from `BUILD_TEST_SHELL` instead. (How this does not break the
  old functional tests remains a mystery.)

Change-Id: I6a6a696424e8caaef3f9b68e3738bfd58ea0b056
This commit is contained in:
Alois Wohlschlager
2025-10-07 20:14:48 +00:00
committed by alois31
parent 41fab8a31c
commit 42691f0d94
3 changed files with 5 additions and 2 deletions
+1
View File
@@ -144,6 +144,7 @@ def get_global_asset(name: str) -> Fileish:
"system": os.environ.get("system"), # noqa: SIM112 # system is actually lowercase here
# Either just the build shell or entire global path if we are darwin
"path": os.environ.get("BUILD_TEST_SHELL") or os.environ.get("PATH"),
"shell": Path(os.environ.get("BUILD_TEST_SHELL") or "/bin") / "sh",
},
)
return CopyFile(functional2_base_folder / "testlib" / "global_assets" / name)