HEADS UP: running tests in /tmp and the `extra_files` setup function

Edward Z. Yang ezyang at mit.edu
Tue May 17 19:25:12 UTC 2016


Hello Thomas,

Is there a way to change where the temporary directory is made?  The
test suite can take a lot of disk space and some of us would prefer
to store the test output on a different partition.

Thanks,
Edward

Excerpts from Thomas Miedema's message of 2016-05-17 09:11:53 -0700:
> Hello GHC developers,
> 
> the testsuite driver now runs each test in a temporary directory in /tmp,
> after first linking/copying all files that the test requires to that
> directory.
> 
> When adding a new test:
> 
> ** if your test requires source files that don't start with the name of
> your test, then you *have to* specify those files using the `extra_files`
> setup function. [1]*
> 
> * you no longer have to specify files to cleanup (`clean_files` and
> `clean_cmd` are deprecated)
> 
> * you no longer have to add generated files to `testsuite/.gitignore`
> 
> * you no longer have to worry about two tests possibly overwriting each
> others intermediate (.o, .hi) files, and you no longer have to
> specify `-outputdir` if you want to let multiple tests use the same source
> files.
> 
> Example:
> 
> *BEFORE:*
>     test('driver011',
>          extra_clean(['A011.hi', 'A011.o']),
>          run_command,
>          ['$MAKE -s --no-print-directory test011'])
> 
> *AFTER:*
>     test('driver011',
>          extra_files(['A011.hs']),
>          run_command,
>          ['$MAKE -s --no-print-directory test011'])
> 
> See https://ghc.haskell.org/trac/ghc/ticket/11980 and
> https://ghc.haskell.org/trac/ghc/wiki/Building/RunningTests/Adding for more
> information.
> 
> Cheers,
> Thomas
> 
> [1] Extra files for existing tests are currently listed in
> `testsuite/driver/extra_files.py`.


More information about the ghc-devs mailing list