-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
On my Mac using a very recent macOS and Xcode, I can easily build fcode-utils
with just a quick make
, but make tests
unfortunately fails with a huge set of diffs.
It looks like the test suite works by comparing the test result logs with a static set of logs created in specific build environments, and doesn’t take differences in the file headers or whitespace into account.
For example, here’s the first page of results in my terminal:
CygTestLogs=/Users/cmh/Documents/Projects/OpenFirmware/fcode-utils/testlogs/testlogs-ppc-linux csh AutoCompare
177
177 TokCondl/TokExstCondTstY.Log files differ.
3,4c3,4
< Welcome to toke - OpenBIOS tokenizer v1.0.2
< (C) Copyright 2001-2006 Stefan Reinauer.
---
> Welcome to toke - FCode tokenizer v1.0.3
> (C) Copyright 2001-2010 Stefan Reinauer.
10,11d9
< Tokenizer Compiled on PPC under GNU_Linux
< Mon, 23 Oct 2006 at 13:20:18 CDT
TokCondl/TokExstCondTstY.DeTok files differ.
1,2c1,2
< \ Welcome to detok - OpenBIOS detokenizer v1.0.2
< \ (C) Copyright 2001-2006 Stefan Reinauer.
---
> \ Welcome to detok - FCode detokenizer v1.0.3
> \ (C) Copyright 2001-2010 Stefan Reinauer
16c16
< " Begin Nest Test Test"
---
> " Begin Nest Test Test"
19c19
< " Exists, level 1"
---
> " Exists, level 1"
22c22
< " Exists and exists, level 2"
---
> " Exists and exists, level 2"
25c25
and so on.
It seems like the test suite could be improved in a couple of ways:
- Have one standard set of known-good results to compare against, rather than per-build-environment sets.
- Output the results into a separate directory (specifiable via a make variable) rather than the same directory as the test sources.
- Ignore whitespace in result comparisons when that doesn’t matter. (Does it ever? I don’t know the code or tests…)
That would make it much easier to find meaningful test failures, and to do repeatable CI builds.
Metadata
Metadata
Assignees
Labels
No labels