On 16-04-29 09:17:44, Jakub Jelinek wrote: > > Bernd: I'll see if I can prepare a testcase; first I need to get > > familiar with the testing framework and learn how to set environment > > variables in tests. Any tips on that will be really welcome! > > grep for dg-set-target-env-var in various tests.
I've been looking at how the test infrastructure works, and I'm having some difficulties with setting the env var. I've wrote a test case which fails (when it shouldn't) and I don't see why. I'm attaching the test file. I'm running it with: $ make check-gcc RUNTESTFLAGS=cpp.exp=source_date_epoch-1.c What I find strange, however, is that if I set the env var from the command line, it seems to pass: $ SOURCE_DATE_EPOCH=123456 make check-gcc RUNTESTFLAGS=cpp.exp=source_date_epoch-1.c P.S.: I've just sent another message to the thread with the patch implementing the other mentioned issues. I've mistakenly sent it from another email account of mine: <eduardsa...@openmailbox.org> Cheers, -- Dhole
/* { dg-do run } */ /* { dg-set-target-env-var SOURCE_DATE_EPOCH "123456" } */ int main(void) { __builtin_printf ("%s %s\n", __DATE__, __TIME__); return 0; } /* { dg-output "Jan 2 1970 10:17:36" } */
signature.asc
Description: PGP signature