tests/analysis/Mmakefile:
tests/analysis_ctgc/Mmakefile:
tests/analysis_excp/Mmakefile:
tests/analysis_external/Mmakefile:
tests/analysis_sharing/Mmakefile:
tests/analysis_table/Mmakefile:
tests/analysis_trail/Mmakefile:
tests/analysis_unused_args/Mmakefile:
tests/feedback/Mmakefile:
All these files include tests/Mmake.common, whose documentation says
that all Mmakefiles including it should define the PROGS make variable.
These files did not, which led to annoying diagnostics from make.
This diff adds the missing definitions.
tests/invalid/Mmakefile:
Delete a reference to a variable whose definition was deleted in June.
(The one test whose name its value contained was moved into
the value of another, similar variable.)
tests/Mmake.common:
Stop defining RUN_RECOMPILATION_TESTS, because it has not been used
since 2021.
Fix two typos.
tests/recompilation/Mmakefile:
Delete the only remaining mention of RUN_RECOMPILATION_TESTS,
which is in an unused target.
... in the first few test case directories.
tests/analysis_external/Mmakefile:
tests/analysis_external/ext_1.m:
tests/analysis_external/ext_1_runtest.sh:
tests/analysis_external/ext_2.m:
tests/analysis_external/ext_2_runtest.sh:
Rename the ext and ext2 test cases to ext_1 and ext_2 respectively.
tests/benchmarks/Mmakefile:
tests/benchmarks/deriv_1.exp:
tests/benchmarks/deriv_1.m:
tests/benchmarks/deriv_2.exp:
tests/benchmarks/deriv_2.m:
Rename the deriv and deriv2 test cases to deriv_1 and deriv_2 respectively.
tests/declarative_debugger/Mercury.options:
tests/declarative_debugger/Mmakefile:
tests/declarative_debugger/ho2.exp:
tests/declarative_debugger/ho2.exp2:
tests/declarative_debugger/ho4.exp:
tests/declarative_debugger/ho5.exp2:
tests/declarative_debugger/ho5.exp3:
tests/declarative_debugger/ho_2.exp:
tests/declarative_debugger/ho_2.exp2:
tests/declarative_debugger/ho_2.inp:
tests/declarative_debugger/ho_2.m:
tests/declarative_debugger/ho_3.exp:
tests/declarative_debugger/ho_3.inp:
tests/declarative_debugger/ho_3.m:
tests/declarative_debugger/ho_4.exp:
tests/declarative_debugger/ho_4.inp:
tests/declarative_debugger/ho_4.m:
tests/declarative_debugger/ho_5.exp:
tests/declarative_debugger/ho_5.exp2:
tests/declarative_debugger/ho_5.exp3:
tests/declarative_debugger/ho_5.inp:
tests/declarative_debugger/ho_5.m:
Rename the ho2/ho3/ho4/ho5 test cases to ho_2/ho_3/ho_4/ho_5 respectively.
tests/declarative_debugger/revise_1.exp:
tests/declarative_debugger/revise_1.inp:
tests/declarative_debugger/revise_1.m:
Rename the revise test case to revise_1, due to the existence of
revise_2.
tests/declarative_debugger/shallow.exp:
tests/declarative_debugger/shallow.m:
tests/declarative_debugger/shallow_helper_1.m:
tests/declarative_debugger/shallow_helper_2.m:
Rename shallow_2/shallow_3 to shallow_helper_1/shallow_helper_2
respectively, since they are part of the shallow test case.
tests/declarative_debugger/trust.exp:
tests/declarative_debugger/trust.inp:
tests/declarative_debugger/trust.m:
tests/declarative_debugger/trust_helper_1.m:
tests/declarative_debugger/trust_helper_2.m:
Rename trust_1/trust_2 to trust_helper_1/trust_helper_2
respectively, since they are part of the shallow test case.
My commit afe2887882 broke the ability
to run the test suite outside of a bootcheck by executing "mmake runtests"
in the tests directory. This diff fixes that.
tests/Mmake.common:
Don't define "TESTS_DIR = ..". While every single tests/*/Mmakefile
defined it as such, I overlooked the fact that tests/Mmakefile itself
defined it ".", referring to the same directory from a different starting
point. Document this easily-overlooked fact.
Rename the old runtests target, which after afe2887 runs the tests
in a single directory, as runtests_dir, to leave the target name
"runtests" itself free for tests/Mmakefile to use.
tests/Mmakefile:
Define "TESTS_DIR = .", and add a target "runtests" which invokes
"mmake runtests_dir" in each test directory.
tools/bootcheck:
Invoke "mmake runtests_dir" instead of "mmake runtests" in each
test directory.
Initialize a variable just before it is used.
tests/*/Mmakefile:
Add back the definition "TESTS_DIR = .."
A long time ago, test directories such as hard_coded had subdirectories
such as hard_coded/typeclasses. These have since been flattened out
(e.g. hard_coded/typeclasses is now just typeclasses), but there were
still remnants of the old approach. This diff deletes those remnants.
tests/*/Mmakefile:
Delete the TESTS_DIR and the SUBDIRS mmake variables; TESTS_DIR
was always set to "..", and SUBDIRS to the empty string.
Delete any references to the make variable NOT_WORKING, since
it is never used.
tests/Mmake.common:
Document that Mmakefiles in test directories don't have to set
TESTS_DIR and SUBDIRS anymore. Fix the formatting of the documentation
of the make variables they do still have to set.
Delete the targets and actions for handling subdirectories of
test directories, since there aren't any.
tests/Mmakefile:
Simplify some code.
Disk space isn't the concern that it used to be so compressing
failed test executables is mostly just a waste of time.
tests/run_one_test:
Don't compress failed test executables.
tests/Mmake.common:
Delete clean_zip target.
tests/*/.gitignore:
Delete *.gz ignore patterns.
Remove old .cvsignore files, moving their contents to .gitignore files.
There are now no .cvsignore files in the repository.
I've also sorted some .gitignore files and avoided repeating a pattern in a
subdirectory's .gitignore file when it is already mentioned in the parent
.gitignore file.
tests/analysis_external/ext.m:
tests/analysis_external/ext2.m:
tests/dppd/bug.m:
tests/valid/determinism.m:
tests/valid/mode_merge_insts.m:
Replace `:- external' declarations with the new pragma form.
tests/Mmake.common:
Don't invoke any actions in the clean_local and realclean_local
targets, since if using mmc --make, the builtin mmake rules
have actions for those targets as well, and make can't handle
more than one action for a target having actions. Replace those
actions with dependencies on other, unique targets that have
the actions instead.
tests/*/Mmakefile:
Avoid actions in clean_local and realclean_local targets the same way.
Sort the test names in some directories that didn't already do so.
Delete some obsolete comments.
Fix style.
tests/valid/Mmake.valid.common:
As for the Mmakefiles above, and also move the definition of a make
variable before it is needed.
tests/Mmake.common:
Replace the -j1 in the runtests_local target used by all the test
directories with $(MAYBE_J1).
tests/*/Mmakefile:
Define MAYBE_J1 it as the empty string in test directories in which
different tests don't share source files.
Define MAYBE_J1 as -j1 in test directories in which
different tests do share source files.
tests/submodules/sub2_a.m:
Add this copy of sub_a.m to allow tests in the submodules directory
to be done in parallel.
tests/submodules/accessibility2.m:
Import sub2_a.m instead of sub_a.m.
tests/warnings/ambig_types_high_level.m:
Add this copy of ambig_types.m to allow tests in the warnings directory
to be done in parallel.
tests/warnings/ambig_high_level.m:
Import ambig_types_high_level.m instead of ambig_types.m.
tests/accumulator/*.m:
tests/analysis_*/*.m:
tests/benchmarks*/*.m:
tests/debugger*/*.{m,exp,inp}:
tests/declarative_debugger*/*.{m,exp,inp}:
tests/dppd*/*.m:
tests/exceptions*/*.m:
tests/general*/*.m:
tests/grade_subdirs*/*.m:
tests/hard_coded*/*.m:
Make these tests use four-space indentation, and ensure that
each module is imported on its own line. (I intend to use the latter
to figure out which subdirectories' tests can be executed in parallel.)
These changes usually move code to different lines. For the debugger tests,
specify the new line numbers in .inp files and expect them in .exp files.
Specifically, rename the following subdirectories of the test directory:
old dir name new dir name
analysis/ext analysis_external
analysis/ctgc analysis_ctgc
analysis/excp analysis_excp
analysis/table analysis_table
analysis/trail analysis_trail
invalid/purity invalid_purity
analysis/sharing analysis_sharing
hard_coded/purity purity
general/accumulator accumulator
analysis/unused_args analysis_unused_args
debugger/declarative declarative_debugger
hard_coded/exceptions exceptions
general/string_format string_format
hard_coded/sub-modules submodules
hard_coded/typeclasses typeclasses
general/structure_reuse structure_reuse
Some subdirectories are still there, to wit, the subdirs of the inactive
test directory stm, each of which (if I remember correctly) holds only one
test case.
The general/structure_reuse directory previously wasn't enabled; I think
this was a bug.
tests/Mmakefile:
tools/bootcheck:
List the new test directories.
tests/Mmake.common:
The analysis_* directories each need to know whether the workspace
uses subdirs. This used to be controlled from one place,
analysis/Mmakefile, but since analysis_* are not subdirs of analysis,
we need a new central place to find this out.
tests/analysis/common.sh:
Update documentation for the move.
tests/OLDDIRS/Mmakefile:
Set the subdir list to empty.
tests/NEWDIRS/Mmakefile:
Update the "this" directory's name, as well as TESTS_DIR.
In analysis_*/Mmakefile, use the new mechanism for detecting the presence
of subdirs.
Specifically, rename the following subdirectories of the test directory:
old dir name new dir name
analysis/ext analysis_external
analysis/ctgc analysis_ctgc
analysis/excp analysis_excp
analysis/table analysis_table
analysis/trail analysis_trail
invalid/purity invalid_purity
analysis/sharing analysis_sharing
hard_coded/purity purity
general/accumulator accumulator
analysis/unused_args analysis_unused_args
debugger/declarative declarative_debugger
hard_coded/exceptions exceptions
general/string_format string_format
hard_coded/sub-modules submodules
hard_coded/typeclasses typeclasses
general/structure_reuse structure_reuse
Some subdirectories are still there, to wit, the subdirs of the inactive
test directory stm, each of which (if I remember correctly) holds only one
test case.
The general/structure_reuse directory previously wasn't enabled; I think
this was a bug.
tests/Mmakefile:
tools/bootcheck:
List the new test directories.
tests/Mmake.common:
The analysis_* directories each need to know whether the workspace
uses subdirs. This used to be controlled from one place,
analysis/Mmakefile, but since analysis_* are not subdirs of analysis,
we need a new central place to find this out.
tests/analysis/common.sh:
Update documentation for the move.
tests/OLDDIRS/Mmakefile:
Set the subdir list to empty.
tests/NEWDIRS/Mmakefile:
Update the "this" directory's name, as well as TESTS_DIR.
In analysis_*/Mmakefile, use the new mechanism for detecting the presence
of subdirs.