ci: run CLI-contract & internal-assembler tests; surface skips
The TCLIContractTests and TInternalAsmE2ETests suites resolve their
compiler binary from BLAISE_QBE_COMPILER, falling back to the
/tmp/fp_blaise{3,2} fixpoint binaries. Those only exist after a local
fixpoint.sh run, so in CI both suites silently Ignore'd ~24 tests while
the run still reported green (25 ignored in CI vs 1 locally).
Two changes:
- bootstrap.yml: set BLAISE_QBE_COMPILER to the bootstrapped -pre
binary so both suites actually run in CI.
- CompilerAvailable() in each suite now prints a one-time StdErr note
when it skips, so a missing toolchain is loud instead of a silent
green with hidden ignores.
This commit is contained in:
parent
a0e0fd567b
commit
88db7f3b23
6
.github/workflows/bootstrap.yml
vendored
6
.github/workflows/bootstrap.yml
vendored
|
|
@ -214,7 +214,11 @@ jobs:
|
|||
set -euo pipefail
|
||||
BLAISE="${{ steps.pre.outputs.bin }}"
|
||||
pasbuild test-compile -m blaise-compiler --compiler "$BLAISE"
|
||||
compiler/target/TestRunner
|
||||
# Point the CLI-contract and internal-assembler suites at the
|
||||
# bootstrapped -pre binary. Without this they fall back to the
|
||||
# /tmp/fp_blaise* fixpoint binaries (which only exist after a local
|
||||
# fixpoint.sh run) and silently Ignore ~24 tests in CI.
|
||||
BLAISE_QBE_COMPILER="$BLAISE" compiler/target/TestRunner
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# 9. Save the carry-forward cache for the next run: the -pre binary, its
|
||||
|
|
|
|||
|
|
@ -98,6 +98,12 @@ type
|
|||
|
||||
implementation
|
||||
|
||||
{ Print the "tests skipped" note at most once per suite run, so a CI
|
||||
environment that lacks the QBE compiler binary surfaces the skip loudly
|
||||
instead of silently reporting green with ~12 ignored tests. }
|
||||
var
|
||||
GInternalAsmSkipNoted: Boolean = False;
|
||||
|
||||
{ ---- TAsmEncodingTests ---- }
|
||||
|
||||
function TAsmEncodingTests.ContainsBytes(const ABuf, APat: string): Boolean;
|
||||
|
|
@ -553,6 +559,13 @@ end;
|
|||
function TInternalAsmE2ETests.CompilerAvailable: Boolean;
|
||||
begin
|
||||
Result := FileExists(FCompiler) and FileExists(FRTL);
|
||||
if (not Result) and (not GInternalAsmSkipNoted) then
|
||||
begin
|
||||
GInternalAsmSkipNoted := True;
|
||||
WriteLn(StdErr, 'note: TInternalAsmE2ETests skipped — compiler binary "',
|
||||
FCompiler, '" or RTL "', FRTL, '" not found ',
|
||||
'(set BLAISE_QBE_COMPILER to a QBE-backend blaise binary to run them)');
|
||||
end;
|
||||
end;
|
||||
|
||||
function TInternalAsmE2ETests.RunProc(const AExe: string;
|
||||
|
|
|
|||
|
|
@ -77,6 +77,12 @@ type
|
|||
|
||||
implementation
|
||||
|
||||
{ Print the "tests skipped" note at most once per suite run, so a CI
|
||||
environment that lacks the QBE compiler binary surfaces the skip loudly
|
||||
instead of silently reporting green with ~12 ignored tests. }
|
||||
var
|
||||
GCLISkipNoted: Boolean = False;
|
||||
|
||||
{ ---- helpers ---- }
|
||||
|
||||
function TCLIContractTests.ProjectRoot: string;
|
||||
|
|
@ -125,6 +131,13 @@ end;
|
|||
function TCLIContractTests.CompilerAvailable: Boolean;
|
||||
begin
|
||||
Result := FileExists(FCompiler) and FileExists(FRTL);
|
||||
if (not Result) and (not GCLISkipNoted) then
|
||||
begin
|
||||
GCLISkipNoted := True;
|
||||
WriteLn(StdErr, 'note: TCLIContractTests skipped — compiler binary "',
|
||||
FCompiler, '" or RTL "', FRTL, '" not found ',
|
||||
'(set BLAISE_QBE_COMPILER to a QBE-backend blaise binary to run them)');
|
||||
end;
|
||||
end;
|
||||
|
||||
function TCLIContractTests.RunCompiler(const AArgs: array of string;
|
||||
|
|
|
|||
Loading…
Reference in a new issue