mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-19 03:13:40 +00:00
Estimated hours taken: 15 Add a testing architecture for the samples directory. The tests are in the "tests" subdirectory of the samples directory. This keeps them close to the samples, but not close enough to clutter up the samples. It also means you don't have to worry about the issue of exactly where the developer has checked out the CVS tests module. samples/c_interface/simpler_c_calls_mercury/Mmakefile: Update this example to generate a .a file instead of directly using $(mercury_lib.os) samples/tests/*: Test cases for all the samples.
21 lines
548 B
Plaintext
21 lines
548 B
Plaintext
# Run the tests in each of the subdirectories.
|
|
|
|
subdir_failures=""
|
|
for dir in *
|
|
do
|
|
if test -d $dir -a -x $dir/runtests
|
|
then
|
|
cd $dir
|
|
# we need to use `eval' here to get the quoting right in
|
|
# the case when $runtestopts contains embedded spaces
|
|
if eval ./runtests $runtestopts
|
|
then
|
|
true
|
|
else
|
|
subdir_failures="$subdir_failures $dir"
|
|
fi
|
|
cd ..
|
|
fi
|
|
done
|
|
|