More compilation tests? I am willing to help

Requests for features
Post Reply
Fabrizio
Member
Posts: 115
Joined: Tue Jul 11, 2017 9:28 pm

More compilation tests? I am willing to help

Post by Fabrizio »

As I can see Z88DK gets continuous updates thanks the the huge work of its developers. This makes Z88DK very special.
This has the side effect of breaking the compilation (i.e., compilation ends with an error). The support is great and problems are quickly fixed but maybe we could do something to prevent the compilation to fail.
My current build-chain covers all Z88DK targets with multiple options.
If I run it with a random snapshot, it is very likely to fail with some error.

I propose to add a slim-down version of my compilation scripts as a compilation non-regression.
It could be based on a micro version of one of my demos (not even a game) with multiple compilation options for all targets.
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Re: More compilation tests? I am willing to help

Post by dom »

I/we tried to do this a while back, but ran into a bit of a blocker that I needed to make changes to your scripts/makefiles to get things to work - I still need a few diffs to be honest.

Looking at the build, it looks like we test that a binary can be created for 113 of the 133 target configurations. What's compiled is just a world.c example so doesn't cover the whole library.

I suspect what might be better than a simple world.c would be to tie into the feature.h stuff discussed elsewhere and explicitly test every feature by creating a nonsensical program, for example (not tested and probably wrong/provided just to illustrate what I'm thinking):

Code: Select all

int main()
{
   char buf[10];
   int  c;

   printf("x\n");
   c = fgetc_cons();
   c = getk();
#ifdef HAVE_INKEY
   c = in_Lookupkey('2');
   c = in_Keypressed(2);
   c = in_Inkey();
#endif
#ifdef HAVE_GFX
   plot(0,0);
   unplot(0,0);
   xorplot(0,0);
   point(0,0);
#endif
#ifndef HAVE_ONEBITSOUND
   bit_click(1);
#endif
#ifdef HAVE_TIME
   c = time();
#endif
#ifdef HAVE_FILEIO
   c = read(0, buf, 0);
#endif
}
Of course, that just covers doing things "properly" - as things have evolved features have been added which encapsulate some of the flags that people are using: a good example here are the --generic-console and --hardware-keyboard options, I know both you and RobertK have some compilations that use the -pragma-redirect options that these aliases map into.
Post Reply