Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
| 3 | * test-all.c: Try to build all the main testcases at once. |
| 4 | * |
| 5 | * A well-configured system will have all the prereqs installed, so we can speed |
| 6 | * up auto-detection on such systems. |
| 7 | */ |
| 8 | |
| 9 | /* |
| 10 | * Quirk: Python and Perl headers cannot be in arbitrary places, so keep |
| 11 | * these 3 testcases at the top: |
| 12 | */ |
| 13 | #define main main_test_libpython |
| 14 | # include "test-libpython.c" |
| 15 | #undef main |
| 16 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 17 | #define main main_test_libperl |
| 18 | # include "test-libperl.c" |
| 19 | #undef main |
| 20 | |
| 21 | #define main main_test_hello |
| 22 | # include "test-hello.c" |
| 23 | #undef main |
| 24 | |
| 25 | #define main main_test_libelf |
| 26 | # include "test-libelf.c" |
| 27 | #undef main |
| 28 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 29 | #define main main_test_get_current_dir_name |
| 30 | # include "test-get_current_dir_name.c" |
| 31 | #undef main |
| 32 | |
| 33 | #define main main_test_gettid |
| 34 | # include "test-gettid.c" |
| 35 | #undef main |
| 36 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 37 | #define main main_test_glibc |
| 38 | # include "test-glibc.c" |
| 39 | #undef main |
| 40 | |
| 41 | #define main main_test_dwarf |
| 42 | # include "test-dwarf.c" |
| 43 | #undef main |
| 44 | |
| 45 | #define main main_test_dwarf_getlocations |
| 46 | # include "test-dwarf_getlocations.c" |
| 47 | #undef main |
| 48 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 49 | #define main main_test_eventfd |
| 50 | # include "test-eventfd.c" |
| 51 | #undef main |
| 52 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 53 | #define main main_test_libelf_getphdrnum |
| 54 | # include "test-libelf-getphdrnum.c" |
| 55 | #undef main |
| 56 | |
| 57 | #define main main_test_libelf_gelf_getnote |
| 58 | # include "test-libelf-gelf_getnote.c" |
| 59 | #undef main |
| 60 | |
| 61 | #define main main_test_libelf_getshdrstrndx |
| 62 | # include "test-libelf-getshdrstrndx.c" |
| 63 | #undef main |
| 64 | |
| 65 | #define main main_test_libunwind |
| 66 | # include "test-libunwind.c" |
| 67 | #undef main |
| 68 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 69 | #define main main_test_libslang |
| 70 | # include "test-libslang.c" |
| 71 | #undef main |
| 72 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 73 | #define main main_test_libbfd |
| 74 | # include "test-libbfd.c" |
| 75 | #undef main |
| 76 | |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 77 | #define main main_test_libbfd_buildid |
| 78 | # include "test-libbfd-buildid.c" |
| 79 | #undef main |
| 80 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 81 | #define main main_test_backtrace |
| 82 | # include "test-backtrace.c" |
| 83 | #undef main |
| 84 | |
| 85 | #define main main_test_libnuma |
| 86 | # include "test-libnuma.c" |
| 87 | #undef main |
| 88 | |
| 89 | #define main main_test_numa_num_possible_cpus |
| 90 | # include "test-numa_num_possible_cpus.c" |
| 91 | #undef main |
| 92 | |
| 93 | #define main main_test_timerfd |
| 94 | # include "test-timerfd.c" |
| 95 | #undef main |
| 96 | |
| 97 | #define main main_test_stackprotector_all |
| 98 | # include "test-stackprotector-all.c" |
| 99 | #undef main |
| 100 | |
| 101 | #define main main_test_libdw_dwarf_unwind |
| 102 | # include "test-libdw-dwarf-unwind.c" |
| 103 | #undef main |
| 104 | |
| 105 | #define main main_test_sync_compare_and_swap |
| 106 | # include "test-sync-compare-and-swap.c" |
| 107 | #undef main |
| 108 | |
| 109 | #define main main_test_zlib |
| 110 | # include "test-zlib.c" |
| 111 | #undef main |
| 112 | |
| 113 | #define main main_test_pthread_attr_setaffinity_np |
| 114 | # include "test-pthread-attr-setaffinity-np.c" |
| 115 | #undef main |
| 116 | |
| 117 | #define main main_test_pthread_barrier |
| 118 | # include "test-pthread-barrier.c" |
| 119 | #undef main |
| 120 | |
| 121 | #define main main_test_sched_getcpu |
| 122 | # include "test-sched_getcpu.c" |
| 123 | #undef main |
| 124 | |
| 125 | # if 0 |
| 126 | /* |
| 127 | * Disable libbabeltrace check for test-all, because the requested |
| 128 | * library version is not released yet in most distributions. Will |
| 129 | * reenable later. |
| 130 | */ |
| 131 | |
| 132 | #define main main_test_libbabeltrace |
| 133 | # include "test-libbabeltrace.c" |
| 134 | #undef main |
| 135 | #endif |
| 136 | |
| 137 | #define main main_test_lzma |
| 138 | # include "test-lzma.c" |
| 139 | #undef main |
| 140 | |
| 141 | #define main main_test_get_cpuid |
| 142 | # include "test-get_cpuid.c" |
| 143 | #undef main |
| 144 | |
| 145 | #define main main_test_bpf |
| 146 | # include "test-bpf.c" |
| 147 | #undef main |
| 148 | |
| 149 | #define main main_test_libcrypto |
| 150 | # include "test-libcrypto.c" |
| 151 | #undef main |
| 152 | |
| 153 | #define main main_test_sdt |
| 154 | # include "test-sdt.c" |
| 155 | #undef main |
| 156 | |
| 157 | #define main main_test_setns |
| 158 | # include "test-setns.c" |
| 159 | #undef main |
| 160 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 161 | #define main main_test_libaio |
| 162 | # include "test-libaio.c" |
| 163 | #undef main |
| 164 | |
| 165 | #define main main_test_reallocarray |
| 166 | # include "test-reallocarray.c" |
| 167 | #undef main |
| 168 | |
| 169 | #define main main_test_disassembler_four_args |
| 170 | # include "test-disassembler-four-args.c" |
| 171 | #undef main |
| 172 | |
| 173 | #define main main_test_libzstd |
| 174 | # include "test-libzstd.c" |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 175 | #undef main |
| 176 | |
| 177 | int main(int argc, char *argv[]) |
| 178 | { |
| 179 | main_test_libpython(); |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 180 | main_test_libperl(); |
| 181 | main_test_hello(); |
| 182 | main_test_libelf(); |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 183 | main_test_get_current_dir_name(); |
| 184 | main_test_gettid(); |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 185 | main_test_glibc(); |
| 186 | main_test_dwarf(); |
| 187 | main_test_dwarf_getlocations(); |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 188 | main_test_eventfd(); |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 189 | main_test_libelf_getphdrnum(); |
| 190 | main_test_libelf_gelf_getnote(); |
| 191 | main_test_libelf_getshdrstrndx(); |
| 192 | main_test_libunwind(); |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 193 | main_test_libslang(); |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 194 | main_test_libbfd(); |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 195 | main_test_libbfd_buildid(); |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 196 | main_test_backtrace(); |
| 197 | main_test_libnuma(); |
| 198 | main_test_numa_num_possible_cpus(); |
| 199 | main_test_timerfd(); |
| 200 | main_test_stackprotector_all(); |
| 201 | main_test_libdw_dwarf_unwind(); |
| 202 | main_test_sync_compare_and_swap(argc, argv); |
| 203 | main_test_zlib(); |
| 204 | main_test_pthread_attr_setaffinity_np(); |
| 205 | main_test_pthread_barrier(); |
| 206 | main_test_lzma(); |
| 207 | main_test_get_cpuid(); |
| 208 | main_test_bpf(); |
| 209 | main_test_libcrypto(); |
| 210 | main_test_sched_getcpu(); |
| 211 | main_test_sdt(); |
| 212 | main_test_setns(); |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 213 | main_test_libaio(); |
| 214 | main_test_reallocarray(); |
| 215 | main_test_disassembler_four_args(); |
| 216 | main_test_libzstd(); |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 217 | |
| 218 | return 0; |
| 219 | } |