Files
mercury/tests/invalid_make_int/Mmakefile
Zoltan Somogyi 916a56f118 Fix an eighth batch of C# invalid test failures.
tests/invalid_make_int/bad_in_interface.{m,int_err_exp}:
    New test case containing the parts of the old test cases
    external_in_interface, fact_table_in_interface and
    foreign_proc_in_interface, all in tests/invalid_nodepend,
    that the compiler now reports when creating .int files.
    This test case replaces the external_in_interface and
    foreign_proc_in_interface test cases, since the only other thing
    they tested was the "no clauses for pred/func ..." message,
    which is also tested by several other test cases.

tests/invalid_make_int/type_vars_int.{m,int_err_exp}:
tests/invalid_make_int/unbound_type_vars_int.{m,int_err_exp}:
    New test cases containing the parts of the old test cases
    invalid_nodepend/type_vars and invalid_nodepend/unbound_type_vars
    respectively containing the errors that the compiler now reports
    when creating .int files.

tests/invalid_make_int/Mercury.options:
tests/invalid_make_int/Mmakefile:
    List the new test cases being added to this directory.

tests/invalid_nodepend/bad_fact_table.m:
    The part of the old invalid_nodepend/fact_table_in_interface test case
    that the compiler does NOT report when creating .int files.
    Due to the removal of the parts that ARE reported at that time,
    the old name is no longer appropriate.

tests/invalid_nodepend/bad_fact_table.err_exp:
tests/invalid_nodepend/bad_fact_table.err_exp2:
    Update these two old expected output files for the changes in the
    file name and the line numbers.

tests/invalid_nodepend/bad_fact_table.err_exp3:
    Add this new expected output file for bootchecks that use mmc --make.
    (The .m file contains an explanation of its contents.)

tests/invalid_nodepend/bug410.{m,err_exp}:
    Fix a syntax error that would be reported at .int file creation time,
    and achieve its effect by simply commenting out the declaration
    whose absence results in the actual errors whose handling
    this test case is checking.

tests/invalid_nodepend/external_in_interface.{m,err_exp}:
tests/invalid_nodepend/foreign_proc_in_interface.{m,err_exp}:
    Delete these test cases, which are replaced by
    invalid_make_int/bad_in_interface.m.

tests/invalid_nodepend/fact_table_in_interface.{m,err_exp,err_exp2}:
    Delete this test case, which is replaced by
    invalid_nodepend/bad_fact_table.

tests/invalid_nodepend/type_vars.{m,err_exp}:
tests/invalid_nodepend/unbound_type_vars.{m,err_exp}:
    Delete the parts of these test cases that are now in
    invalid_make_int/{,unbound_}type_vars_int.

tests/invalid_nodepend/Mmakefile:
    Apply the two deletions and the rename to the list of test cases.

tests/invalid_nodepend/Mercury.options:
    Apply the two deletions and the rename to the list of test cases.

    Specify --no-halt-at-invalid-interface for a whole bunch of test cases,
    allowing the compiler, even Java/C# bootchecks, to proceed past
    the errors reported when creating .int files.
2023-10-30 03:24:27 +11:00

100 lines
2.7 KiB
Makefile

#-----------------------------------------------------------------------------#
# vim: ts=8 sw=8 noexpandtab ft=make
#-----------------------------------------------------------------------------#
TESTS_DIR = ..
THIS_DIR = invalid_make_int
# Two tests, missing_parent_import and sub_c, use nested submodules,
# which requires -j1. The loss of parallelism has a performance impact,
# but due to the small number of test cases in this directory, this impact
# is small.
MAYBE_J1 = -j1
# Note: multi-module tests are listed separately from single-module tests
# because we need to make dependencies, and make .int3 files for the
# other modules, only for multi-module tests.
#
# Multi-module tests should use *separate* modules, not *nested* modules.
SINGLE_MODULE_PROGS = \
bad_detism_category \
bad_end_module \
bad_existential_data_type \
bad_finalise_decl_int \
bad_foreign_type_int \
bad_in_interface \
bad_initialise_decl_int \
bad_instance \
bad_mutable_int \
bad_type_class_constraint_intermodule \
bug17 \
bug499 \
bug521 \
builtin_int \
instance_no_type \
missing_initial_section \
missing_interface_import \
pragma_export_int \
test_type_spec_int \
type_arity \
type_vars_int \
unbound_type_vars_int \
undef_inst \
undef_mode \
undef_type_int \
undef_type_mod_qual
MULTI_MODULE_PROGS = \
int_impl_imports \
missing_interface_import_test_2 \
missing_parent_import \
sub_c \
test_nested \
transitive_import
# While the following tests were in ../invalid, they were included among
# the modules listed in the definition of the REDIRECT_OPT_ERROR_MODULES
# make variable. However, they seem to be working just fine when moved
# to this direct, which has no such list.
#
# bad_type_class_constraint_intermodule
# bug521_sub
# int_impl_imports
#-----------------------------------------------------------------------------#
PROGS = $(SINGLE_MODULE_PROGS) $(MULTI_MODULE_PROGS)
TESTS = $(sort $(PROGS:%=%-nodepend))
include ../Mmake.common
# Module-specific options should go in Mercury.options so they can be found
# by `mmc --make'.
include Mercury.options
%.runtest: %.int_err_res ;
#-----------------------------------------------------------------------------#
$(SINGLE_MODULE_PROGS:%=%.int_err): %.int_err: %.m
if $(MC) --make-interface $(ALL_GRADEFLAGS) $(ALL_MCFLAGS) $* \
> $*.int_err 2>&1; \
then false; \
else true; \
fi
$(MULTI_MODULE_PROGS:%=%.int_err): %.int_err: %.m
+mmake $*.depend
+mmake $*.all_int3s
if $(MC) --make-interface $(ALL_GRADEFLAGS) $(ALL_MCFLAGS) $* \
> $*.int_err 2>&1; \
then false; \
else true; \
fi
clean_local: clean_invalid
clean_invalid:
rm -f *.dep_err *.err *.int_err *.int_err_res
#-----------------------------------------------------------------------------#