Files
mercury/tests/typeclasses/Mmakefile
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

107 lines
2.4 KiB
Makefile

#-----------------------------------------------------------------------------#
# vim: ts=8 sw=8 noexpandtab ft=make
#-----------------------------------------------------------------------------#
TESTS_DIR = ..
THIS_DIR = typeclasses
MAYBE_J1 =
#-----------------------------------------------------------------------------#
ORDINARY_PROGS = \
arbitrary_constraint_class \
arbitrary_constraint_pred_2 \
arbitrary_constraint_pred_1 \
complicated_constraint \
complicated_fundeps \
constrained_lambda \
extract_typeinfo \
extract_typeinfo2 \
exist_disjunction \
existential_type_classes \
existential_data_types \
existential_data_types_regr_test \
existential_type_switch \
extra_typeinfo \
func_default_mode_bug \
fundeps_1 \
fundeps_2 \
fundeps_3 \
fundeps_4 \
fundeps_5 \
fundeps_6 \
fundeps_7 \
ground_constraint \
ground_constraint_2 \
ho_map \
implied_instance \
implied_instance_multi_constraint \
implied_instance_missing_constraint \
implied_instance_poly \
impure_methods \
instance_clauses \
instance_unconstrained_tvar \
instance_unconstrained_tvar_dup \
instance_unconstrained_tvar_type_spec \
inference_test \
inference_test_2 \
intermod_typeclass_bug \
lambda_multi_constraint_same_tvar \
mode_decl_order_bug \
module_test \
multi_constraint_diff_tvar \
multi_constraint_same_tvar \
multi_moded \
multi_parameter \
multi_parameter_bug \
no_fundep_infer \
nondet_class_method \
operator_classname \
record_syntax \
reordered_existential_constraint \
submodule_consistency_test \
superclass_bug \
superclass_bug2 \
superclass_bug3 \
superclass_call \
test_default_func_mode \
tuple_instance \
typeclass_exist_method \
typeclass_exist_method_2 \
typeclass_order_bug \
typeclass_order_bug2 \
typeclass_order_bug3 \
typeclass_test_5 \
typeclass_test_6 \
type_spec \
unbound_tvar \
unqualified_method \
use_abstract_instance \
use_abstract_typeclass
# The following tests do not (yet) work with the C# and Java back-ends.
#
ifeq "$(filter csharp% java%,$(GRADE))" ""
C_ONLY_PROGS = \
existential_rtti \
recursive_instance_1
else
C_ONLY_PROGS =
endif
PROGS = \
$(ORDINARY_PROGS) \
$(C_ONLY_PROGS)
TESTS = $(PROGS)
include ../Mmake.common
# Module-specific options should go in Mercury.options so they
# can be found by `mmc --make'.
include Mercury.options
%.runtest: %.res ;
#-----------------------------------------------------------------------------#