tests: remove extra_files.py (#12223)
[ghc.git] / testsuite / tests / rts / T11223 / all.T
1 import string
2 import re
3
4 #--------------------------------------
5 # Python normalization functions
6 #--------------------------------------
7 def normalise_duplicate_errmsg( msg ):
8      return re.sub(r"((?:[a-z, A-Z]+):|)[\/\\\\]+(?:.+[\/\\\\]+?)?(.+?)[\/\\\\]+", "    ", 
9                re.sub(r"version\s(\d+\.\d+\.\d+)\sfor\s[a-z,A-Z,0-9,_,-]+(?=\))", r"", msg))
10
11 #--------------------------------------
12 # Test functions
13 #--------------------------------------
14
15 test('T11223_simple_link',
16      [extra_files(['foo.c', 'foo.hs']),
17       when(ghc_dynamic(), skip)],
18      run_command,
19      ['$MAKE -s --no-print-directory t_11223_simple_link'])
20
21 test('T11223_simple_link_lib',
22      [extra_files(['foo.c', 'foo.hs']),
23       when(ghc_dynamic(), skip)],
24      run_command,
25      ['$MAKE -s --no-print-directory t_11223_simple_link_lib'])
26
27 # I'm ignoring the output since for this particular invocation normalise_errmsg
28 # isn't being called and I can't figure out why not.
29 test('T11223_simple_duplicate',
30      [extra_files(['bar.c', 'foo.c', 'foo.hs']),
31       when(ghc_dynamic(), skip), ignore_stderr, ignore_stdout, exit_code(2), normalise_errmsg_fun(normalise_duplicate_errmsg)],
32      run_command,
33      ['$MAKE -s --no-print-directory t_11223_simple_duplicate'])
34
35 test('T11223_simple_duplicate_lib',
36      [extra_files(['bar.c', 'foo.c', 'foo.hs']),
37       when(ghc_dynamic(), skip), normalise_errmsg_fun(normalise_duplicate_errmsg)],
38      run_command,
39      ['$MAKE -s --no-print-directory t_11223_simple_duplicate_lib'])
40
41 test('T11223_simple_unused_duplicate_lib',
42      [extra_files(['bar.c', 'foo.c', 'foo.hs']),
43       when(ghc_dynamic(), skip)],
44      run_command,
45      ['$MAKE -s --no-print-directory t_11223_simple_unused_duplicate_lib'])
46
47 test('T11223_link_order_a_b_succeed',
48      [extra_files(['bar.c', 'foo.c', 'foo2.hs']),
49       when(ghc_dynamic(), skip)],
50      run_command,
51      ['$MAKE -s --no-print-directory t_11223_link_order_a_b_succeed'])
52
53 test('T11223_link_order_b_a_succeed',
54      [extra_files(['bar.c', 'foo.c', 'foo2.hs']),
55       when(ghc_dynamic(), skip)],
56      run_command,
57      ['$MAKE -s --no-print-directory t_11223_link_order_b_a_succeed'])
58
59 test('T11223_link_order_a_b_2_fail',
60      [extra_files(['bar.c', 'foo.c', 'foo3.hs']),
61       when(ghc_dynamic(), skip), normalise_errmsg_fun(normalise_duplicate_errmsg)],
62      run_command,
63      ['$MAKE -s --no-print-directory t_11223_link_order_a_b_2_fail'])
64
65 test('T11223_link_order_b_a_2_succeed',
66      [extra_files(['bar.c', 'foo.c', 'foo3.hs']),
67       when(ghc_dynamic(), skip)],
68      run_command,
69      ['$MAKE -s --no-print-directory t_11223_link_order_b_a_2_succeed'])
70
71 # Weak Symbols are not currently implemented. So Disable all the tests
72 # See Note [weak-symbols-support] in Linker.c
73
74 test('T11223_weak_only_link_fail',
75      [extra_files(['power.c', 'power.hs']),
76       when(ghc_dynamic(), skip), expect_broken(11817)],
77      run_command,
78      ['$MAKE -s --no-print-directory t_11223_weak_only_link_fail'])
79
80 test('T11223_weak_only_link_succeed',
81      [extra_files(['power3.hs', 'power_slow.c']),
82       when(ghc_dynamic(), skip), expect_broken(11817)],
83      run_command,
84      ['$MAKE -s --no-print-directory t_11223_weak_only_link_succeed'])
85
86 test('T11223_weak_both_link_order_a_b_succeed',
87      [extra_files(['power.c', 'power3.hs', 'power_slow.c']),
88       when(ghc_dynamic(), skip), expect_broken(11817)],
89      run_command,
90      ['$MAKE -s --no-print-directory t_11223_weak_both_link_order_a_b_succeed'])
91
92 test('T11223_weak_both_link_order_b_a_succeed',
93      [extra_files(['power.c', 'power3.hs', 'power_slow.c']),
94       when(ghc_dynamic(), skip), expect_broken(11817)],
95      run_command,
96      ['$MAKE -s --no-print-directory t_11223_weak_both_link_order_b_a_succeed'])
97
98 test('T11223_weak_single_link_order_a_b_succeed',
99      [extra_files(['power.c', 'power3.hs', 'power_slow.c']),
100       when(ghc_dynamic(), skip), expect_broken(11817)],
101      run_command,
102      ['$MAKE -s --no-print-directory t_11223_weak_single_link_order_a_b_succeed'])
103
104 test('T11223_weak_single_link_order_b_a_succeed',
105      [extra_files(['power.c', 'power3.hs', 'power_slow.c']),
106       when(ghc_dynamic(), skip), expect_broken(11817)],
107      run_command,
108      ['$MAKE -s --no-print-directory t_11223_weak_single_link_order_b_a_succeed'])