openbios / fcode-utils

A set of utilities to process FCODE, OpenFirmware's byte code
https://www.openfirmware.info/FCODE_suite
GNU General Public License v2.0
29 stars 12 forks source link

Make test suite builder-agnostic #10

Open eschaton opened 3 years ago

eschaton commented 3 years ago

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:

That would make it much easier to find meaningful test failures, and to do repeatable CI builds.

reinauer commented 2 years ago

This needs a lot more work. running the release test suite on release 1.0.2 fails on modern systems (e.g. my Ubuntu 20 workstation). If you have time to help with this, it's highly appreciated

eschaton commented 2 years ago

Unfortunately I can’t directly help due to my employment, I try to compensate for that by offering as much detail as I can. Sorry. :(