summaryrefslogtreecommitdiff
blob: b20e58449f4201b3432842087761222902205346 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
diff -urN mercury-tests-0.13.1.orig/hard_coded/dir_test.exp mercury-tests-0.13.1/hard_coded/dir_test.exp
--- mercury-tests-0.13.1.orig/hard_coded/dir_test.exp	2003-07-29 03:50:45.000000000 +1200
+++ mercury-tests-0.13.1/hard_coded/dir_test.exp	2006-12-04 21:44:54.000000000 +1300
@@ -130,7 +130,6 @@
 "foo"/"bar/baz" = "foo\bar\baz".
 "foo/"/"bar/baz" = "foo\bar\baz".
 checking whether `unwritable' is readable...ok
-unwritable file found to be unwritable
 make_directory succeeded
 make_directory succeeded
 dir.make_single_directory with non-existent parent failed as expected.
diff -urN mercury-tests-0.13.1.orig/hard_coded/dir_test.exp2 mercury-tests-0.13.1/hard_coded/dir_test.exp2
--- mercury-tests-0.13.1.orig/hard_coded/dir_test.exp2	2003-07-29 03:50:45.000000000 +1200
+++ mercury-tests-0.13.1/hard_coded/dir_test.exp2	2006-12-04 21:44:54.000000000 +1300
@@ -127,7 +127,6 @@
 "foo"/"bar/baz" = "foo/bar/baz".
 "foo/"/"bar/baz" = "foo/bar/baz".
 checking whether `unwritable' is readable...ok
-unwritable file found to be unwritable
 make_directory succeeded
 make_directory succeeded
 dir.make_single_directory with non-existent parent failed as expected.
diff -urN mercury-tests-0.13.1.orig/hard_coded/dir_test.exp3 mercury-tests-0.13.1/hard_coded/dir_test.exp3
--- mercury-tests-0.13.1.orig/hard_coded/dir_test.exp3	2003-07-29 03:50:45.000000000 +1200
+++ mercury-tests-0.13.1/hard_coded/dir_test.exp3	2006-12-04 21:44:54.000000000 +1300
@@ -130,7 +130,6 @@
 "foo"/"bar/baz" = "foo/bar/baz".
 "foo/"/"bar/baz" = "foo/bar/baz".
 checking whether `unwritable' is readable...ok
-unwritable file found to be unwritable
 make_directory succeeded
 make_directory succeeded
 dir.make_single_directory with non-existent parent failed as expected.
diff -urN mercury-tests-0.13.1.orig/hard_coded/dir_test.m mercury-tests-0.13.1/hard_coded/dir_test.m
--- mercury-tests-0.13.1.orig/hard_coded/dir_test.m	2006-03-29 20:08:00.000000000 +1200
+++ mercury-tests-0.13.1/hard_coded/dir_test.m	2006-12-04 21:44:54.000000000 +1300
@@ -50,16 +50,6 @@
 	io__write(ReadResult),
 	io__nl,
 
-	io__check_file_accessibility("unwritable",
-		[read, write], WriteResult),
-	( { WriteResult = ok } ->
-		io__write_string(
-		"Error: unwritable file found to be writable\n")
-	;
-		io__write_string(
-		"unwritable file found to be unwritable\n")
-	),
-
 	{ Dir1 = "test_dir"/"d1" },
 	test0("make_directory", dir__make_directory(Dir1)),
 	% Test making a directory that already exists.
diff -urN mercury-tests-0.13.1.orig/mdbrc mercury-tests-0.13.1/mdbrc
--- mercury-tests-0.13.1.orig/mdbrc	1970-01-01 12:00:00.000000000 +1200
+++ mercury-tests-0.13.1/mdbrc	2006-12-04 21:44:54.000000000 +1300
@@ -0,0 +1,19 @@
+source MDB_DOC
+alias	s	step
+alias	g	goto
+alias	f	finish
+alias	r	retry
+alias	v	vars
+alias	p	print
+alias	P	print *
+alias	d	stack
+alias	c	continue
+alias	b	break
+alias	h	help
+alias	?	help
+alias	excp	exception
+alias	e	exception
+alias	EMPTY	step
+alias	NUMBER	step
+xml_browser_cmd ''
+xml_tmp_filename ''
diff -urN mercury-tests-0.13.1.orig/tabling/loopcheck.exp5 mercury-tests-0.13.1/tabling/loopcheck.exp5
--- mercury-tests-0.13.1.orig/tabling/loopcheck.exp5	1970-01-01 12:00:00.000000000 +1200
+++ mercury-tests-0.13.1/tabling/loopcheck.exp5	2006-12-04 21:44:54.000000000 +1300
@@ -0,0 +1,3 @@
+Uncaught Mercury exception:
+Software Error: detected infinite recursion in pred loopcheck.loop/1
+Stack dump not available in this grade.
diff -urN mercury-tests-0.13.1.orig/tabling/loopcheck_nondet.exp2 mercury-tests-0.13.1/tabling/loopcheck_nondet.exp2
--- mercury-tests-0.13.1.orig/tabling/loopcheck_nondet.exp2	1970-01-01 12:00:00.000000000 +1200
+++ mercury-tests-0.13.1/tabling/loopcheck_nondet.exp2	2006-12-04 21:44:54.000000000 +1300
@@ -0,0 +1,3 @@
+Uncaught Mercury exception:
+Software Error: detected infinite recursion in pred loopcheck_nondet.loop/2
+Stack dump not available in this grade.
diff -urN mercury-tests-0.13.1.orig/tabling/tc_loop.exp3 mercury-tests-0.13.1/tabling/tc_loop.exp3
--- mercury-tests-0.13.1.orig/tabling/tc_loop.exp3	1970-01-01 12:00:00.000000000 +1200
+++ mercury-tests-0.13.1/tabling/tc_loop.exp3	2006-12-04 21:44:54.000000000 +1300
@@ -0,0 +1,3 @@
+Uncaught Mercury exception:
+Software Error: detected infinite recursion in pred tc_loop.tc/2
+Stack dump not available in this grade.
diff -urN mercury-tests-0.13.1.orig/tabling/tc_memo.exp2 mercury-tests-0.13.1/tabling/tc_memo.exp2
--- mercury-tests-0.13.1.orig/tabling/tc_memo.exp2	1970-01-01 12:00:00.000000000 +1200
+++ mercury-tests-0.13.1/tabling/tc_memo.exp2	2006-12-04 21:44:54.000000000 +1300
@@ -0,0 +1,3 @@
+Uncaught Mercury exception:
+Software Error: detected infinite recursion in pred tc_memo.tc/2
+Stack dump not available in this grade.
diff -urN mercury-tests-0.13.1.orig/tabling/tc_memo2.exp2 mercury-tests-0.13.1/tabling/tc_memo2.exp2
--- mercury-tests-0.13.1.orig/tabling/tc_memo2.exp2	1970-01-01 12:00:00.000000000 +1200
+++ mercury-tests-0.13.1/tabling/tc_memo2.exp2	2006-12-04 21:44:54.000000000 +1300
@@ -0,0 +1,3 @@
+Uncaught Mercury exception:
+Software Error: detected need for minimal model in pred tc_memo2.tc/2
+Stack dump not available in this grade.
diff -urN mercury-tests-0.13.1.orig/valid/Mmakefile mercury-tests-0.13.1/valid/Mmakefile
--- mercury-tests-0.13.1.orig/valid/Mmakefile	2006-11-08 14:36:30.000000000 +1300
+++ mercury-tests-0.13.1/valid/Mmakefile	2006-12-04 21:44:54.000000000 +1300
@@ -400,3 +400,5 @@
 	rm -f *.err *.h
 
 #-----------------------------------------------------------------------------#
+
+MCFLAGS-ho_and_type_spec_bug+=--no-optimize-higher-order
diff -urN mercury-tests-0.13.1.orig/valid/Mmakefile.orig mercury-tests-0.13.1/valid/Mmakefile.orig
--- mercury-tests-0.13.1.orig/valid/Mmakefile.orig	1970-01-01 12:00:00.000000000 +1200
+++ mercury-tests-0.13.1/valid/Mmakefile.orig	2006-11-08 14:36:30.000000000 +1300
@@ -0,0 +1,402 @@
+#-----------------------------------------------------------------------------#
+
+THIS_DIR = valid
+
+#-----------------------------------------------------------------------------#
+
+# please keep these lists sorted
+AGC_PROGS= \
+	agc_graph \
+	agc_ho_pred \
+	agc_ite \
+	agc_unbound_typevars \
+	agc_unbound_typevars2 \
+	agc_unused_in
+
+TRAIL_PROGS= \
+	complex_failure \
+	semi_fail_in_non_ite
+
+TYPECLASS_PROGS= \
+	abstract_typeclass \
+	complex_constraint \
+	constraint_proof_bug \
+	exists_bug \
+	exists_fundeps \
+	exists_fundeps_2 \
+	exists_fundeps_3 \
+	flatten_conj_bug \
+	func_class \
+	func_method \
+	fundeps \
+	instance_superclass \
+	instance_unconstrained_tvar \
+	mpj2 \
+	mpj5 \
+	mpj6 \
+	mpj7 \
+	repeated_class_constraint \
+	superclass_bug \
+	superclass_improvement \
+	tc_map_lookup \
+	typeclass_constraint_no_var \
+	typeclass_constraint_nonvar_bug \
+	typeclass_det_warning
+
+	# This test is compiled with --no-special-preds,
+	# which doesn't work in jump.* and fast.* grades.
+NO_SPECIAL_PREDS_PROGS= \
+	unify_typeinfo_bug
+
+	# Tests for which we should only produce a `.il' file.
+IL_PROGS = \
+	csharp_hello \
+	foreign_type_spec
+
+OTHER_PROGS= \
+	any_inst_merge \
+	any_matches_bound \
+	big_foreign_type \
+	builtin_false \
+	common_struct_bug \
+	complicated_unify \
+	compl_unify_bug \
+	constrained_poly_bound_arg \
+	constrained_poly_insts \
+	constraint_prop_bug \
+	constructor_arg_names \
+	dcg_test \
+	deforest_bug \
+	deforest_loop \
+	deforest_rerun_det \
+	det_condition \
+	det_inference \
+	det_switch \
+	double_vn \
+	easy_nondet_test \
+	easy_nondet_test_2 \
+	empty_bound_inst_list \
+	empty_switch \
+	error \
+	eval \
+	existential_cons \
+	explicit_quant \
+	export_before_func \
+	exported_foreign_type \
+	fail_ite \
+	followcode_det_problem \
+	foreign_underscore_var \
+	func_default_modes \
+	func_in_head \
+	func_int_bug_main \
+	hawkins_switch_bug \
+	headvar_not_found \
+	higher_order \
+	higher_order2 \
+	higher_order3 \
+	higher_order4 \
+	higher_order5 \
+	higher_order_implied_mode \
+	ho_and_type_spec_bug \
+	ho_func_call \
+	ho_inst \
+	ho_unify \
+	id_type_bug \
+	implied_mode \
+	impure_lambda_bug \
+	indexing \
+	inhibit_warn_test \
+	inlining_bug \
+	inst_perf_bug_1 \
+	int64 \
+	intermod_bug_nested \
+	intermod_dcg_bug \
+	intermod_impure \
+	intermod_lambda \
+	intermod_nested \
+	intermod_nested_module \
+	intermod_nested_module_bug \
+	intermod_nested_uniq \
+	intermod_pragma_import \
+	intermod_quote \
+	intermod_record \
+	intermod_test \
+	intermod_typeclass \
+	intermod_type_spec \
+	intermod_user_equality \
+	intermod_user_equality_nested \
+	lambda_inference\
+	lambda_instmap_bug \
+	lambda_output \
+	lambda_quant \
+	lambda_quant_bug \
+	lambda_recompute \
+	lambda_struct_bug \
+	lambda_switch \
+	lambda_type \
+	lazy_list \
+	liveness_nonlocals \
+	livevals_seq \
+	loop \
+	loop_in_disj \
+	loop_inv_bug \
+	mc_bag \
+	mc_extra_nonlocals \
+	mc_graph \
+	mc_hhf_nonlocals_bug \
+	mc_implied_modes \
+	merge_ground_any \
+	middle_rec_labels \
+	modes_bug \
+	mode_syntax \
+	module_a \
+	module_b \
+	module_c \
+	module_d \
+	module_e \
+	mostly_uniq_bug \
+	mostly_uniq_mode_inf \
+	mostly_uniq_neg \
+	multidet_prune1 \
+	multidet_test \
+	nasty_func_test \
+	nested_mod_type_bug \
+	nested_module_bug \
+	no_warn_obsolete \
+	nondet_live \
+	overloading \
+	param_mode_bug \
+	parsing_bug_main \
+	pred_with_no_modes \
+	qualified_cons_id \
+	quantifier_warning \
+	record_syntax_bug \
+	record_syntax_bug_2 \
+	record_syntax_bug_3 \
+	record_syntax_bug_4 \
+	record_syntax_bug_5 \
+	recursive_no_tag_type \
+	reg_bug \
+	same_length_2 \
+	semidet_disj \
+	shape_type \
+	simplify_bug \
+	simplify_bug2 \
+	size_prof_ho_bug \
+	soln_context \
+	solv \
+	solver_type_bug \
+	solver_type_bug_2 \
+	solver_type_mutable_bug \
+	some_switch \
+	spurious_purity_warning \
+	stack_alloc \
+	stack_opt_simplify \
+	state_var_bug \
+	state_var_mode_bug \
+	state_var_mode_bug2 \
+	static \
+	subtype_switch \
+	switch_detection_bug \
+	switch_detection_bug2 \
+	switches \
+	tabled_for_io \
+	tabled_io \
+	transitive_instance \
+	tricky_assert2 \
+	tricky_ite \
+	tuple_eqv \
+	two_pragma_c_codes \
+	two_way_unif \
+	typeclass_inlining_bug \
+	type_inf_ambig_test \
+	unbound_inst_var \
+	unbound_tvar_in_lambda \
+	undead_proc \
+	uniq_mode_inf_bug \
+	uniq_unify \
+	unreachable_code \
+	unused_args_test2 \
+	vn_float \
+	zero_arity
+
+DEEP_PROF_CAPABLE_PROGS = \
+	impure_detism
+
+# These tests require debugging, which hasn't been implemented for
+# the MLDS backend.
+#
+LLDS_PROGS= \
+	exists_cast_bug \
+	untuple_bug
+
+# These tests only work in grades that support parallel conjunction.
+#
+PAR_CONJ_PROGS = \
+	par_dummy \
+	par_dupelim \
+	par_saved_const
+
+# The following programs require that num_tag_bits >= 1
+RESERVE_TAG_PROGS = \
+	reserve_tag
+
+# XXX The mode system can't handle the following test cases yet:
+#	assoc_list_bug
+#	determinism
+#	inst_perf_bug_2
+#	mode_merge_insts
+#	unify_inst_bug
+#
+# XXX We also don't pass this one (see the comments in it for details):
+#	mode_selection
+#
+# XXX The following test is not valid under the current Mercury
+# language rules:
+#	field_detism
+
+# The agc.* tests don't work in --high-level-code grades,
+# except hl*.agc*, because they require grade-specific header
+# files to be installed.
+ifeq "$(findstring hl,$(GRADE))$(findstring .agc,$(GRADE))" "hl"
+	PROGS0 = $(TYPECLASS_PROGS) $(OTHER_PROGS)
+else
+	# The agc.* tests don't work in the il grades, as the CLR has
+	# its own builtin GC.
+	# The agc.* tests also don't work in minimal model grades,
+	# because the collector doesn't scan the copied areas of the stacks.
+	ifneq "$(findstring il,$(GRADE))$(findstring mm,$(GRADE))" ""
+		PROGS0 = $(TYPECLASS_PROGS) $(OTHER_PROGS)
+	else
+		PROGS0 = $(AGC_PROGS) $(TYPECLASS_PROGS) $(OTHER_PROGS)
+	endif
+endif
+
+# Base grades `jump' and `fast'
+# cannot be used with `--no-special-preds'
+
+ifneq "$(findstring asm_,$(GRADE))" ""
+	PROGS1=$(NO_SPECIAL_PREDS_PROGS) $(PROGS0)
+else
+	ifneq "$(findstring jump,$(GRADE))" ""
+		PROGS1=$(PROGS0)
+	else
+		ifneq "$(findstring fast,$(GRADE))" ""
+			PROGS1=$(PROGS0)
+		else
+			PROGS1=$(NO_SPECIAL_PREDS_PROGS) $(PROGS0)
+		endif
+	endif
+endif
+
+ifneq "$(findstring mm,$(GRADE))" ""
+	PROGS2=$(PROGS1)
+else
+	PROGS2=$(PROGS1) $(TRAIL_PROGS)
+endif
+
+ifneq "$(filter java% il%,$(GRADE))$(findstring profdeep,$(GRADE))" ""
+	# We currently don't do any testing in grade java on this directory.
+	ifneq "$(findstring java,$(GRADE))$" ""
+		PROGS3 =
+	else
+		PROGS3 = $(PROGS2)
+	endif
+else
+	PROGS3 = $(PROGS2)
+endif
+
+ifeq "$(filter hl% java% il%,$(GRADE))" ""
+	PROGS4 = $(PROGS3) $(DEEP_PROF_CAPABLE_PROGS) $(LLDS_PROGS)
+else
+	PROGS4 = $(PROGS3)
+endif
+
+ifneq "$(findstring decldebug,$(GRADE))" ""
+	PROGS5 = $(PROGS4)
+else
+	PROGS5 = $(PROGS4) $(PAR_CONJ_PROGS)
+endif
+
+ifeq "$(filter java% il%,$(GRADE))" ""
+	OBJ_PROGS = $(PROGS5) $(RESERVE_TAG_PROGS)
+else
+	OBJ_PROGS = $(PROGS5)
+endif
+
+ifneq "$(findstring tsw,$(GRADE))$(findstring tsc,$(GRADE))" ""
+	PROGS = $(OBJ_PROGS)
+else
+	PROGS = $(OBJ_PROGS) $(IL_PROGS)
+endif
+
+# `mmc --make' doesn't expect subdirectories to appear in targets.
+ifeq ($(MMAKE_USE_MMC_MAKE),yes)
+OS_SUBDIR=
+ILS_SUBDIR=
+DLLS_SUBDIR=
+else
+OS_SUBDIR=$(os_subdir)
+ILS_SUBDIR=$(ils_subdir)
+DLLS_SUBDIR=$(dlls_subdir)
+endif
+
+
+ifeq ($(findstring il,$(GRADE)),il)
+	TARGET_OBJ_EXT=dll
+	TARGET_OBJ_SUBDIR=$(DLLS_SUBDIR)
+else
+	TARGET_OBJ_EXT=$(O)
+	TARGET_OBJ_SUBDIR=$(OS_SUBDIR)
+endif
+OBJS =	$(OBJ_PROGS:%=$(TARGET_OBJ_SUBDIR)%.$(TARGET_OBJ_EXT)) \
+		$(IL_PROGS:%=$(ILS_SUBDIR)%.il)
+
+#-----------------------------------------------------------------------------#
+
+TESTS = $(PROGS)
+SUBDIRS=
+TESTS_DIR=..
+include $(TESTS_DIR)/Mmake.common
+
+# When compiling using the installed libraries, setting GRADEFLAGS may
+# may cause mgnuc to look for the `.mih' files for a non-installed grade.
+# test_mercury runs the tests using the installed libraries, so GRADEFLAGS
+# won't be set, but test_mercury runs the tests in at least one `.tr' grade
+# on all machines, so it isn't a problem.
+ifneq ($(origin WORKSPACE),undefined)
+GRADEFLAGS_TRAIL = --use-trail
+else
+GRADEFLAGS_TRAIL =
+endif
+# Make sure GRADEFLAGS_TRAIL is passed to `mmc --make'.
+export GRADEFLAGS_TRAIL
+
+# Module-specific options should go in Mercury.options so they
+# can be found by `mmc --make'.
+include Mercury.options
+
+$(OBJ_PROGS:%=%.runtest): %.runtest: %.$(TARGET_OBJ_EXT) ;
+
+$(IL_PROGS:%=%.runtest): %.runtest: %.il ;
+
+#-----------------------------------------------------------------------------#
+
+# XXX mmake should automatically handle these two dependencies.
+$(dates_subdir)intermod_nested_module2.date: \
+	$(date0s_subdir)intermod_nested_module2.date0
+$(dates_subdir)intermod_user_equality_nested2.date: \
+	$(date0s_subdir)intermod_user_equality_nested2.date0
+
+objs:	$(OBJS)
+
+printtests:
+	@echo $(PROGS)
+
+printobjs:
+	@echo $(OBJS)
+
+clean_local:
+	rm -f *.err *.h
+
+#-----------------------------------------------------------------------------#