Commit Graph

13 Commits

Author SHA1 Message Date
Peter Ross
976da6e014 Update the test so that it also tests a separate sub-module whose
Estimated hours taken: 0.5
Branches: main

tests/hard_coded/sub-modules/include_parent.m:
tests/hard_coded/sub-modules/separate2.m:
tests/hard_coded/sub-modules/use_submodule.m:
tests/hard_coded/sub-modules/use_submodule.exp:
    Update the test so that it also tests a separate sub-module whose
    filename isn't fully qualified.
2001-11-16 14:49:18 +00:00
Peter Ross
c14c007434 Update the test so that it also tests a separate sub-module whose
Estimated hours taken: 0.5
Branches: main

tests/hard_coded/sub-modules/include_parent.m:
tests/hard_coded/sub-modules/separate2.m:
tests/hard_coded/sub-modules/use_submodule.m:
tests/hard_coded/sub-modules/use_submodule.exp:
    Update the test so that it also tests a separate sub-module whose
    filename isn't fully qualified.
2001-11-16 14:06:12 +00:00
Peter Ross
2cb44121b7 When compiling a module which contains a nested sub-module you must
Estimated hours taken: 1
Branches: main

When compiling a module which contains a nested sub-module you must
build the .int0 file before attempting to build the .int file.  This is
because while building the .int file you will need the .int0 file to
build the .int file of the nested sub-module.

compiler/modules.m:
    When generating the .d file for a nested submodule.  Add the rule
        <sourcefilename>.date : <sourcefilename>.int0
    where <sourcefilename> is the name of the sourcefile which contains
    the nested sub-module.

tests/hard_coded/sub-modules/Mmakefile:
tests/hard_coded/sub-modules/include_parent.m:
tests/hard_coded/sub-modules/include_parent.separate.m:
tests/hard_coded/sub-modules/use_submodule.exp:
tests/hard_coded/sub-modules/use_submodule.m:
    Include a test which tests that we can build both nested and
    separate sub-modules when they are not the module which contains
    main.
2001-11-15 15:01:31 +00:00
Fergus Henderson
6cb0b9f9a3 Add a test case that uses class', int', and `char' as module names.
Estimated hours taken: 0.25

tests/hard_coded/sub-modules/Mmakefile:
tests/hard_coded/sub-modules/class.m:
tests/hard_coded/sub-modules/class.exp:
	Add a test case that uses `class', `int', and `char' as module names.
	This test case is testing that module names which have the
	same syntax as keywords in the target language get properly
	mangled/escaped.
2001-02-07 13:50:52 +00:00
Fergus Henderson
7dc444c8db Add support to the test suite for testing the GCC back-end
Estimated hours taken: 0.5

Add support to the test suite for testing the GCC back-end
(`--target asm') version of the compiler.

tests/handle_options:
	Add a `-t <target>' / `--target <target>' option.
	If this is set, include `--target <target>' in $mmakeopts,
	so that it gets passed to mmake.

tests/*/runtests:
tests/*/*/runtests:
	Put `-k' after $mmakeopts, since `-k' is a `make' option,
	not an `mmake' option, and `mmake' options (in particular
	`--target') must precede all make options.
2001-01-31 11:34:44 +00:00
Zoltan Somogyi
66ac848b1e If the new --test-params option is given, copy the stage 2 Mmake.params
Estimated hours taken: 1

tools/bootcheck:
	If the new --test-params option is given, copy the stage 2 Mmake.params
	file to the tests directory. This capability is required to test
	changes such as compiling the library without special preds and
	the test cases with special preds. You get a lot of spurious errors
	if a test case assumes that since it was compiled with special
	preds, all other modules it is linked with are also compiled with
	special preds, and thus makes calls to non-existent special preds
	for the types defined in the library.

tests/*/Mmakefile:
tests/*/*/Mmakefile:
	Include Mmake.params from the top level tests directory if it exists.
2000-04-05 06:12:04 +00:00
Fergus Henderson
533b648219 Add support for setting MLFLAGS to tests/runtests.
Estimated hours taken: 1

Add support for setting MLFLAGS to tests/runtests.
This is needed if you want to run the tests with
static linking when the default is shared linking,
or vice versa.

tests/handle_options:
	Add a new option for setting MLFLAGS.
	Define variables `mmakeopts' and `runtestopts' containing all the
	options needed for running mmake and runtests (respectively).

tests/subdir_runtests:
	Use $runtestopts rather than $jfactor $cflag $gflag $fflag.

tests/runtests:
tests/*/runtests:
tests/*/*/runtests:
	Use $mmakeopts rather than $jfactor $gradeopt $flagsopt $cflagsopt.

tests/hard_coded/exceptions/runtests:
	New file.  This directory was missing a `runtests' script.
1999-10-03 08:20:42 +00:00
Fergus Henderson
cef75e54de Disable the use of parallel make, since parallel make with nested
Estimated hours taken: 0.5

tests/hard_coded/sub-modules/runtests:
	Disable the use of parallel make, since parallel make with nested
	modules is not yet supported.
1999-07-28 09:27:48 +00:00
Fergus Henderson
d8cfbaf07a Fix the remaining bugs with the handling of partial qualifiers
Estimated hours taken: 10

Fix the remaining bugs with the handling of partial qualifiers
for nested modules.

compiler/module_qual.m:
	Define a new abstract type partial_qualifier_info, and a predicate
	mq_info_get_partial_qualifier_info to get this type from the mq_info.
	Define a new predicate get_partial_qualifiers/3 in module_qual.m
	which is like the old get_partial_qualifiers/2 predicate from
	modules.m except that it takes a partial_qualifier_info and
	uses the information in this to return only the partial qualifiers
	for modules which are visible, rather than returning all partial
	qualifier regardless of whether the modules that they refer to
	are in scope or not.

compiler/prog_util.m:
	Export the `insert_module_qualifier' predicate, for use in the
	definition of get_partial_qualifiers/3.

compiler/hlds_module.m:
compiler/make_hlds.m:
	Change the code for make_hlds__ctors_add and
	hlds_module__pred_table_insert/5 so that they handles partial
	qualifiers properly, computing the partial qualifiers by
	calling get_partial_qualifiers/3 rather than by checking the
	NeedQual variable and calling get_partial_qualifiers/2.

compiler/modules.m:
	Delete the old get_partial_qualifiers/2 predicate.

compiler/hlds_module.m:
	Add a new field to the HLDS containing the partial_qualifier_info.
	Add a partial_qualifier_info parameter to pred_table_insert/5.

compiler/check_typeclass.m:
compiler/make_hlds.m:
	When calling pred_table_insert/5, get the partial_qualifier_info
	from the HLDS and pass it as an extra argument.

tests/hard_coded/sub-modules/nested.m:
tests/hard_coded/sub-modules/nested3.m:
tests/hard_coded/sub-modules/parent.m:
tests/hard_coded/sub-modules/nested.exp:
tests/hard_coded/sub-modules/nested3.exp:
tests/hard_coded/sub-modules/parent.exp:
	Uncomment parts of these test cases which were previously
	commented out because they were not yet supported.

doc/reference_manual.texi:
	Delete the description of this bug.
1999-07-14 14:57:13 +00:00
Peter Ross
f897757c22 Update the .cvsignore file.
Estimated hours taken: 0.25

Update the .cvsignore file.
1999-07-14 00:56:21 +00:00
Fergus Henderson
0705c72cf0 Fix some of the bugs with the handling of partial qualifiers
Estimated hours taken: 4

Fix some of the bugs with the handling of partial qualifiers
for nested modules.  With this change, we now handle partial
qualifiers correctly for types, insts, modes, and type classes,
which are handled by module_qual.m.  We still don't get it quite
right for constructors, functions, and predicates, for which
module qualification is handled by other modules (make_hlds.m,
hlds_module.m, typecheck.m, post_typecheck.m, and modecheck_unify.m).

compiler/module_qual.m:
	Keep track of which modules are visible.
	When looking up a qualified symbol, check that the specified module
	is visible.

tests/hard_coded/sub-modules/nested.m:
tests/hard_coded/sub-modules/nested3.m:
tests/hard_coded/sub-modules/parent.m:
	Uncomment parts of these test cases which were previously
	commented out because they were not yet supported.
1999-07-12 15:14:31 +00:00
Mark Brown
55d0d482c6 Provide a more uniform interface to the test directories.
Estimated hours taken: 9

Provide a more uniform interface to the test directories.  Before this
change, the tests directory as well as direct descendents had `runtests'
scripts to execute the tests.  These would run `mmake', which in turn
would recursively run `mmake' in any subdirectories.  The subdirectories
did not have their own `runtests' scripts.

This change adds a `runtests' script to those subdirectories that did
not have them before.  The scripts have the same meaning as they did
previously---run all tests in the current directory and below, and
return a status of 0 only if all tests pass.

The rationale for this change is so that each directory in the tests
is treated the same, regardless of whether it is a top-level
directory or not.  This means, for example, that any test directory can
be used as an argument to the `--test-dir' option to tools/bootcheck.

This change also links tests/general/accumulator into the automated
testing suite.

tests/README:
	Update comments.

tests/Mmake.common:
	Introduce new target dependencies.  Targets of the form
	`foo' depend on the targets `foo_local' and `foo_subdirs'.

tests/subdir_runtests:
	New script to recursively call runtests scripts in subdirectories.
	Most of the code for this script originally came from
	tests/runtests.

tests/shutdown:
tests/startup:
	Use `realclean_local' as a target instead of `realclean', since
	the subdirectories will be handled by other runtests scripts.

tests/runtests:
tests/debugger/runtests:
tests/general/runtests:
tests/hard_coded/runtests:
	Use the new script to run tests in the subdirectories, rather
	than doing a recursive mmake.  Make sure that non-zero return
	values are propagated upwards where appropriate.

tests/debugger/declarative/runtests:
tests/hard_coded/typeclasses/runtests:
tests/hard_coded/sub-modules/runtests:
	New scripts to handle running tests in the subdirectories.

tests/debugger/Mmakefile:
tests/general/Mmakefile:
tests/hard_coded/Mmakefile:
	Add `*_subdirs' targets that do a recursive Mmake.  Change the
	existing targets to `*_local' ones.

tests/warnings/Mmakefile:
	Manually add the extra dependencies, since this Mmakefile does
	not include tests/Mmake.common.
1999-07-12 06:26:05 +00:00
Fergus Henderson
4c9bf89e1f Change the documentation and test cases to reflect the fact that we
Estimated hours taken: 1

Change the documentation and test cases to reflect the fact that we
currently don't support parallel makes for nested modules.
(The comments in the write_depenency_file predicate in compiler/modules.m
explain why not.)

doc/reference_manual.texi:
	Update the list of bugs and limitations in the sub-modules chapter
	to say that we don't support parallel makes for nested modules.

tests/hard_coded/Mmakefile:
tests/hard_coded/nested*.m:
tests/hard_coded/parent*.m:
tests/hard_coded/sub-modules/Mmakefile:
tests/hard_coded/sub-modules/nested*:
tests/hard_coded/sub-modules/parent*:
	Move the sub-module test cases to a new subdirectory
	`tests/hard_coded/sub-modules'.  One reason for this is just
	to separate out the test cases for this feature, just as
	we do with the typeclass test cases.
	But the other reason is to ensure that the nested module test
	cases won't get built in parallel, since currently there are
	some problems with the Mmake rules for building nested modules
	that cause race conditions if you use parallel makes.
1998-11-09 03:53:08 +00:00