1use crate::models::{
7 TestCaseFixture, TestCaseFixtureProperties, TestCaseFixtureStatus, TestSuiteFixture,
8 TestSuiteFixtureProperties,
9};
10use iddqd::{IdOrdMap, id_ord_map};
11use nextest_metadata::BuildPlatform;
12use std::sync::LazyLock;
13
14pub static EXPECTED_TEST_SUITES: LazyLock<IdOrdMap<TestSuiteFixture>> = LazyLock::new(|| {
15 id_ord_map! {
16 TestSuiteFixture::new(
18 "fixture-project::basic",
19 "basic",
20 BuildPlatform::Target,
21 id_ord_map! {
22 TestCaseFixture::new("test_cargo_env_vars", TestCaseFixtureStatus::Pass)
23 .with_property(TestCaseFixtureProperties::NOT_IN_DEFAULT_SET_UNIX),
24 TestCaseFixture::new("test_overrides_wrapper_env", TestCaseFixtureStatus::Pass),
25 TestCaseFixture::new("test_cwd", TestCaseFixtureStatus::Pass),
26 TestCaseFixture::new("test_execute_bin", TestCaseFixtureStatus::Pass),
27 TestCaseFixture::new("test_failure_assert", TestCaseFixtureStatus::Fail),
28 TestCaseFixture::new("test_failure_error", TestCaseFixtureStatus::Fail),
29 TestCaseFixture::new("test_failure_should_panic", TestCaseFixtureStatus::Fail),
30 TestCaseFixture::new(
31 "test_flaky_mod_3",
32 TestCaseFixtureStatus::Flaky { pass_attempt: 3 },
33 )
34 .with_property(TestCaseFixtureProperties::NOT_IN_DEFAULT_SET)
35 .with_property(TestCaseFixtureProperties::FLAKY_RESULT_FAIL_JUNIT_SUCCESS),
36 TestCaseFixture::new(
37 "test_flaky_mod_4",
38 TestCaseFixtureStatus::Flaky { pass_attempt: 4 },
39 )
40 .with_property(TestCaseFixtureProperties::NOT_IN_DEFAULT_SET)
41 .with_property(TestCaseFixtureProperties::FLAKY_RESULT_FAIL),
42 TestCaseFixture::new(
43 "test_flaky_mod_6",
44 TestCaseFixtureStatus::Flaky { pass_attempt: 6 },
45 )
46 .with_property(TestCaseFixtureProperties::NOT_IN_DEFAULT_SET),
47 TestCaseFixture::new("test_ignored", TestCaseFixtureStatus::IgnoredPass),
48 TestCaseFixture::new("test_ignored_fail", TestCaseFixtureStatus::IgnoredFail),
49 TestCaseFixture::new("test_result_failure", TestCaseFixtureStatus::Fail),
50 TestCaseFixture::new("test_slow_timeout", TestCaseFixtureStatus::IgnoredPass)
51 .with_property(TestCaseFixtureProperties::SLOW_TIMEOUT_SUBSTRING)
52 .with_property(TestCaseFixtureProperties::TEST_SLOW_TIMEOUT_SUBSTRING)
53 .with_property(TestCaseFixtureProperties::EXACT_TEST_SLOW_TIMEOUT),
54 TestCaseFixture::new("test_slow_timeout_2", TestCaseFixtureStatus::IgnoredPass)
55 .with_property(TestCaseFixtureProperties::SLOW_TIMEOUT_SUBSTRING)
56 .with_property(TestCaseFixtureProperties::TEST_SLOW_TIMEOUT_SUBSTRING),
57 TestCaseFixture::new(
58 "test_slow_timeout_subprocess",
59 TestCaseFixtureStatus::IgnoredPass,
60 )
61 .with_property(TestCaseFixtureProperties::SLOW_TIMEOUT_SUBSTRING)
62 .with_property(TestCaseFixtureProperties::TEST_SLOW_TIMEOUT_SUBSTRING),
63 TestCaseFixture::new(
64 "test_flaky_slow_timeout_mod_3",
65 TestCaseFixtureStatus::IgnoredFlaky { pass_attempt: 3 },
66 )
67 .with_property(TestCaseFixtureProperties::SLOW_TIMEOUT_SUBSTRING)
68 .with_property(TestCaseFixtureProperties::FLAKY_SLOW_TIMEOUT_SUBSTRING),
69 TestCaseFixture::new("test_stdin_closed", TestCaseFixtureStatus::Pass),
70 TestCaseFixture::new("test_subprocess_doesnt_exit", TestCaseFixtureStatus::Leak),
71 TestCaseFixture::new("test_subprocess_doesnt_exit_fail", TestCaseFixtureStatus::FailLeak),
72 TestCaseFixture::new("test_subprocess_doesnt_exit_leak_fail", TestCaseFixtureStatus::LeakFail),
73 TestCaseFixture::new("test_success", TestCaseFixtureStatus::Pass),
74 TestCaseFixture::new("test_success_should_panic", TestCaseFixtureStatus::Pass),
75 },
76 ),
77 TestSuiteFixture::new(
78 "fixture-project::other",
79 "other",
80 BuildPlatform::Target,
81 id_ord_map! {
82 TestCaseFixture::new("other_test_success", TestCaseFixtureStatus::Pass),
83 },
84 ),
85 TestSuiteFixture::new(
86 "fixture-project::segfault",
87 "segfault",
88 BuildPlatform::Target,
89 id_ord_map! {
90 TestCaseFixture::new("test_segfault", TestCaseFixtureStatus::Segfault),
91 },
92 ),
93 TestSuiteFixture::new(
95 "fixture-project",
96 "fixture-project",
97 BuildPlatform::Target,
98 id_ord_map! {
99 TestCaseFixture::new("tests::call_dylib_add_two", TestCaseFixtureStatus::Pass),
100 TestCaseFixture::new("tests::unit_test_success", TestCaseFixtureStatus::Pass),
101 },
102 ),
103 TestSuiteFixture::new(
105 "fixture-project::bin/fixture-project",
106 "fixture-project",
107 BuildPlatform::Target,
108 id_ord_map! {
109 TestCaseFixture::new("fake_test_name", TestCaseFixtureStatus::IgnoredPass),
111 TestCaseFixture::new("tests::bin_success", TestCaseFixtureStatus::Pass),
112 },
113 ),
114 TestSuiteFixture::new(
115 "fixture-project::bin/other",
116 "other",
117 BuildPlatform::Target,
118 id_ord_map! {
119 TestCaseFixture::new("tests::other_bin_success", TestCaseFixtureStatus::Pass),
120 },
121 ),
122 TestSuiteFixture::new(
123 "fixture-project::bin/wrapper",
124 "wrapper",
125 BuildPlatform::Target,
126 IdOrdMap::new(),
127 ),
128 TestSuiteFixture::new(
130 "fixture-project::example/fixture-project",
131 "fixture-project",
132 BuildPlatform::Target,
133 id_ord_map! {
134 TestCaseFixture::new("fake_test_name", TestCaseFixtureStatus::IgnoredPass),
136 TestCaseFixture::new("tests::example_success", TestCaseFixtureStatus::Pass),
137 },
138 ),
139 TestSuiteFixture::new(
140 "fixture-project::example/other",
141 "other",
142 BuildPlatform::Target,
143 id_ord_map! {
144 TestCaseFixture::new("tests::other_example_success", TestCaseFixtureStatus::Pass),
145 },
146 ),
147 TestSuiteFixture::new(
149 "fixture-project::bench/my-bench",
150 "my-bench",
151 BuildPlatform::Target,
152 id_ord_map! {
153 TestCaseFixture::new("bench_add_two", TestCaseFixtureStatus::Pass)
154 .with_property(TestCaseFixtureProperties::IS_BENCHMARK),
155 TestCaseFixture::new("bench_ignored", TestCaseFixtureStatus::IgnoredPass)
156 .with_property(TestCaseFixtureProperties::IS_BENCHMARK),
157 TestCaseFixture::new("bench_slow_timeout", TestCaseFixtureStatus::IgnoredPass)
158 .with_property(TestCaseFixtureProperties::IS_BENCHMARK)
159 .with_property(TestCaseFixtureProperties::BENCH_OVERRIDE_TIMEOUT)
160 .with_property(TestCaseFixtureProperties::BENCH_TERMINATION)
161 .with_property(TestCaseFixtureProperties::BENCH_IGNORES_TEST_TIMEOUT)
162 .with_property(TestCaseFixtureProperties::SLOW_TIMEOUT_SUBSTRING),
163 TestCaseFixture::new("tests::test_execute_bin", TestCaseFixtureStatus::Pass),
164 },
165 ),
166 TestSuiteFixture::new(
168 "nextest-derive",
169 "nextest-derive",
170 BuildPlatform::Host,
171 id_ord_map! {
172 TestCaseFixture::new("it_works", TestCaseFixtureStatus::Pass),
173 },
174 ),
175 TestSuiteFixture::new(
177 "cdylib-link",
178 "cdylib-link",
179 BuildPlatform::Target,
180 id_ord_map! {
181 TestCaseFixture::new("test_multiply_two", TestCaseFixtureStatus::Pass)
182 .with_property(TestCaseFixtureProperties::MATCHES_TEST_MULTIPLY_TWO),
183 },
184 ),
185 TestSuiteFixture::new(
186 "dylib-test",
187 "dylib-test",
188 BuildPlatform::Target,
189 IdOrdMap::new(),
190 ),
191 TestSuiteFixture::new(
192 "cdylib-example",
193 "cdylib-example",
194 BuildPlatform::Target,
195 id_ord_map! {
196 TestCaseFixture::new("tests::test_multiply_two_cdylib", TestCaseFixtureStatus::Pass)
197 .with_property(TestCaseFixtureProperties::MATCHES_CDYLIB)
198 .with_property(TestCaseFixtureProperties::MATCHES_TEST_MULTIPLY_TWO),
199 },
200 )
201 .with_property(TestSuiteFixtureProperties::NOT_IN_DEFAULT_SET)
202 .with_property(TestSuiteFixtureProperties::MATCHES_CDYLIB_EXAMPLE),
203 TestSuiteFixture::new(
205 "with-build-script",
206 "with-build-script",
207 BuildPlatform::Target,
208 id_ord_map! {
209 TestCaseFixture::new("tests::test_build_script_vars_set", TestCaseFixtureStatus::Pass),
210 TestCaseFixture::new("tests::test_out_dir_present", TestCaseFixtureStatus::Pass),
211 }
212 ),
213 TestSuiteFixture::new(
214 "proc-macro-test",
215 "proc-macro-test",
216 BuildPlatform::Host,
217 IdOrdMap::new(),
218 ),
219 }
220});