Commit Graph

15 Commits

Author SHA1 Message Date
Mark Brown
784dc26cab Fix bugs that were stopping *.res and *.out files being cleaned up properly.
Estimated hours taken: 0.5

Fix bugs that were stopping *.res and *.out files being cleaned up properly.

tests/Mmake.common:
tests/general/accumulator/Mmakefile:
tests/invalid/Mmakefile:
tests/misc_tests/Mmakefile:
tests/tabling/Mmakefile:
tests/term/Mmakefile:
tests/valid/Mmakefile:
tests/warnings/Mmakefile:
	Make cleaning tasks depend on (real)clean_local rather than
	(real)clean.  This is because tests/startup and tests/shutdown
	use the *_local targets.

tests/general/Mmakefile:
	Fix bugs in the recursive mmake calls.
1999-07-14 17:04:41 +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
b8aed5707b Allow test cases to have more than one expected output.
Estimated hours taken: 0.5

tests/Mmake.common:
	Allow test cases to have more than one expected output.

tests/general/string_format_test_2.exp2:
tests/general/string_format_test_3.exp2:
tests/hard_coded/no_fully_strict.exp2:
	Add alternative expected output for these
	test cases, since the output is different
	depending on whether or not the program is
	compiled in a grade that supports stack traces.
1998-11-04 07:53:29 +00:00
Fergus Henderson
1eca19786e Add Mmake support for target-specific MCFLAGS flags (MCFLAGS-foo, etc.)
Estimated hours taken: 3

Add Mmake support for target-specific MCFLAGS flags (MCFLAGS-foo, etc.)
using some tricky GNU Make hackery that avoids warning about undefined
variables.
Also define ALL_MCFLAGS = $(MCFLAGS) $(TARGET_MCFLAGS) $(EXTRA_MCFLAGS)
and use $(ALL_MCFLAGS) instead of $(MCFLAGS).  This allows user Mmakefiles
to override MCFLAGS without suppressing the use of the TARGET_MCFLAGS
and EXTRA_MCFLAGS.

Similarly for the other *FLAGS variables.

scripts/Mmake.vars.in:
	Define ALL_*FLAGS and TARGET_*FLAGS.

scripts/Mmake.rules:
	Use ALL_*FLAGS instead of *FLAGS.

scripts/mmake.in:
	Re-enable the warnings about undefined variables,
        since we won't get too many spurious warnings now.

Mmake.common.in:
	Delete `$(MCFLAGS-$*)' from the definition of `MCFLAGS', since this
	is now done automatically by Mmake.

tests/Mmake.common:
	Delete the definitions of MCFLAGS and GRADEFLAGS, since this stuff
	is now done automatically by Mmake.

doc/user_guide.texi:
NEWS:
	Document these changes.
1998-08-04 14:06:10 +00:00
Fergus Henderson
3f3c542d3d Add $(GRADEFLAGS-$@) as well as $(GRADEFLAGS-$*) to GRADEFLAGS.
Estimated hours taken: 0.25

tests/Mmake.common:
	Add $(GRADEFLAGS-$@) as well as $(GRADEFLAGS-$*) to GRADEFLAGS.
	When doing the final link step, $@ is set but $* is not,
	so this change is necessary for the setting of `GRADEFLAGS-foo'
	to get passed to `ml' when linking `foo'.
	Also add some comments.
1998-01-15 02:05:51 +00:00
Fergus Henderson
9000f9e47a Add support for setting MLFLAGS-foo' to alter the MLFLAGS'
Estimated hours taken: 3

tests/Mmake.common:
	Add support for setting `MLFLAGS-foo' to alter the `MLFLAGS'
	used for compiling `foo'.

tests/general/Mmakefile:
	Set `MLFLAGS-string_test' to `--no-strip', to work around a bug
	(probably in the Solaris linker) that shows up when this test
	is run on kryten with options `-O1 --opt-space' in grade `none'.
1998-01-09 04:57:34 +00:00
Fergus Henderson
5d0414bbab For the tests of accurate gc, just add `--gc accurate'
Estimated hours taken: 0.5

tests/Mmake.common:
tests/valid/Mmakefile:
	For the tests of accurate gc, just add `--gc accurate'
	to GRADEFLAGS, rather than setting GRADE=asm_fast.agc.
	Otherwise the tests fail on systems for which we
	don't support asm_fast.* grades.
1997-11-22 17:14:02 +00:00
Tyson Dowd
b39bbb1d53 Add test cases for recently fixed accurate garbage collection compilation
Estimated hours taken: 1

Add test cases for recently fixed accurate garbage collection compilation
problems.

tests/valid/Mmake:
tests/valid/agc_unused_in.m:
	Test case for getting liveness right with an unused polymorphic typed
	variable with a mode of `in'.

tests/valid/agc_unbound_typevars.m:
	Test case for keeping the information needed for unbound type
	variables.
1997-05-15 06:55:32 +00:00
Fergus Henderson
e5d98e3282 Simplify the way the Mmake files in the tests subdirectories use
Estimated hours taken: 0.5

Simplify the way the Mmake files in the tests subdirectories use
different MCFLAGS for different files.

tests/Mmake.common:
	Add `MCFLAGS = $(MCFLAGS-$*) $(EXTRA_MCFLAGS)'.

tests/hard_coded/Mmake:
	Remove `MCFLAGS = $(MCFLAGS-$*) $(EXTRA_MCFLAGS)', since that
	is now in ../Mmake.common.

tests/general/Mmake:
tests/valid/Mmake:
	Set `MCFLAGS-<foo> = blah', rather than hard-coding the rule
	for `<foo>.c'.
1997-04-21 09:56:13 +00:00
Bert Thompson
1b193ac573 Some of the makefiles contain calls to "diff -u", however the
Estimated hours taken: 0.1

Some of the makefiles contain calls to "diff -u", however the
-u option is not supported on most platforms, whereas the -c option is.
The -c option has almost exactly the same effect.

These platforms have the -c option but not the -u option:
	Digital Unix
	Solaris
	SunOS
	POSIX

These platforms have both -c and -u options:
	IRIX
	Linux (GNU diff)

tests/
	Mmake.common
	warnings/Mmake
	invalid/Mmake

Changed "diff -u" to "diff -c".
1997-03-21 01:26:21 +00:00
Tyson Dowd
bc1e28d8d5 Fix bugs in the scripts for running tests.
Estimated hours taken: 6

Fix bugs in the scripts for running tests.

tests/handle_options:
	Quote EXTRA_CFLAGS and EXTRA_MCFLAGS so that we can use
	eval in runtests.

tests/Mmake.common:
	Set MGNUCFLAGS using $(EXTRA_MGNUFLAGS) and $(EXTRA_CFLAGS)

tests/*/runtests:
	Don't pass empty strings as arguments to mmake, as this can
	tickle bugs in make.
	Try
		make -f foo.123 ""
	on a CASE machine or hydra (not kryten, it has a different
	version of gnu-make). It will chop the `23' from that string.
	So when using `make -f mmake.$$', only the single digit pids
	work, which is fairly limiting.
1997-03-18 06:01:27 +00:00
Fergus Henderson
0ea46f5ed0 Make HAVE_NUPROLOG default to `no', rather than being determined
Estimated hours taken: 0.25

tests/Mmake.common:
	Make HAVE_NUPROLOG default to `no', rather than being determined
	dynamically.

tests/generate_exp:
	Pass HAVE_NUPROLOG=yes to mmake.
1996-12-19 03:43:48 +00:00
Fergus Henderson
aaffb1b1f5 Change the test for NU-Prolog to be dynamic rather than
Estimated hours taken: 0.25

tests/Mmake.common:
	Change the test for NU-Prolog to be dynamic rather than
	hard-coded.

tests/NUPROLOG:
	Removed, since it's no longer needed.
1996-12-12 12:26:03 +00:00
Fergus Henderson
6234bf7c97 Fix a bug in the testing process which meant
Estimated hours taken: 0.25

Fix a bug in the testing process which meant
that on kryten it tried to remake the `.exp' files
in the hard_coded directory using NU-Prolog.

tests/Mmake.common:
	Remove the rule for creating `.exp' files.
1996-11-26 01:14:43 +00:00
Zoltan Somogyi
28b1622fcb The old Mmake file was not useful in this directory, but it contained
Estimated hours taken: 0.2

The old Mmake file was not useful in this directory, but it contained
rules needed by the Mmake files in the subdirectories.

I have renamed Mmake to Mmake.common, and added a new Mmake file
that defines one useful entry (clean).
1996-11-21 08:28:58 +00:00