mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 01:43:35 +00:00
8ece998041d040a4aabb24afe00a0e35bf369473
2 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
7f64f6eae3 |
Rename X's aux modules as X_helper_N in valid_seq.
Do this after renaming the main modules of tests that either
- had names that did not even attempt to describe what problem
they were intended to test for, or
- had names that include either a "test_" prefix or a "_main" suffix.
This ended up renaming most of the modules in this directory. The reason
for this is that many tests' names had an "intermod_" or "nested_" prefix.
This was useful in the valid directory, where these tests originally were,
but it is not useful here, since these tests are in the valid_seq directory
to be executed sequentially *precisely because* they involve multiple modules.
The set of renames of main modules are is:
func_int_bug_main -> func_int_bug
intermod_bug_nested -> spurious_match
intermod_char -> char_escape_opt
intermod_dcg_bug -> dcg_bug
intermod_impure -> call_impure_in_opt
intermod_lambda -> exported_lambda
intermod_nested -> to_submods_opt
intermod_nested_module -> read_submod_opt
intermod_nested_module_bug -> mode_from_int0_opt
intermod_nested_uniq -> head_var_unify_uniq
intermod_quote -> opt_file_quote
intermod_record -> field_access_funcs
intermod_test -> overload_resolution
intermod_type_spec -> type_spec_vars
intermod_typeclass_exist -> typeclass_exist_opt
intermod_typeclass -> typeclass_in_opt
intermod_pragma_import -> foreign_proc_import
intermod_ua_type_spec -> unused_args_type_spec
intermod_user_equality_nested -> user_eq_pred_nested
intermod_user_equality -> user_eq_pred_nonnested
intermod_user_sharing -> sharing_in_opt
module_a -> indirect_import_two_paths
module_b -> indirect_import_one_path
module_c -> DELETED
module_d -> DELETED
module_e -> DELETED
nested_module_bug -> nested_module_ambiguity
nested_mod_type_bug -> type_exported_to_submods
parsing_bug_main -> parsing_bug
test_xmlreader -> xmlreader
Each of the new main modules includes a note about its previous name.
The old files module_[bcd].m were each used by two or more tests,
definitely including module_a and module_b, and including
module_c and module_d for some of them. The module_c and module_d tests
did not test anything that module_b did not test, and the module_e test
did not test anything useful at all, which is why this diff deletes them.
The diff also ensures that the module_a and module_b tests, under their
new names, now used disjoint sets of helper modules.
Add a note to module_a, under its new name, indirect_import_two_paths,
that despite an original log message saying that it tests importing
the same module via both direct and indirect paths, there is no actual
indirect import of the module in question.
|
||
|
|
e0cdfc2fe2 |
Make the tests really work in parallel.
There was a bug that prevented the tests in each directory from being run
in parallel, even when the mmake was invoked with e.g. -j4. The bug
was the absence of a '+' on an action that invoked tests/run_one_test.
Without that +, the make process inside the "mmake -j4 runtests_local"
command issued by bootcheck screwed up its connection with the recursive
make invoked by run_one_test, and apparently decided to stop using
parallelism. It was telling us this all this time but its messages,
which looked like this:
make[2]: warning: -jN forced in submake: disabling jobserver mode.
were lost in the sea of other bootcheck output until my recent change
to run_one_test.
A single-character change fixes the bug; the rest of this big change is
dealing with the consequences of fixing the bug. Many test cases in
the hard_coded and valid directories contain nested modules, which
need to be compiled sequentially.
tests/Mmake.common:
Fix the bug.
Delete the duplicate "ALL TESTS SUCCEEDED" message from the runtests
target, since the runtests_local target already prints a message
to that effect. Make this message more emphatic.
tests/run_one_test:
Make the output a bit easier to understand.
tests/hard_coded/*.{m,exp}:
tests/submodules/*.{m,exp}:
Move the source files and expected output files of the test cases that
use nested modules from hard_coded to submodules, since most of the tests
in the hard_coded can be done in parallel, while the ones in submodules
are already done in sequence.
tests/hard_coded/Mmakefile:
tests/hard_coded/Mercury.options:
tests/submodules/Mmakefile:
tests/submodules/Mercury.options:
Move the Mmakefile and Mercury.options entries of the moved test cases
from hard_coded to submodules.
tests/valid_seq:
A new test directory, to hold the test cases originally in tests/valid
that contain nested modules. Moving these to a new directory, which
forces -j1, allows us to execute the remaining ones in parallel.
tests/valid/*.m:
tests/valid_seq/*.m:
Move the source files of the test cases that use nested modules
from valid to valid_seq.
In a few cases, clean up the test cases a bit.
tests/valid/Mmakefile:
tests/valid/Mercury.options:
tests/valid_seq/Mmakefile:
tests/valid_seq/Mercury.options:
tests/valid/Mmake.valid.common:
Add valid_seq/Mmakefile to list the test cases now in valid_seq,
and add valid_seq/Mercury.options to hold their option values.
Delete the entries of those tests from valid/Mmakefile, and their option
values from valid/Mercury.options. Unlike valid/Mmakefile,
valid_seq/Mmakefile forces -j1.
To avoid unnecessary duplication between the two Makefiles, put
all the rules that both need into valid/Mmake.valid.common, and
include this in both Mmakefiles.
tests/string_format/Mmakefile:
Force -j1, since these tests share a library module.
tests/Mmakefile:
List the new valid_seq directory among the others.
tests/bootcheck:
Execute the tests in the new valid_seq directory as well as the others.
Record when the execution of the test suite is started.
Comment out invocations of set -x, since they add no useful information
in the vast majority of cases. The comment sign can be removed if and
when the information *would* be useful.
Don't try to copy a nonexistent file. (The error message about this
was also lost in the noise.)
|