all.T 1017 Bytes
Newer Older
1
test('T10138', ignore_stdout, run_command,
2
     # Using --hpcdir with an absolute path should work (exit code 0).
3
     ['{hpc} report T10138.keepme.tix --hpcdir="`pwd`/.keepme.hpc.T10138"'])
4 5 6

# Run tests below only for the hpc way.
#
7 8 9 10
# Do not explicitly specify '-fhpc' in extra_hc_opts, unless also setting
# '-hpcdir' to a different value for each test. Only the `hpc` way does this
# automatically. This way the tests in this directory can be run concurrently
# (Main.mix might overlap otherwise).
11
setTestOpts(only_ways(['hpc']))
12 13 14 15

def T2991(cmd):
  # The .mix file for the literate module should have non-zero entries.
  # The `grep` should exit with exit code 0.
thomie's avatar
thomie committed
16
  return(cmd + " && grep -q cover_me .hpc/T2991LiterateModule.mix")
17 18 19 20
test('T2991', [cmd_wrapper(T2991), extra_clean(['T2991LiterateModule.hi',
                                                'T2991LiterateModule.o'])],
              # Run with 'ghc --main'. Do not list other modules explicitly.
              multimod_compile_and_run, ['T2991', ''])