Hi, I am writing a compiler and have a large amount of tests. Before, I used dejagnu and tcl and manually walked through the tests directory, executing each file and recording output, comparing it with the expected output, able to differ between expected error (such as a segfault) and expected failure (incorrect output) and doing some metrics.
I found that it would be more appropriate to use normal TESTS (parallel-tests) for this, because my tcl script couldn't run tests in parallel. Also, normal tests have direct support from automake, so I don't need the tcl script, anymore. However, I immediately ran into a problem. My compiler also contains an interpreter, which I want to test. Most of the time, the output from compiled code and interpreted code is the same, so I only need one expected output file per test, so I did this: TESTS += t1075b.rexp # compiled TESTS += t1075b.texp # interpreted TEST_EXTENSIONS = .rexp .texp REXP_LOG_COMPILER = $(srcdir)/runtest TEXP_LOG_COMPILER = $(srcdir)/runtest # in case the two outputs are equal, the directory only has a single # .exp file which we copy to .texp and .rexp here .exp.rexp: ; @cp $< $@ .exp.texp: ; @cp $< $@ The copying worked well and everything is ok, except that both .rexp and .texp produce .log, so after one of them has been run, the other one is not run, because the .log already exists. Any ideas on how I can get this to work without adding yet more subdirs? -- Pippijn van Steenhoven
signature.asc
Description: Digital signature