Skip to content

tests: hand-run tests target x86_64-elf; a test's own refusal is not a skip - #203

Merged
teo1747 merged 1 commit into
mainfrom
test-default-target
Nov 9, 2026
Merged

teo1747 merged 1 commit into
mainfrom
test-default-target

Conversation

@teo1747

@teo1747 teo1747 commented Nov 9, 2026

Copy link
Copy Markdown
Member

Two test problems left by #198 (the default target is now the host). #201's contributor found the first.

1. Hand-run tests on a Mac built Mach-O. tests/run.sh pins EMBCC_DEFAULT_TARGET=x86_64-elf for the suite, but a test run on its own (sh tests/golden/embld-doctor.sh) did not get it. On a Mac it compiled for aarch64-apple-darwin, and embld-doctor failed although CI passed. tests/lib.sh, which 447 of the 479 golden tests source, now exports it as well. In the suite nothing changes: it is the value run.sh already sets.

2. target-select has been failing in CI since #198, reported as a SKIP.

  • The test builds a TARGETS=arm compiler. Under the suite's x86_64-elf default, that compiler refused even --version. The test now unsets the default for its own compilers, as default-target.sh does.
  • run.sh counts a failing test as skipped when its output says "this embcc was built without the X backend". target-select provokes that message on purpose, so its failure looked like a skip. A test is now skipped only when X is a family the suite's own compiler lacks (the Not built: line of its --version). A full build lacks none.
  • In CI's last run, target-select was the only test skipped this way.

Checked.

  • embld-doctor, default-target and target-select pass run by hand without EMBCC_DEFAULT_TARGET.
  • target-select and default-target pass run as the suite runs them.
  • embld-doctor fails by hand without this change.
  • The skip rule, tested directly: a refusal naming riscv is a skip when riscv is not built, and a failure on a full build or when only another family is missing.

Since #198 embcc compiles for the host when nothing names a target.
tests/run.sh pins x86_64-elf for the suite, but a test run by hand did
not get it: on a Mac it built Mach-O objects, and embld-doctor failed
for the contributor of #201 although CI passed. tests/lib.sh, which 447
of the 479 golden tests source, now exports it too.

target-select builds a TARGETS=arm compiler, which lacks x86_64-elf and
refused even --version under the suite's default; it unsets it, as
default-target.sh does, and passes both ways.

That failure had been reported as a SKIP since #198: run.sh counts a
failing test as skipped when its output says "this embcc was built
without the X backend", and target-select provokes that message on
purpose. A test is now skipped only when X is a family the suite's own
compiler lacks ("Not built:" in its --version); on a full build none
is. In CI's last run target-select was the only test skipped that way.
@teo1747
teo1747 merged commit c2bf121 into main Nov 9, 2026
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant