1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.newsclub.net.unix.selftest;
19
20 import java.io.PrintWriter;
21 import java.util.LinkedHashMap;
22 import java.util.Map;
23 import java.util.Set;
24 import java.util.HashSet;
25
26
27
28
29
30
31 public class SelftestProvider {
32 private final org.newsclub.net.unix.SelftestProvider commonSelftests =
33 new org.newsclub.net.unix.SelftestProvider();
34 private final org.newsclub.net.unix.tipc.SelftestProvider tipcSelftests =
35 new org.newsclub.net.unix.tipc.SelftestProvider();
36 private final org.newsclub.net.unix.vsock.SelftestProvider vsockSelftests =
37 new org.newsclub.net.unix.vsock.SelftestProvider();
38 private final org.newsclub.net.unix.rmi.SelftestProvider rmiSelftests =
39 new org.newsclub.net.unix.rmi.SelftestProvider();
40 private final org.newsclub.net.unix.ssl.SelftestProvider sslSelftests =
41 new org.newsclub.net.unix.ssl.SelftestProvider();
42 private final org.newsclub.net.unix.darwin.SelftestProvider darwinSelftests =
43 new org.newsclub.net.unix.darwin.SelftestProvider();
44 private final org.newsclub.net.mysql.SelftestProvider mysqlSelftests =
45 new org.newsclub.net.mysql.SelftestProvider();
46 private final org.newsclub.net.unix.memory.SelftestProvider memorySelftests =
47 new org.newsclub.net.unix.memory.SelftestProvider();
48
49 public Map<String, Class<?>[]> tests() throws Exception {
50 Map<String, Class<?>[]> tests = new LinkedHashMap<>();
51 tests.putAll(commonSelftests.tests());
52 tests.putAll(tipcSelftests.tests());
53 tests.putAll(vsockSelftests.tests());
54 tests.putAll(rmiSelftests.tests());
55 tests.putAll(sslSelftests.tests());
56 tests.putAll(darwinSelftests.tests());
57 tests.putAll(mysqlSelftests.tests());
58 tests.putAll(memorySelftests.tests());
59
60 return tests;
61 }
62
63 public Set<String> modulesDisabledByDefault() {
64 Set<String> set = new HashSet<>();
65 set.addAll(commonSelftests.modulesDisabledByDefault());
66 set.addAll(tipcSelftests.modulesDisabledByDefault());
67 set.addAll(vsockSelftests.modulesDisabledByDefault());
68 set.addAll(rmiSelftests.modulesDisabledByDefault());
69 set.addAll(sslSelftests.modulesDisabledByDefault());
70 set.addAll(darwinSelftests.modulesDisabledByDefault());
71 set.addAll(mysqlSelftests.modulesDisabledByDefault());
72 set.addAll(memorySelftests.modulesDisabledByDefault());
73 return set;
74 }
75
76 public void printAdditionalProperties(PrintWriter out) {
77 commonSelftests.printAdditionalProperties(out);
78 tipcSelftests.printAdditionalProperties(out);
79 vsockSelftests.printAdditionalProperties(out);
80 rmiSelftests.printAdditionalProperties(out);
81 sslSelftests.printAdditionalProperties(out);
82 darwinSelftests.printAdditionalProperties(out);
83 mysqlSelftests.printAdditionalProperties(out);
84 memorySelftests.printAdditionalProperties(out);
85 }
86 }