Skip to content

Commit daa3aab

Browse files
committed
test: keep hosted application fixture outside unit discovery
1 parent a6cecdb commit daa3aab

6 files changed

Lines changed: 11 additions & 4 deletions

File tree

‎.agents/docs/2026-10-08-llvm-2313-part2-execution-and-dependencies.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,3 +371,10 @@ openkal-llvm-runtime 提交 `b4198d346cf0682c95dc0e51b5c32b096843ee83`。
371371
闭包与原有输出检查通过后,复用同一栈再次构建线程源码,运行
372372
输出 `openkal hosted threads: isolation, destructors and concurrent unwind ok`。
373373
新增源码在 ARM64 与三个外部目标系统上的执行仍须最终 CI 验证。
374+
375+
### 16.1 2026-10-08 fixture 发现更正
376+
377+
本节后续发现新 fixture 的 `.cpp` 后缀被根项目默认的
378+
`tests/**/*.cpp` 发现为独立单测。该源码改为 `.cpp.in` 模板,构建
379+
helper 与 286 复制为实际应用的 `main.cpp`。根项目单测仍为原有
380+
147 项,线程证明来自真实 openkal 栈,不由宿主 GNU 单测替代。

‎.github/tools/check_openkal_hosted_threads.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ llvm_toolchain=${LLVM_TOOLCHAIN:-llvm@$LLVM_VERSION}
2222
fixture="$runtime_root/examples/mcpp-hosted-threads"
2323
mkdir -p "$fixture/src"
2424
cp "$repo_root/tests/fixtures/openkal-hosted-threads/mcpp.toml" "$fixture/mcpp.toml"
25-
cp "$repo_root/tests/fixtures/openkal-hosted-threads/src/main.cpp" "$fixture/src/main.cpp"
25+
cp "$repo_root/tests/fixtures/openkal-hosted-threads/src/main.cpp.in" "$fixture/src/main.cpp"
2626
cd "$fixture"
2727
"$mcpp_bin" build --target "$target" --toolchain "$llvm_toolchain"
2828
binaries=()

‎.github/tools/check_published_arm64_cn_ecosystem.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ cd "$work/openkal-source/examples/same-source"
113113
readobj="$MCPP_HOME/registry/data/xpkgs/xim-x-llvm/23.1.3/bin/llvm-readobj"
114114
[[ -x "$readobj" ]] || { echo 'LLVM readobj unavailable'; exit 1; }
115115
mkdir -p "$work/cross"
116-
sha256sum "$work/mcpp-source/tests/fixtures/openkal-hosted-threads/src/main.cpp" | cut -d ' ' -f 1 > "$work/cross/threads-source-sha256.txt"
116+
sha256sum "$work/mcpp-source/tests/fixtures/openkal-hosted-threads/src/main.cpp.in" | cut -d ' ' -f 1 > "$work/cross/threads-source-sha256.txt"
117117
for target in x86_64-linux-gnu aarch64-macos x86_64-windows-gnu; do
118118
rm -rf target
119119
"$MCPP" build --target "$target" --toolchain llvm@23.1.3 | tee "$work/cross/$target.build.log"

‎.github/workflows/openkal-cross.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ jobs:
255255
mkdir -p "$RUNNER_TEMP/out"
256256
git -C "$RUNNER_TEMP/okl" rev-parse HEAD > "$RUNNER_TEMP/out/source-sha.txt"
257257
echo "openkal-llvm-runtime source SHA: $(cat "$RUNNER_TEMP/out/source-sha.txt")"
258-
python3 - "$GITHUB_WORKSPACE/tests/fixtures/openkal-hosted-threads/src/main.cpp" "$RUNNER_TEMP/out/threads-source-sha256.txt" <<'PYHASH'
258+
python3 - "$GITHUB_WORKSPACE/tests/fixtures/openkal-hosted-threads/src/main.cpp.in" "$RUNNER_TEMP/out/threads-source-sha256.txt" <<'PYHASH'
259259
import hashlib, pathlib, sys
260260
pathlib.Path(sys.argv[2]).write_text(hashlib.sha256(pathlib.Path(sys.argv[1]).read_bytes()).hexdigest() + "\n")
261261
PYHASH

‎tests/e2e/286_the_openkal_stack_still_builds.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ source "$(dirname "${BASH_SOURCE[0]}")/_toolchain_env.sh"
2727
# static image with no interpreter and no reference to the host's loader.
2828
set -e
2929

30-
hosted_threads_source="$(cd "$(dirname "${BASH_SOURCE[0]}")/../fixtures/openkal-hosted-threads/src" && pwd)/main.cpp"
30+
hosted_threads_source="$(cd "$(dirname "${BASH_SOURCE[0]}")/../fixtures/openkal-hosted-threads/src" && pwd)/main.cpp.in"
3131
MCPP="${MCPP:-mcpp}"
3232
work="$(mktemp -d)"
3333
trap 'rm -rf "$work"' EXIT
File renamed without changes.

0 commit comments

Comments
 (0)