1088d02b53703ad7af46fb5283914a5b16a01177
[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      [when(ghc_dynamic(), skip)],
17      run_command,
18      ['$MAKE -s --no-print-directory t_11223_simple_link'])
19
20 test('T11223_simple_link_lib',
21      [when(ghc_dynamic(), skip)],
22      run_command,
23      ['$MAKE -s --no-print-directory t_11223_simple_link_lib'])
24
25 # I'm ignoring the output since for this particular invocation normalise_errmsg
26 # isn't being called and I can't figure out why not.
27 test('T11223_simple_duplicate',
28      [when(ghc_dynamic(), skip), ignore_stderr, ignore_stdout, exit_code(2), normalise_errmsg_fun(normalise_duplicate_errmsg)],
29      run_command,
30      ['$MAKE -s --no-print-directory t_11223_simple_duplicate'])
31
32 test('T11223_simple_duplicate_lib',
33      [when(ghc_dynamic(), skip), normalise_errmsg_fun(normalise_duplicate_errmsg)],
34      run_command,
35      ['$MAKE -s --no-print-directory t_11223_simple_duplicate_lib'])
36
37 test('T11223_simple_unused_duplicate_lib',
38      [when(ghc_dynamic(), skip)],
39      run_command,
40      ['$MAKE -s --no-print-directory t_11223_simple_unused_duplicate_lib'])
41
42 test('T11223_link_order_a_b_succeed',
43      [when(ghc_dynamic(), skip)],
44      run_command,
45      ['$MAKE -s --no-print-directory t_11223_link_order_a_b_succeed'])
46
47 test('T11223_link_order_b_a_succeed',
48      [when(ghc_dynamic(), skip)],
49      run_command,
50      ['$MAKE -s --no-print-directory t_11223_link_order_b_a_succeed'])
51
52 test('T11223_link_order_a_b_2_fail',
53      [when(ghc_dynamic(), skip), normalise_errmsg_fun(normalise_duplicate_errmsg)],
54      run_command,
55      ['$MAKE -s --no-print-directory t_11223_link_order_a_b_2_fail'])
56
57 test('T11223_link_order_b_a_2_succeed',
58      [when(ghc_dynamic(), skip)],
59      run_command,
60      ['$MAKE -s --no-print-directory t_11223_link_order_b_a_2_succeed'])
61
62 # Weak Symbols are not currently implemented. So Disable all the tests
63 # See Note [weak-symbols-support] in Linker.c
64
65 test('T11223_weak_only_link_fail',
66      [when(ghc_dynamic(), skip), expect_broken(11817)],
67      run_command,
68      ['$MAKE -s --no-print-directory t_11223_weak_only_link_fail'])
69
70 test('T11223_weak_only_link_succeed',
71      [when(ghc_dynamic(), skip), expect_broken(11817)],
72      run_command,
73      ['$MAKE -s --no-print-directory t_11223_weak_only_link_succeed'])
74
75 test('T11223_weak_both_link_order_a_b_succeed',
76      [when(ghc_dynamic(), skip), expect_broken(11817)],
77      run_command,
78      ['$MAKE -s --no-print-directory t_11223_weak_both_link_order_a_b_succeed'])
79
80 test('T11223_weak_both_link_order_b_a_succeed',
81      [when(ghc_dynamic(), skip), expect_broken(11817)],
82      run_command,
83      ['$MAKE -s --no-print-directory t_11223_weak_both_link_order_b_a_succeed'])
84
85 test('T11223_weak_single_link_order_a_b_succeed',
86      [when(ghc_dynamic(), skip), expect_broken(11817)],
87      run_command,
88      ['$MAKE -s --no-print-directory t_11223_weak_single_link_order_a_b_succeed'])
89
90 test('T11223_weak_single_link_order_b_a_succeed',
91      [when(ghc_dynamic(), skip), expect_broken(11817)],
92      run_command,
93      ['$MAKE -s --no-print-directory t_11223_weak_single_link_order_b_a_succeed'])