diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2015-03-06 20:17:41 +0100 |
---|---|---|
committer | Thomas Miedema <thomasmiedema@gmail.com> | 2015-03-06 20:17:56 +0100 |
commit | 91c11feacc4c66a7ebcf8a88ab1cb851ce48142a (patch) | |
tree | d5373e63461ff36836710fecfdb5565a68f7d49f /rts/ThreadLabels.h | |
parent | 41df51d5a2b3dca9cc172e0b128a9f576fd4be05 (diff) | |
download | haskell-91c11feacc4c66a7ebcf8a88ab1cb851ce48142a.tar.gz |
testsuite: format commands using config dict
Summary:
Allow `cmd_wrapper` to return a format string that can refer to config values.
Very useful! This allows for many tests to be defined in pure Python, instead
of in an additional script or Makefile.
Example:
def Thpc(cmd):
return(cmd + ' && {hpc} report Thpc.tix')
test('Thpc', [cmd_wrapper(Thpc), only_ways['hpc']), compile_and_run, [''])
The `{hpc}` is replaced by the value of `config.hpc`. The result is that the
module `Thpc` first gets compiled, then the binary `Thpc` is run, and then the
`hpc report` command is run. The output of all of this is redirected
(and later appended) to Thpc.run.stdout/stderr as normally.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D706
Diffstat (limited to 'rts/ThreadLabels.h')
0 files changed, 0 insertions, 0 deletions