Commit Graph

16 Commits

Author SHA1 Message Date
Julien Fischer
9875bf32c0 Fix a test failure.
tests/grade_subdirs/hello.m:
   Fix error accidently introduced in commit cb5e4a.
2021-11-13 17:21:15 +11:00
Zoltan Somogyi
ecb5e4a9e6 Update the style of many test cases.
tests/declarative_debugger/*.m:
tests/exceptions/*.m:
tests/general/*.m:
tests/grade_subdirs/*.m:
tests/purity/*.m:
tests/submodules/*.m:
tests/typeclasses/*.m:
    Update programming style.

tests/declarative_debugger/*.inp:
    Update line numbers in breakpoint commands.
tests/declarative_debugger/*.exp:
    Update expected line numbers.

tests/exceptions/Mercury.options:
tests/general/Mercury.options:
    Disable some warnings that are irrelevant to the test.
2021-07-25 23:26:17 +10:00
Zoltan Somogyi
1f45f91886 Make "mmake runtests" work again.
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 = .."
2020-06-10 01:05:15 +10:00
Zoltan Somogyi
afe2887882 Remove stale references to test subdirs.
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.
2020-04-14 11:23:12 +10:00
Zoltan Somogyi
8a764392d9 Avoid warnings from make in test directories.
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.
2015-09-08 05:57:53 +10:00
Zoltan Somogyi
73f0a36719 Allow the use of -jN in many test directories.
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.
2015-02-19 06:02:45 +11:00
Zoltan Somogyi
33eb3028f5 Clean up the tests in half the test directories.
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.
2015-02-14 20:14:03 +11:00
Zoltan Somogyi
d33273d033 Tell vim not to expand tabs in Makefiles.
This file-specific setting will override a default setting of expandtabs
in $HOME/.vimrc.

*/Makefile:
*/Mmakefile:
    As above.

tests/hard_coded/.gitignore:
    Don't ignore the purity subdir. This ignore must have been left over
    from when purity.m was a test in hard_coded, not hard_coded/purity,
    and it ignored an executable, not a directory.
2015-01-08 22:07:29 +11:00
Julien Fischer
b635ebf80b Convert .cvsignore -> .gitignore files in tests directory.
tests/*/.cvsignore:
    As above.

library/.gitignore:
    Ignore files generated by the namespace cleanliness check.
2013-01-07 14:33:25 +11:00
Julien Fischer
a60beb42e7 Make the none.gc.memprof grade work with MSVC again.
Branches: main, 11.07

Make the none.gc.memprof grade work with MSVC again.

Avoid more warnings when compiling with MSVC.

compiler/layout_out.m:
	Avoid an incomplete type in the declaration of the alloc_sites
	array.  (Similar changes need to be made for the layout structures
	related to debugging and deep profiling - I am in the process of
	testing the former, the latter doesn't currently work on Windows
	any way.)

browser/listing.m:
	Use don't-care variables in some foreign_procs.
	This avoids warnings about assignments from uninitialized
	variables with MSVC.

*/.cvsignore:
	Update cvsignore entries.

	Ignore files generated by mprof.
2011-10-20 06:37:35 +00:00
Peter Wang
75771a9b6e Allow testing of java grade. Requires using `mmc --make' for now.
Branches: main

Allow testing of java grade.  Requires using `mmc --make' for now.
This patch does not attempt to fix test failures.

tests/Mmake.common:
        Delete unneeded Java-specific rule, which was broken.

tests/benchmarks/Mmakefile:
tests/general/Mmakefile:
tests/general/string_format/Mmakefile:
tests/grade_subdirs/Mmakefile:
tests/hard_coded/Mmakefile:
tests/recompilation/Mmakefile:
tests/term/Mmakefile:
tests/valid/Mmakefile:
        Don't deliberately disable tests in java grade.

tests/*.m:
        Add Java foreign code.

        Write dummy procedures instead of abusing `:- external'.
2009-08-14 03:21:55 +00:00
Zoltan Somogyi
dcd2922eb4 Sort the lists of tests in each directory. (We usually keep each list
Estimated hours taken: 0.2
Branches: main

tests/*/Mmakefile:
	Sort the lists of tests in each directory. (We usually keep each list
	sorted, but then we concatenate several lists, which loses the order.)
	This gives you a better idea of how far a bootcheck still has to go.

tools/bootcheck:
	Build the interface files before the rest of the files in the library
	directory. Again, this gives you a better idea of how far a bootcheck
	still has to go.

	Make the dependencies for the slice subdirectory of the stage2 at the
	same time as the other subdirs; don't let it be caught later.

library/Mmakefile:
	Build the interface files in the right order.
2008-12-01 00:32:58 +00:00
Julien Fischer
1078cf508c Update or add these files. In particular, CVS should ingore
Estimated hours taken: 0.2
Branches: main

tests/*/.cvsignore:
tests/*/.nocopyright:
	Update or add these files.  In particular, CVS should ingore
	.mgnuc* files.
2007-07-25 06:40:21 +00:00
Michael Wybrow
483d0c71a2 Modifications to the test suite to allow testing in grade java.
Estimated hours taken: 14
Branches: main

Modifications to the test suite to allow testing in grade java.


mercury/tools/test_mercury:
        Set-up the required CLASSPATH variable.

tests/Mmake.common:
        Added a rule to build `.out' files when the grade is java.

tests/benchmarks/Mmakefile:
        Enable only the working tests for the benckmarks directory.

tests/dppd/Mmakefile:
tests/general/Mmakefile:
tests/general/accumulator/Mmakefile:
tests/general/string_format/Mmakefile:
tests/general/structure_reuse/Mmakefile:a
tests/grade_subdirs/Mmakefile:
tests/hard_coded/Mmakefile:
tests/hard_coded/exceptions/Mmakefile:
tests/hard_coded/purity/Mmakefile:
tests/hard_coded/sub-modules/Mmakefile:
tests/hard_coded/typeclasses/Mmakefile:
tests/recompilation/Mmakefile
tests/term/Mmakefile:
tests/valid/Mmakefile:
        Disable test cases for grade java.

tests/recompilation/test_functions:
        Add framework needed to do recompilation testing for the java grade.
2003-01-12 22:33:35 +00:00
Simon Taylor
e365fcc136 Fix bugs in the code to link executables and libraries
Estimated hours taken: 0.5
Branches: main, release

compiler/compile_target_code.m:
	Fix bugs in the code to link executables and libraries
	created with `--use-grade-subdirs' into the user's
	directory.

tests/grade_subdirs/Mmakefile:
	Check that building libraries with `--use-grade-subdirs'
	works.
2002-11-30 14:32:44 +00:00
Simon Taylor
57bcfc05ba Improve the handling of `--use-grade-subdirs' so that it can
Estimated hours taken: 2.5
Branches: main

Improve the handling of `--use-grade-subdirs' so that it can
be documented.

compiler/compile_target_code.m:
	With `--use-grade-subdirs', link or copy executables
	and libraries into the user's directory.

compiler/make.program_target.m:
compiler/modules.m:
	Move code to create a symlink into modules.m, next to
	the code to create directories (all of this should really
	go in the standard library).

	Add a predicate to copy a file (which should also go
	in the standard library).

compiler/make.program_target.m:
	Make the realclean target delete the symlinks or copies
	of executables and libraries.

NEWS:
library/io.m:
	Add io__binary_input_stream_foldl, etc. for use in copying files.

NEWS:
compiler/options.m:
doc/user_guide.texi:
	Document `--use-grade-subdirs'.

tests/Mmakefile:
tests/grade_subdirs:
tests/grade_subdirs/Mmakefile:
tests/grade_subdirs/Mercury.options:
tests/grade_subdirs/hello.{m,exp}:
	Test case.
2002-10-31 14:47:44 +00:00