Regression Testing the Compiler Against the Demos

Before publishing a compiler change, run it against the full demo corpus to catch regressions. The testcompilealldemos.bat script walks a target folder (the demos repository by default) and compiles every .gcb file it finds, logging the outcome of each into four files: test.log (files with real errors/warnings, or that failed to produce ASM/HEX), success.log, invalidsources.log (files with no #chip/recognised chip include, so not a compilable source), and skipped.log.

Excluding files and folders from the run:

There are two independent ways to keep a source out of a regression run:

Mechanism Effect

A file named skiptest or skiptest.txt placed in a folder

Skips every .gcb file in that folder and all its subfolders. The script walks up from each file’s folder toward the target root looking for this marker, so placing one at a high-level folder (e.g. a whole TestSolutions-style scratch area) excludes everything beneath it.

The #SKIPTEST directive inside a .gcb file

Skips only that individual file, wherever it lives. The script detects it with a plain text search for #SKIPTEST in the source, so it does not need to sit in any particular location in the file.

Neither mechanism is understood by GCBASIC.EXE itself - #SKIPTEST is not a compiler directive; the compiler never inspects it. Both are conventions read only by the regression-test script, used to exclude demos that are intentionally non-compiling (work in progress, illustrative snippets, or requiring build options the batch run doesn’t set).


See Also: