Skip to content

CI: ci-local.sh fail when LLVM present but JIT compliance 100% skipped #250

@PurHur

Description

@PurHur

Problem

script/ci-local.sh prints whether LLVM 9 exists, then runs @group llvm tests — but it does not fail when the JIT compliance suite reports 133 skipped / 0 executed while .llvm/libLLVM-9.so.1 is present. That lets JIT regressions ship while local CI appears “green.”

Parent: #98 (fix root cause in JITTest / env). This issue adds a cheap guardrail so the harness fails loudly until #98 is fixed.

Goal

After the llvm PHPUnit stage, parse summary output (or use --log-junit to a temp file) and exit non-zero if:

  • LLVM library was found at start, and
  • JIT compliance tests show 0 executed (or 100% skipped)

Implementation hints

  • Option A: vendor/bin/phpunit --group llvm --log-junit /tmp/llvm.xml then small PHP script counting <testcase> vs skipped in test/compliance/JITTest.php namespace.
  • Option B: grep PHPUnit summary line OK, but incomplete, skipped, or risky tests! combined with executed count — fragile; prefer JUnit XML.
  • Skip guard when PHP_COMPILER_ALLOW_JIT_SKIP=1 (document for broken dev envs).
  • Mirror message in Docs: Local CI matrix (host, Docker, GHA skips) in README #245 CI matrix doc.

Acceptance criteria

With a deliberately broken LD_LIBRARY_PATH, ci-local.sh exits non-zero and prints actionable fix (set PHP_COMPILER_LLVM_PATH, check /opt/llvm9 in Docker).

With healthy Docker image (#237), guard passes when JIT tests execute.

Verification (local only)

make docker-build-22
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev ./script/ci-local.sh

Do not require GitHub Actions.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions