diff options
author | Yash Shinde <Yash.Shinde@windriver.com> | 2023-07-29 00:00:21 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-07-30 07:54:44 +0100 |
commit | c496b1eaf4b72ca979d47c37e73e44cd145fed1c (patch) | |
tree | 3a3ec00fa40d946f23eae55df85e50303e1d82a7 /meta/lib/oeqa/selftest/cases/rust.py | |
parent | 9b07dbc41f14d48448744bbd8cfe68fd6368c354 (diff) | |
download | poky-c496b1eaf4b72ca979d47c37e73e44cd145fed1c.tar.gz |
oeqa/selftest/rust: Add failed test cases to exclude list for Rust Oe-selftest
* Add the failing test cases in exclude_list to exclude them from testing during the Rust Oe-selftest.
* Drop meta/recipes-devtools/rust/files/rust-oe-selftest.patch file as the failing tests are
moved from being a patch to exclude_list in meta/lib/oeqa/selftest/cases/rust.py.
* When updating to a newer version of Rust, it is manually needed to update the exclude_list. The tests that fail are observed to
work on some versions and fail on others. These tests have been excluded in order to successfully complete testing of Rust Oe-selftest.
* The tests that are passed and skipped are as follows-
Target PASS SKIPPED
ARM 15507 428
ARM64 15535 400
MIPS64 15479 456
X86 15528 407
X86-64 15643 292
Also, time the test execution and pass the time taken for inclusion in the test report.
[RP: Note duration addiion in the commit log]
(From OE-Core rev: e81197c4d3b36e9ad52e56708c21987cacd13147)
Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/rust.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/rust.py | 227 |
1 files changed, 219 insertions, 8 deletions
diff --git a/meta/lib/oeqa/selftest/cases/rust.py b/meta/lib/oeqa/selftest/cases/rust.py index 7a0fd7033d..efa27c18ff 100644 --- a/meta/lib/oeqa/selftest/cases/rust.py +++ b/meta/lib/oeqa/selftest/cases/rust.py | |||
@@ -1,6 +1,7 @@ | |||
1 | # SPDX-License-Identifier: MIT | 1 | # SPDX-License-Identifier: MIT |
2 | import os | 2 | import os |
3 | import subprocess | 3 | import subprocess |
4 | import time | ||
4 | from oeqa.core.decorator import OETestTag | 5 | from oeqa.core.decorator import OETestTag |
5 | from oeqa.core.case import OEPTestResultTestCase | 6 | from oeqa.core.case import OEPTestResultTestCase |
6 | from oeqa.selftest.case import OESelftestTestCase | 7 | from oeqa.selftest.case import OESelftestTestCase |
@@ -40,6 +41,7 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): | |||
40 | def test_rust(self, *args, **kwargs): | 41 | def test_rust(self, *args, **kwargs): |
41 | # build remote-test-server before image build | 42 | # build remote-test-server before image build |
42 | recipe = "rust" | 43 | recipe = "rust" |
44 | start_time = time.time() | ||
43 | bitbake("{} -c test_compile".format(recipe)) | 45 | bitbake("{} -c test_compile".format(recipe)) |
44 | builddir = get_bb_var("RUSTSRC", "rust") | 46 | builddir = get_bb_var("RUSTSRC", "rust") |
45 | # build core-image-minimal with required packages | 47 | # build core-image-minimal with required packages |
@@ -49,6 +51,221 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): | |||
49 | features.append('CORE_IMAGE_EXTRA_INSTALL += "{0}"'.format(" ".join(default_installed_packages))) | 51 | features.append('CORE_IMAGE_EXTRA_INSTALL += "{0}"'.format(" ".join(default_installed_packages))) |
50 | self.write_config("\n".join(features)) | 52 | self.write_config("\n".join(features)) |
51 | bitbake("core-image-minimal") | 53 | bitbake("core-image-minimal") |
54 | |||
55 | # Exclude the test folders that error out while building | ||
56 | # TODO: Fix the errors and include them for testing | ||
57 | # no-fail-fast: Run all tests regardless of failure. | ||
58 | # bless: First runs rustfmt to format the codebase, | ||
59 | # then runs tidy checks. | ||
60 | exclude_list = [ | ||
61 | 'compiler/rustc', | ||
62 | 'compiler/rustc_interface/src/tests.rs', | ||
63 | 'library/panic_abort', | ||
64 | 'library/panic_unwind', | ||
65 | 'library/test/src/stats/tests.rs', | ||
66 | 'src/bootstrap/builder/tests.rs', | ||
67 | 'src/doc/rustc', | ||
68 | 'src/doc/rustdoc', | ||
69 | 'src/doc/unstable-book', | ||
70 | 'src/librustdoc', | ||
71 | 'src/rustdoc-json-types', | ||
72 | 'src/tools/compiletest/src/common.rs', | ||
73 | 'src/tools/lint-docs', | ||
74 | 'src/tools/rust-analyzer', | ||
75 | 'src/tools/rustdoc-themes', | ||
76 | 'src/tools/tidy', | ||
77 | 'tests/assembly/asm/aarch64-outline-atomics.rs', | ||
78 | 'tests/codegen/abi-main-signature-32bit-c-int.rs', | ||
79 | 'tests/codegen/abi-repr-ext.rs', | ||
80 | 'tests/codegen/abi-x86-interrupt.rs', | ||
81 | 'tests/codegen/branch-protection.rs', | ||
82 | 'tests/codegen/catch-unwind.rs', | ||
83 | 'tests/codegen/cf-protection.rs', | ||
84 | 'tests/codegen/enum-bounds-check-derived-idx.rs', | ||
85 | 'tests/codegen/force-unwind-tables.rs', | ||
86 | 'tests/codegen/intrinsic-no-unnamed-attr.rs', | ||
87 | 'tests/codegen/issues/issue-103840.rs', | ||
88 | 'tests/codegen/issues/issue-47278.rs', | ||
89 | 'tests/codegen/issues/issue-73827-bounds-check-index-in-subexpr.rs', | ||
90 | 'tests/codegen/lifetime_start_end.rs', | ||
91 | 'tests/codegen/local-generics-in-exe-internalized.rs', | ||
92 | 'tests/codegen/match-unoptimized.rs', | ||
93 | 'tests/codegen/noalias-rwlockreadguard.rs', | ||
94 | 'tests/codegen/non-terminate/nonempty-infinite-loop.rs', | ||
95 | 'tests/codegen/noreturn-uninhabited.rs', | ||
96 | 'tests/codegen/repr-transparent-aggregates-3.rs', | ||
97 | 'tests/codegen/sse42-implies-crc32.rs', | ||
98 | 'tests/codegen/thread-local.rs', | ||
99 | 'tests/codegen/uninit-consts.rs', | ||
100 | 'tests/pretty/raw-str-nonexpr.rs', | ||
101 | 'tests/run-make', | ||
102 | 'tests/run-make/cdylib-fewer-symbols/foo.rs', | ||
103 | 'tests/run-make/doctests-keep-binaries/t.rs', | ||
104 | 'tests/run-make-fulldeps', | ||
105 | 'tests/run-make/issue-22131/foo.rs', | ||
106 | 'tests/run-make/issue-36710/Makefile', | ||
107 | 'tests/run-make/issue-47551', | ||
108 | 'tests/run-make/pgo-branch-weights', | ||
109 | 'tests/run-make/pgo-gen', | ||
110 | 'tests/run-make/pgo-gen-lto', | ||
111 | 'tests/run-make/pgo-indirect-call-promotion', | ||
112 | 'tests/run-make/pgo-use', | ||
113 | 'tests/run-make/pointer-auth-link-with-c/Makefile', | ||
114 | 'tests/run-make/profile', | ||
115 | 'tests/run-make/static-pie', | ||
116 | 'tests/run-make/sysroot-crates-are-unstable', | ||
117 | 'tests/run-make/target-specs', | ||
118 | 'tests/rustdoc', | ||
119 | 'tests/rustdoc/async-move-doctest.rs', | ||
120 | 'tests/rustdoc/async-trait.rs', | ||
121 | 'tests/rustdoc/auto-traits.rs', | ||
122 | 'tests/rustdoc/check-source-code-urls-to-def.rs', | ||
123 | 'tests/rustdoc/comment-in-doctest.rs', | ||
124 | 'tests/rustdoc/const-generics/const-generics-docs.rs', | ||
125 | 'tests/rustdoc/cross-crate-hidden-assoc-trait-items.rs', | ||
126 | 'tests/rustdoc/cross-crate-hidden-impl-parameter.rs', | ||
127 | 'tests/rustdoc/cross-crate-links.rs', | ||
128 | 'tests/rustdoc/cross-crate-primitive-doc.rs', | ||
129 | 'tests/rustdoc/doctest-manual-crate-name.rs', | ||
130 | 'tests/rustdoc/edition-doctest.rs', | ||
131 | 'tests/rustdoc/edition-flag.rs', | ||
132 | 'tests/rustdoc/elided-lifetime.rs', | ||
133 | 'tests/rustdoc/external-macro-src.rs', | ||
134 | 'tests/rustdoc/extern-html-root-url.rs', | ||
135 | 'tests/rustdoc/extern-impl-trait.rs', | ||
136 | 'tests/rustdoc/hide-unstable-trait.rs', | ||
137 | 'tests/rustdoc/inline_cross/add-docs.rs', | ||
138 | 'tests/rustdoc/inline_cross/default-trait-method.rs', | ||
139 | 'tests/rustdoc/inline_cross/dyn_trait.rs', | ||
140 | 'tests/rustdoc/inline_cross/impl_trait.rs', | ||
141 | 'tests/rustdoc/inline_cross/issue-24183.rs', | ||
142 | 'tests/rustdoc/inline_cross/macros.rs', | ||
143 | 'tests/rustdoc/inline_cross/trait-vis.rs', | ||
144 | 'tests/rustdoc/inline_cross/use_crate.rs', | ||
145 | 'tests/rustdoc/intra-doc-crate/self.rs', | ||
146 | 'tests/rustdoc/intra-doc/cross-crate/additional_doc.rs', | ||
147 | 'tests/rustdoc/intra-doc/cross-crate/basic.rs', | ||
148 | 'tests/rustdoc/intra-doc/cross-crate/crate.rs', | ||
149 | 'tests/rustdoc/intra-doc/cross-crate/hidden.rs', | ||
150 | 'tests/rustdoc/intra-doc/cross-crate/macro.rs', | ||
151 | 'tests/rustdoc/intra-doc/cross-crate/module.rs', | ||
152 | 'tests/rustdoc/intra-doc/cross-crate/submodule-inner.rs', | ||
153 | 'tests/rustdoc/intra-doc/cross-crate/submodule-outer.rs', | ||
154 | 'tests/rustdoc/intra-doc/cross-crate/traits.rs', | ||
155 | 'tests/rustdoc/intra-doc/extern-builtin-type-impl.rs', | ||
156 | 'tests/rustdoc/intra-doc/extern-crate-only-used-in-link.rs', | ||
157 | 'tests/rustdoc/intra-doc/extern-crate.rs', | ||
158 | 'tests/rustdoc/intra-doc/extern-inherent-impl.rs', | ||
159 | 'tests/rustdoc/intra-doc/extern-reference-link.rs', | ||
160 | 'tests/rustdoc/intra-doc/issue-103463.rs', | ||
161 | 'tests/rustdoc/intra-doc/issue-104145.rs', | ||
162 | 'tests/rustdoc/intra-doc/issue-66159.rs', | ||
163 | 'tests/rustdoc/intra-doc/pub-use.rs', | ||
164 | 'tests/rustdoc/intra-doc/reexport-additional-docs.rs', | ||
165 | 'tests/rustdoc/issue-18199.rs', | ||
166 | 'tests/rustdoc/issue-23106.rs', | ||
167 | 'tests/rustdoc/issue-23744.rs', | ||
168 | 'tests/rustdoc/issue-25944.rs', | ||
169 | 'tests/rustdoc/issue-30252.rs', | ||
170 | 'tests/rustdoc/issue-38129.rs', | ||
171 | 'tests/rustdoc/issue-40936.rs', | ||
172 | 'tests/rustdoc/issue-43153.rs', | ||
173 | 'tests/rustdoc/issue-46727.rs', | ||
174 | 'tests/rustdoc/issue-48377.rs', | ||
175 | 'tests/rustdoc/issue-48414.rs', | ||
176 | 'tests/rustdoc/issue-53689.rs', | ||
177 | 'tests/rustdoc/issue-54478-demo-allocator.rs', | ||
178 | 'tests/rustdoc/issue-57180.rs', | ||
179 | 'tests/rustdoc/issue-61592.rs', | ||
180 | 'tests/rustdoc/issue-73061-cross-crate-opaque-assoc-type.rs', | ||
181 | 'tests/rustdoc/issue-75588.rs', | ||
182 | 'tests/rustdoc/issue-85454.rs', | ||
183 | 'tests/rustdoc/issue-86620.rs', | ||
184 | 'tests/rustdoc-json', | ||
185 | 'tests/rustdoc-js-std', | ||
186 | 'tests/rustdoc/macro_pub_in_module.rs', | ||
187 | 'tests/rustdoc/masked.rs', | ||
188 | 'tests/rustdoc/normalize-assoc-item.rs', | ||
189 | 'tests/rustdoc/no-stack-overflow-25295.rs', | ||
190 | 'tests/rustdoc/primitive-reexport.rs', | ||
191 | 'tests/rustdoc/process-termination.rs', | ||
192 | 'tests/rustdoc/pub-extern-crate.rs', | ||
193 | 'tests/rustdoc/pub-use-extern-macros.rs', | ||
194 | 'tests/rustdoc/reexport-check.rs', | ||
195 | 'tests/rustdoc/reexport-dep-foreign-fn.rs', | ||
196 | 'tests/rustdoc/reexport-doc.rs', | ||
197 | 'tests/rustdoc/reexports-priv.rs', | ||
198 | 'tests/rustdoc/reexports.rs', | ||
199 | 'tests/rustdoc/rustc,-incoherent-impls.rs', | ||
200 | 'tests/rustdoc/test_option_check/bar.rs', | ||
201 | 'tests/rustdoc/test_option_check/test.rs', | ||
202 | 'tests/rustdoc/trait-alias-mention.rs', | ||
203 | 'tests/rustdoc/trait-visibility.rs', | ||
204 | 'tests/rustdoc-ui/cfg-test.rs', | ||
205 | 'tests/rustdoc-ui/check-cfg-test.rs', | ||
206 | 'tests/rustdoc-ui/display-output.rs', | ||
207 | 'tests/rustdoc-ui/doc-comment-multi-line-attr.rs', | ||
208 | 'tests/rustdoc-ui/doc-comment-multi-line-cfg-attr.rs', | ||
209 | 'tests/rustdoc-ui/doc-test-doctest-feature.rs', | ||
210 | 'tests/rustdoc-ui/doctest-multiline-crate-attribute.rs', | ||
211 | 'tests/rustdoc-ui/doctest-output.rs', | ||
212 | 'tests/rustdoc-ui/doc-test-rustdoc-feature.rs', | ||
213 | 'tests/rustdoc-ui/failed-doctest-compile-fail.rs', | ||
214 | 'tests/rustdoc-ui/issue-80992.rs', | ||
215 | 'tests/rustdoc-ui/issue-91134.rs', | ||
216 | 'tests/rustdoc-ui/nocapture-fail.rs', | ||
217 | 'tests/rustdoc-ui/nocapture.rs', | ||
218 | 'tests/rustdoc-ui/no-run-flag.rs', | ||
219 | 'tests/rustdoc-ui/run-directory.rs', | ||
220 | 'tests/rustdoc-ui/test-no_std.rs', | ||
221 | 'tests/rustdoc-ui/test-type.rs', | ||
222 | 'tests/rustdoc/unit-return.rs', | ||
223 | 'tests/ui/abi/stack-probes-lto.rs', | ||
224 | 'tests/ui/abi/stack-probes.rs', | ||
225 | 'tests/ui/array-slice-vec/subslice-patterns-const-eval-match.rs', | ||
226 | 'tests/ui/asm/x86_64/sym.rs', | ||
227 | 'tests/ui/associated-type-bounds/fn-apit.rs', | ||
228 | 'tests/ui/associated-type-bounds/fn-dyn-apit.rs', | ||
229 | 'tests/ui/associated-type-bounds/fn-wrap-apit.rs', | ||
230 | 'tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs', | ||
231 | 'tests/ui/drop/dynamic-drop.rs', | ||
232 | 'tests/ui/empty_global_asm.rs', | ||
233 | 'tests/ui-fulldeps/deriving-encodable-decodable-box.rs', | ||
234 | 'tests/ui-fulldeps/deriving-encodable-decodable-cell-refcell.rs', | ||
235 | 'tests/ui-fulldeps/deriving-global.rs', | ||
236 | 'tests/ui-fulldeps/deriving-hygiene.rs', | ||
237 | 'tests/ui-fulldeps/dropck_tarena_sound_drop.rs', | ||
238 | 'tests/ui-fulldeps/empty-struct-braces-derive.rs', | ||
239 | 'tests/ui-fulldeps/internal-lints/bad_opt_access.rs', | ||
240 | 'tests/ui-fulldeps/internal-lints/bad_opt_access.stderr', | ||
241 | 'tests/ui-fulldeps/internal-lints/default_hash_types.rs', | ||
242 | 'tests/ui-fulldeps/internal-lints/diagnostics.rs', | ||
243 | 'tests/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.rs', | ||
244 | 'tests/ui-fulldeps/internal-lints/qualified_ty_ty_ctxt.rs', | ||
245 | 'tests/ui-fulldeps/internal-lints/query_stability.rs', | ||
246 | 'tests/ui-fulldeps/internal-lints/rustc_pass_by_value.rs', | ||
247 | 'tests/ui-fulldeps/internal-lints/ty_tykind_usage.rs', | ||
248 | 'tests/ui-fulldeps/issue-14021.rs', | ||
249 | 'tests/ui-fulldeps/lint-group-denied-lint-allowed.rs', | ||
250 | 'tests/ui-fulldeps/lint-group-forbid-always-trumps-cli.rs', | ||
251 | 'tests/ui-fulldeps/lint-pass-macros.rs', | ||
252 | 'tests/ui-fulldeps/regions-mock-tcx.rs', | ||
253 | 'tests/ui-fulldeps/rustc_encodable_hygiene.rs', | ||
254 | 'tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs', | ||
255 | 'tests/ui/functions-closures/fn-help-with-err.rs', | ||
256 | 'tests/ui/linkage-attr/issue-10755.rs', | ||
257 | 'tests/ui/macros/restricted-shadowing-legacy.rs', | ||
258 | 'tests/ui/process/nofile-limit.rs', | ||
259 | 'tests/ui/process/process-panic-after-fork.rs', | ||
260 | 'tests/ui/process/process-sigpipe.rs', | ||
261 | 'tests/ui/simd/target-feature-mixup.rs', | ||
262 | 'tests/ui/structs-enums/multiple-reprs.rs' | ||
263 | ] | ||
264 | |||
265 | exclude_fail_tests = " ".join([" --exclude " + item for item in exclude_list]) | ||
266 | # Add exclude_fail_tests with other test arguments | ||
267 | testargs = exclude_fail_tests + " --doc --no-fail-fast --bless" | ||
268 | |||
52 | # wrap the execution with a qemu instance. | 269 | # wrap the execution with a qemu instance. |
53 | # Tests are run with 512 tasks in parallel to execute all tests very quickly | 270 | # Tests are run with 512 tasks in parallel to execute all tests very quickly |
54 | with runqemu("core-image-minimal", runqemuparams = "nographic", qemuparams = "-m 512") as qemu: | 271 | with runqemu("core-image-minimal", runqemuparams = "nographic", qemuparams = "-m 512") as qemu: |
@@ -65,13 +282,6 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): | |||
65 | rustlibpath = get_bb_var("WORKDIR", "rust") | 282 | rustlibpath = get_bb_var("WORKDIR", "rust") |
66 | tmpdir = get_bb_var("TMPDIR", "rust") | 283 | tmpdir = get_bb_var("TMPDIR", "rust") |
67 | 284 | ||
68 | # Exclude the test folders that error out while building | ||
69 | # TODO: Fix the errors and include them for testing | ||
70 | # no-fail-fast: Run all tests regardless of failure. | ||
71 | # bless: First runs rustfmt to format the codebase, | ||
72 | # then runs tidy checks. | ||
73 | testargs = "--exclude tests/rustdoc --exclude src/tools/rust-analyzer --exclude tests/rustdoc-json --exclude tests/run-make-fulldeps --exclude src/tools/tidy --exclude src/tools/rustdoc-themes --exclude src/rustdoc-json-types --exclude src/librustdoc --exclude src/doc/unstable-book --exclude src/doc/rustdoc --exclude src/doc/rustc --exclude compiler/rustc --exclude library/panic_abort --exclude library/panic_unwind --exclude src/tools/lint-docs --exclude tests/rustdoc-js-std --doc --no-fail-fast --bless" | ||
74 | |||
75 | # Set path for target-poky-linux-gcc, RUST_TARGET_PATH and hosttools. | 285 | # Set path for target-poky-linux-gcc, RUST_TARGET_PATH and hosttools. |
76 | cmd = " export PATH=%s/recipe-sysroot-native/usr/bin:$PATH;" % rustlibpath | 286 | cmd = " export PATH=%s/recipe-sysroot-native/usr/bin:$PATH;" % rustlibpath |
77 | cmd = cmd + " export TARGET_VENDOR=\"-poky\";" | 287 | cmd = cmd + " export TARGET_VENDOR=\"-poky\";" |
@@ -81,9 +291,10 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): | |||
81 | cmd = cmd + " export TEST_DEVICE_ADDR=\"%s:12345\";" % qemu.ip | 291 | cmd = cmd + " export TEST_DEVICE_ADDR=\"%s:12345\";" % qemu.ip |
82 | cmd = cmd + " cd %s; python3 src/bootstrap/bootstrap.py test %s --target %s > summary.txt 2>&1;" % (builddir, testargs, targetsys) | 292 | cmd = cmd + " cd %s; python3 src/bootstrap/bootstrap.py test %s --target %s > summary.txt 2>&1;" % (builddir, testargs, targetsys) |
83 | runCmd(cmd) | 293 | runCmd(cmd) |
294 | end_time = time.time() | ||
84 | 295 | ||
85 | ptestsuite = "rust" | 296 | ptestsuite = "rust" |
86 | self.ptest_section(ptestsuite, logfile = builddir + "/summary.txt") | 297 | self.ptest_section(ptestsuite, duration = end_time - start_time, logfile = builddir + "/summary.txt") |
87 | filename = builddir + "/summary.txt" | 298 | filename = builddir + "/summary.txt" |
88 | test_results = parse_results(filename) | 299 | test_results = parse_results(filename) |
89 | for test in test_results: | 300 | for test in test_results: |