[Fix] (CI): restore hosted builds and pin CMake 3.31.10

This commit is contained in:
2026-10-05 10:41:03 -04:00
parent 039b342b97
commit d409731632
6 changed files with 113 additions and 124 deletions
@@ -11,9 +11,6 @@ runs:
env:
NEED_GPU: ${{ inputs.gpu }}
run: |
if [ "$NEED_GPU" != true ] && [ -f /.dockerenv ]; then
bash "$GITHUB_WORKSPACE/scripts/ci/setup_cpu_container.sh"
fi
if [ "$RUNNER_ENVIRONMENT" = "self-hosted" ] && [ "$NEED_GPU" = true ]; then
for tool in clang clang++ cmake ninja ccache; do command -v "$tool"; done
test -r /usr/share/vulkan/icd.d/dzn_icd.json
+82 -87
View File
@@ -127,8 +127,7 @@ jobs:
run: python3 scripts/ci/select_test_runner.py
build-linux:
runs-on: ${{ fromJSON(vars.CI_CPU_RUNNER || '["ubuntu-latest"]') }}
container: ubuntu:24.04
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
@@ -142,8 +141,10 @@ jobs:
CCACHE_NOHASHDIR: "true"
steps:
- name: Prepare checkout tools
run: apt-get update && apt-get install -y sudo git python3 ca-certificates
- name: Set swap space
uses: pierotofy/set-swap-space@v1.0
with:
swap-size-gb: 32
- name: Checkout repo
uses: actions/checkout@v6
@@ -154,8 +155,9 @@ jobs:
uses: ./.github/actions/setup-test-runner
- name: Get CMake
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
uses: lukka/get-cmake@v4.3.3
with:
cmakeVersion: 3.31.10
- name: Restore ccache
uses: actions/cache/restore@v5
@@ -175,7 +177,7 @@ jobs:
- name: Update glslang external sources
working-directory: 3rdparty/glslang
run: python update_glslang_sources.py
run: python3 update_glslang_sources.py
- name: Install build dependencies
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
@@ -290,8 +292,7 @@ jobs:
# on disaggregation branches that artifact now contains the real transport.
build-linux-monolith-control:
name: build explicit pull runtime control
runs-on: ${{ fromJSON(vars.CI_CPU_RUNNER || '["ubuntu-latest"]') }}
container: ubuntu:24.04
runs-on: ubuntu-latest
env:
BUILD_DIR: build-monolith-control
CCACHE_BASEDIR: ${{ github.workspace }}
@@ -299,8 +300,10 @@ jobs:
CCACHE_COMPRESS: "true"
CCACHE_NOHASHDIR: "true"
steps:
- name: Prepare checkout tools
run: apt-get update && apt-get install -y sudo git python3 ca-certificates
- name: Set swap space
uses: pierotofy/set-swap-space@v1.0
with:
swap-size-gb: 32
- name: Checkout repo
uses: actions/checkout@v6
@@ -310,8 +313,9 @@ jobs:
uses: ./.github/actions/setup-test-runner
- name: Get CMake
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
uses: lukka/get-cmake@v4.3.3
with:
cmakeVersion: 3.31.10
- name: Restore pull compiler cache
uses: actions/cache/restore@v5
with:
@@ -326,7 +330,7 @@ jobs:
vulkan-use-cache: true
- name: Update glslang external sources
working-directory: 3rdparty/glslang
run: python update_glslang_sources.py
run: python3 update_glslang_sources.py
- name: Install build dependencies
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
run: |
@@ -363,14 +367,10 @@ jobs:
if-no-files-found: error
test:
runs-on: ${{ fromJSON(vars.CI_CPU_RUNNER || '["ubuntu-latest"]') }}
container: ubuntu:24.04
runs-on: ubuntu-latest
needs: [build-linux]
steps:
- name: Prepare checkout tools
run: apt-get update && apt-get install -y sudo git python3 ca-certificates
- name: Checkout repo
uses: actions/checkout@v6
@@ -378,8 +378,9 @@ jobs:
uses: ./.github/actions/setup-test-runner
- name: Get CMake
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
uses: lukka/get-cmake@v4.3.3
with:
cmakeVersion: 3.31.10
- name: Install runtime dependencies
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
@@ -445,8 +446,9 @@ jobs:
gpu: "true"
- name: Get CMake
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
uses: lukka/get-cmake@v4.3.3
with:
cmakeVersion: 3.31.10
- name: Install runtime dependencies
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
@@ -556,8 +558,7 @@ jobs:
# MOBILEGL_PIPE_VERIFY is a compile-time option - the snapshot, the entry compare and the
# compare-at-read hook do not exist in the shipped library, and are never meant to.
build-linux-verify:
runs-on: ${{ fromJSON(vars.CI_CPU_RUNNER || '["ubuntu-latest"]') }}
container: ubuntu:24.04
runs-on: ubuntu-latest
timeout-minutes: 120
permissions:
actions: write
@@ -571,8 +572,10 @@ jobs:
CCACHE_NOHASHDIR: "true"
steps:
- name: Prepare checkout tools
run: apt-get update && apt-get install -y sudo git python3 ca-certificates
- name: Set swap space
uses: pierotofy/set-swap-space@v1.0
with:
swap-size-gb: 32
- name: Checkout repo
uses: actions/checkout@v6
@@ -583,8 +586,9 @@ jobs:
uses: ./.github/actions/setup-test-runner
- name: Get CMake
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
uses: lukka/get-cmake@v4.3.3
with:
cmakeVersion: 3.31.10
- name: Restore ccache
uses: actions/cache/restore@v5
@@ -604,7 +608,7 @@ jobs:
- name: Update glslang external sources
working-directory: 3rdparty/glslang
run: python update_glslang_sources.py
run: python3 update_glslang_sources.py
- name: Install build dependencies
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
@@ -747,8 +751,9 @@ jobs:
gpu: "true"
- name: Get CMake
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
uses: lukka/get-cmake@v4.3.3
with:
cmakeVersion: 3.31.10
- name: Install runtime dependencies
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
@@ -1015,8 +1020,9 @@ jobs:
with:
gpu: "true"
- name: Get CMake
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
uses: lukka/get-cmake@v4.3.3
with:
cmakeVersion: 3.31.10
- name: Install runtime dependencies
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
run: |
@@ -1248,8 +1254,7 @@ jobs:
# so the build-level assertion is the only guard, and its absence is precisely what would make
# the whole split arm meaningless.
build-linux-split:
runs-on: ${{ fromJSON(vars.CI_CPU_RUNNER || '["ubuntu-latest"]') }}
container: ubuntu:24.04
runs-on: ubuntu-latest
timeout-minutes: 120
permissions:
actions: write
@@ -1263,8 +1268,10 @@ jobs:
CCACHE_NOHASHDIR: "true"
steps:
- name: Prepare checkout tools
run: apt-get update && apt-get install -y sudo git python3 ca-certificates
- name: Set swap space
uses: pierotofy/set-swap-space@v1.0
with:
swap-size-gb: 32
- name: Checkout repo
uses: actions/checkout@v6
@@ -1280,8 +1287,9 @@ jobs:
uses: ./.github/actions/setup-test-runner
- name: Get CMake
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
uses: lukka/get-cmake@v4.3.3
with:
cmakeVersion: 3.31.10
- name: Restore ccache
uses: actions/cache/restore@v5
@@ -1301,7 +1309,7 @@ jobs:
- name: Update glslang external sources
working-directory: 3rdparty/glslang
run: python update_glslang_sources.py
run: python3 update_glslang_sources.py
- name: Install build dependencies
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
@@ -1475,8 +1483,9 @@ jobs:
gpu: "true"
- name: Get CMake
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
uses: lukka/get-cmake@v4.3.3
with:
cmakeVersion: 3.31.10
- name: Install runtime dependencies
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
@@ -1737,8 +1746,9 @@ jobs:
gpu: "true"
- name: Get CMake
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
uses: lukka/get-cmake@v4.3.3
with:
cmakeVersion: 3.31.10
- name: Install runtime dependencies
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
@@ -2322,13 +2332,9 @@ jobs:
# header honest: build the pinned flatc, regenerate, and fail on any diff.
# It needs no MobileGL build, so it does not depend on build-linux.
flatc-check:
runs-on: ${{ fromJSON(vars.CI_CPU_RUNNER || '["ubuntu-latest"]') }}
container: ubuntu:24.04
runs-on: ubuntu-latest
steps:
- name: Prepare checkout tools
run: apt-get update && apt-get install -y sudo git python3 ca-certificates
- name: Checkout repo
uses: actions/checkout@v6
@@ -2336,8 +2342,9 @@ jobs:
uses: ./.github/actions/setup-test-runner
- name: Get CMake
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
uses: lukka/get-cmake@v4.3.3
with:
cmakeVersion: 3.31.10
- name: Check out the FlatBuffers submodule only
# Just this one: the schema check has nothing to do with glslang,
@@ -2369,13 +2376,9 @@ jobs:
# job, because a gate that cannot go red is not a gate (ROADMAP.md:7).
include-graph-check:
name: Include-closure purity gate
runs-on: ${{ fromJSON(vars.CI_CPU_RUNNER || '["ubuntu-latest"]') }}
container: ubuntu:24.04
runs-on: ubuntu-latest
steps:
- name: Prepare checkout tools
run: apt-get update && apt-get install -y sudo git python3 ca-certificates
- name: Checkout repo
uses: actions/checkout@v6
@@ -2417,8 +2420,9 @@ jobs:
gpu: "true"
- name: Get CMake
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
uses: lukka/get-cmake@v4.3.3
with:
cmakeVersion: 3.31.10
- name: Install runtime dependencies
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
@@ -2461,8 +2465,7 @@ jobs:
if-no-files-found: ignore
build-retrace:
runs-on: ${{ fromJSON(vars.CI_CPU_RUNNER || '["ubuntu-latest"]') }}
container: ubuntu:24.04
runs-on: ubuntu-latest
needs:
- build-linux
permissions:
@@ -2478,8 +2481,10 @@ jobs:
MOBILEGL_LIBRARY: ${{ github.workspace }}/build-linux/libMobileGL.so
steps:
- name: Prepare checkout tools
run: apt-get update && apt-get install -y sudo git python3 ca-certificates
- name: Set swap space
uses: pierotofy/set-swap-space@v1.0
with:
swap-size-gb: 32
- name: Checkout repo
uses: actions/checkout@v6
@@ -2490,8 +2495,9 @@ jobs:
uses: ./.github/actions/setup-test-runner
- name: Get CMake
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
uses: lukka/get-cmake@v4.3.3
with:
cmakeVersion: 3.31.10
- name: Restore ccache
uses: actions/cache/restore@v5
@@ -2511,7 +2517,7 @@ jobs:
- name: Update glslang external sources
working-directory: 3rdparty/glslang
run: python update_glslang_sources.py
run: python3 update_glslang_sources.py
- name: Install dependencies
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
@@ -2608,8 +2614,7 @@ jobs:
trace-cases:
name: trace case matrix
runs-on: ${{ fromJSON(vars.CI_CPU_RUNNER || '["ubuntu-latest"]') }}
container: ubuntu:24.04
runs-on: ubuntu-latest
env:
MOBILEGL_CI_DISAGGREGATED: ${{ (github.ref_name == 'feat/disaggregated' || github.ref_name == 'codex/fix-github-ci') && 'ON' || 'OFF' }}
outputs:
@@ -2618,9 +2623,6 @@ jobs:
verify-matrix: ${{ steps.trace-cases.outputs.verify-matrix }}
split-matrix: ${{ steps.trace-cases.outputs.split-matrix }}
steps:
- name: Prepare checkout tools
run: apt-get update && apt-get install -y sudo git python3 ca-certificates
- name: Checkout repo
uses: actions/checkout@v6
@@ -2674,8 +2676,7 @@ jobs:
trace-fixtures:
name: trace fixture (${{ matrix.case }})
runs-on: ${{ fromJSON(vars.CI_CPU_RUNNER || '["ubuntu-latest"]') }}
container: ubuntu:24.04
runs-on: ubuntu-latest
needs: [trace-cases]
strategy:
fail-fast: false
@@ -2683,9 +2684,6 @@ jobs:
matrix:
case: ${{ fromJSON(needs.trace-cases.outputs.names) }}
steps:
- name: Prepare checkout tools
run: apt-get update && apt-get install -y sudo git python3 ca-certificates
- name: Checkout repo
uses: actions/checkout@v6
@@ -2791,8 +2789,9 @@ jobs:
find trace-fixture-download -type f -exec cp {} tools/trace_replay/fixtures/ \;
- name: Get CMake
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
uses: lukka/get-cmake@v4.3.3
with:
cmakeVersion: 3.31.10
- name: Install runtime dependencies
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
@@ -2876,17 +2875,13 @@ jobs:
retrace-summary:
name: retrace summary
runs-on: ${{ fromJSON(vars.CI_CPU_RUNNER || '["ubuntu-latest"]') }}
container: ubuntu:24.04
runs-on: ubuntu-latest
needs: [retrace]
if: ${{ always() && needs.retrace.result != 'skipped' }}
env:
MOBILEGL_CI_DISAGGREGATED: ${{ (github.ref_name == 'feat/disaggregated' || github.ref_name == 'codex/fix-github-ci') && 'ON' || 'OFF' }}
steps:
- name: Prepare checkout tools
run: apt-get update && apt-get install -y sudo git python3 ca-certificates
- name: Checkout repo
uses: actions/checkout@v6
@@ -2999,8 +2994,9 @@ jobs:
find trace-fixture-download -type f -exec cp {} tools/trace_replay/fixtures/ \;
- name: Get CMake
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
uses: lukka/get-cmake@v4.3.3
with:
cmakeVersion: 3.31.10
- name: Install runtime dependencies
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
@@ -3195,8 +3191,9 @@ jobs:
find trace-fixture-download -type f -exec cp {} tools/trace_replay/fixtures/ \;
- name: Get CMake
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
uses: lukka/get-cmake@v4.3.3
with:
cmakeVersion: 3.31.10
- name: Install runtime dependencies
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
@@ -3452,8 +3449,7 @@ jobs:
remove-artifact-clutter:
name: remove artifact clutter
runs-on: ${{ fromJSON(vars.CI_CPU_RUNNER || '["ubuntu-latest"]') }}
container: ubuntu:24.04
runs-on: ubuntu-latest
# Every retrace arm downloads the shared fixtures, including split controls.
needs:
- retrace-summary
@@ -3463,9 +3459,6 @@ jobs:
permissions:
actions: write
steps:
- name: Prepare checkout tools
run: apt-get update && apt-get install -y sudo git python3 ca-certificates
- name: Checkout repo
uses: actions/checkout@v6
- name: Configure runner environment
@@ -3529,15 +3522,11 @@ jobs:
pipe-gates:
name: MGPipe generators and hygiene gates
runs-on: ${{ fromJSON(vars.CI_CPU_RUNNER || '["ubuntu-latest"]') }}
container: ubuntu:24.04
runs-on: ubuntu-latest
# Deliberately independent of build-linux: these are source-level gates, they take
# seconds, and a broken build must not hide a drifted interface.
steps:
- name: Prepare checkout tools
run: apt-get update && apt-get install -y sudo git python3 ca-certificates
- name: Checkout repo
uses: actions/checkout@v6
@@ -3549,6 +3538,10 @@ jobs:
- name: Configure runner environment
uses: ./.github/actions/setup-test-runner
- name: Get CMake
uses: lukka/get-cmake@v4.3.3
with:
cmakeVersion: 3.31.10
- name: Test CTest runtime metadata preparation
run: python3 scripts/ci/test_prepare_test_runtime.py
@@ -3688,8 +3681,7 @@ jobs:
fi
python3 scripts/check_doc_citations.py "${documents[@]}" || true
build-linux-verify-split:
runs-on: ${{ fromJSON(vars.CI_CPU_RUNNER || '["ubuntu-latest"]') }}
container: ubuntu:24.04
runs-on: ubuntu-latest
timeout-minutes: 180
permissions:
actions: write
@@ -3703,8 +3695,10 @@ jobs:
CCACHE_NOHASHDIR: "true"
steps:
- name: Prepare checkout tools
run: apt-get update && apt-get install -y sudo git python3 ca-certificates
- name: Set swap space
uses: pierotofy/set-swap-space@v1.0
with:
swap-size-gb: 32
- name: Checkout repo
uses: actions/checkout@v6
@@ -3717,8 +3711,9 @@ jobs:
uses: ./.github/actions/setup-test-runner
- name: Get CMake
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
uses: lukka/get-cmake@v4.3.3
with:
cmakeVersion: 3.31.10
- name: Restore ccache
uses: actions/cache/restore@v5
@@ -3738,7 +3733,7 @@ jobs:
- name: Update glslang external sources
working-directory: 3rdparty/glslang
run: python update_glslang_sources.py
run: python3 update_glslang_sources.py
- name: Install build and runtime dependencies
if: env.MOBILEGL_CI_NATIVE_GPU != '1'
+16 -11
View File
@@ -111,13 +111,18 @@ Clash must be running for the runner's configured GitHub connection to work.
## Main Test workflow
CPU jobs do not query GPU availability. They default to GitHub `ubuntu-latest`.
Repository variable `CI_CPU_RUNNER` may specify a JSON runner label array, for example
`["self-hosted", "Linux", "X64", "cpu"]`. A self-hosted CPU runner needs Docker and
permission to run job containers. CPU builds/tests run in `ubuntu:24.04` on either
host type, with Clang 20 and the same userspace ABI. They do not require `/dev/dxg`.
GitHub Actions has no native "any hosted OR self-hosted" selector; the variable
chooses the CPU pool independently, without reserving this GPU machine.
CPU jobs do not query GPU availability. They run directly on the original GitHub
`ubuntu-latest` environment, without a job container. This preserves the installed
Git/Python/toolchain behavior and leaves 8845 free for GPU testing. Ubuntu-built
artifacts are consumed by either Ubuntu or the newer Arch userspace; metadata paths
and driver selection are relocated at the consuming stage.
All build and test hosts install **CMake 3.31.10**, including the native Arch GPU
runner. The GitHub action tag alone does not pin the installed CMake version, so
`cmakeVersion` is explicit. The existing escaped GoogleTest property lists work in
3.31.10. Newer GoogleTest implementations preserve those escapes differently;
`CMP0178=OLD` does not restore PROPERTIES parsing. No generated-file separator
unescaping is performed: the CMake/CTest version is consistent at both ends.
After each runtime build completes, a small GitHub-hosted selection job queries
this repository's runner inventory for the corresponding GPU stage. Integration,
@@ -133,7 +138,7 @@ expired credential or API failure is an error, not evidence that the runner is o
`prepare_test_runtime.py` runs when producing and consuming runtime artifacts. It
records/relocates workspace paths, resolves CMake module paths on the execution
host, and repairs escaped ENVIRONMENT/LABELS separators before GoogleTest discovery.
host, and preserves the 3.31.10 ENVIRONMENT/LABELS escaping through GoogleTest discovery.
This prevents a backend value like `DirectVulkan;MOBILEGL_TRANSPORT=inproc;...`.
At test time it replaces the built-in ICD path and removes software-rendering
and Mesa version overrides on the hardware runner. Thus an Ubuntu build can be
@@ -143,9 +148,9 @@ software driver configuration. Capability failures remain visible test failures.
Each GPU stage samples availability after its inputs are ready. A disconnection
later still leaves already scheduled jobs queued: GitHub cannot migrate those
jobs automatically. Rerun the workflow to select again. Arch-built native artifacts
are not mixed with Ubuntu consumers; CPU artifacts use the common Ubuntu container.
are not mixed with Ubuntu consumers; CPU artifacts are built on GitHub Ubuntu.
Native GPU jobs use Arch's installed tools and do not install packages, provision
swap, download an SDK or change privileged core settings. The old standalone
Native GPU jobs use Arch's compiler and drivers plus the pinned user-space CMake;
they do not install OS packages, provision swap, download an SDK or change privileged core settings. The old standalone
`wsl-gpu-smoke.yml` has been removed; the host's installed probe remains available
for manual diagnostics.
+6 -6
View File
@@ -16,16 +16,16 @@ def normalize(text, old_root, new_root, cmake_root, hardware=False, icd=None):
lambda m: cmake_root + '/Modules/' + m[1], text)
lines = []
for line in text.splitlines(keepends=True):
if re.search(r'ENVIRONMENT|LABELS', line):
# GoogleTest discovery receives list properties, not one value with
# escaped separators. Otherwise BACKEND becomes "DirectVulkan;...".
line = line.replace('\\;', ';')
# Keep list escaping intact. All CI builders and consumers use CMake
# 3.31.10, whose GoogleTest module needs these escaped separators.
if icd:
line = re.sub(r'VK_ICD_FILENAMES=[^;"\]\s]+', 'VK_ICD_FILENAMES=' + icd, line)
line = re.sub(r'VK_ICD_FILENAMES=[^;\\"\]\s]+', 'VK_ICD_FILENAMES=' + icd, line)
if hardware:
for value in ('LIBGL_ALWAYS_SOFTWARE=1', 'MESA_GL_VERSION_OVERRIDE=3.3',
'MESA_GLSL_VERSION_OVERRIDE=330'):
line = line.replace(value + ';', '').replace(';' + value, '').replace(value, '')
line = re.sub(re.escape(value) + r'\\*;', '', line)
line = re.sub(r'\\*;' + re.escape(value), '', line)
line = line.replace(value, '')
lines.append(line)
return ''.join(lines)
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
# CPU runners may be GitHub-hosted or self-hosted; the artifact ABI stays Ubuntu.
test -f /.dockerenv
. /etc/os-release
test "$ID" = ubuntu && test "$VERSION_ID" = 24.04
apt-get update
apt-get install -y curl gnupg tar xz-utils zstd build-essential gh jq unzip zip wget pkg-config cmake
curl --fail --silent --show-error https://apt.llvm.org/llvm-snapshot.gpg.key \
| gpg --dearmor -o /usr/share/keyrings/llvm-archive-keyring.gpg
echo 'deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] https://apt.llvm.org/noble/ llvm-toolchain-noble-20 main' \
> /etc/apt/sources.list.d/llvm.list
apt-get update
apt-get install -y libc++1-20 libc++abi1-20 libunwind-20
+9 -3
View File
@@ -15,11 +15,10 @@ spec.loader.exec_module(runtime)
class MetadataTest(unittest.TestCase):
def test_environment_and_labels_are_lists(self):
def test_legacy_environment_and_labels_escaping_is_preserved(self):
text = r'[[ENVIRONMENT]] [[MOBILEGL_BACKEND_TYPE=DirectVulkan\;MOBILEGL_TRANSPORT=inproc]] [[LABELS]] [[gpu\;split]]'
fixed = runtime.normalize(text, '', '/new', '/cmake')
self.assertNotIn(r'\;', fixed)
self.assertIn('DirectVulkan;MOBILEGL_TRANSPORT=inproc', fixed)
self.assertEqual(fixed, text)
def test_other_escaped_values_are_preserved(self):
text = r'COMMAND "argument\;with-semicolon"'
@@ -41,6 +40,11 @@ class MetadataTest(unittest.TestCase):
self.assertNotIn('VERSION_OVERRIDE', fixed)
self.assertIn('LIBGL_ALWAYS_SOFTWARE=1', runtime.normalize(text, '', '/new', '/cmake'))
def test_hardware_driver_change_preserves_legacy_separators(self):
text = r'ENVIRONMENT "A=x\;VK_ICD_FILENAMES=/lvp.json\;LIBGL_ALWAYS_SOFTWARE=1\;B=y"'
fixed = runtime.normalize(text, '', '/new', '/cmake', True, '/dzn.json')
self.assertEqual(fixed, r'ENVIRONMENT "A=x\;VK_ICD_FILENAMES=/dzn.json\;B=y"')
def test_preparation_is_idempotent_and_drops_discovery_cache(self):
with tempfile.TemporaryDirectory() as folder:
root = Path(folder)
@@ -55,6 +59,8 @@ class MetadataTest(unittest.TestCase):
@unittest.skipUnless(os.name == 'posix' and shutil.which('cmake'), 'requires POSIX CMake')
def test_real_ctest_discovery_separates_environment(self):
version = subprocess.check_output(['cmake', '--version'], text=True).splitlines()[0]
self.assertIn('3.31.10', version, 'CI must use its pinned legacy GoogleTest discovery version')
with tempfile.TemporaryDirectory() as folder:
root = Path(folder)
probe = root / 'probe.py'