I don't see this in master or master-next yet so see comments below and
send a slightly updated v2.

On 2023-07-26 12:25, Yash Shinde wrote:
Failed test cases are added to exclude list.
Drop meta/recipes-devtools/rust/files/rust-oe-selftest.patch file.

Signed-off-by: Yash Shinde<yash.shi...@windriver.com>
---
  meta/lib/oeqa/selftest/cases/rust.py          |  209 +-
  .../rust/files/rust-oe-selftest.patch         | 2324 -----------------
  meta/recipes-devtools/rust/rust-source.inc    |    1 -
  3 files changed, 208 insertions(+), 2326 deletions(-)
  delete mode 100644 meta/recipes-devtools/rust/files/rust-oe-selftest.patch

It's good to see the large patch be replaced with a 10x smaller rust.py change.

If this change is acceptable to others, I'd like the commit log to be amended to explain how to (automatically?) update the exclude list when rust is updated. Alternatively
we could add that to meta/recipes-devtools/rust/README-rust.md
https://github.com/yoctoproject/poky/blob/master/meta/recipes-devtools/rust/README-rust.md

Is this a manual process now? Could it be mostly automated?

Please sort the exclude list alphabetically in v2 so that it's
easier for people to see what tests are being excluded (see below (*))

I assume that this commit doesn't change the tests that are run but only
moves the skipping from being a patch to the exclude list. Please confirm
and in your v2 commit log, mention that as well as what the current number of
passed and skipped tests.



diff --git a/meta/lib/oeqa/selftest/cases/rust.py 
b/meta/lib/oeqa/selftest/cases/rust.py
index 7a0fd7033d..abd3ef8314 100644
--- a/meta/lib/oeqa/selftest/cases/rust.py
+++ b/meta/lib/oeqa/selftest/cases/rust.py
@@ -70,7 +70,214 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, 
OEPTestResultTestCase):
              # no-fail-fast: Run all tests regardless of failure.
              # bless: First runs rustfmt to format the codebase,
              # then runs tidy checks.
-            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"

I think you're doing two things in the 2 lines above and the list below:

 1. splitting up the testargs into one per line

 2. adding an exclude list of tests that are know to fail.

Is that true?
If so can you use two seperate variables/lists to reflect the different intended purpose of each list? This should also help in maintaining each list and hopefully the tests that are exluded will all have a:

   tests/foo/bar.rs

format rather than somewhat worrying prefixes like:
   compiler/rustc

and

   library/panic_abort

+            exclude_list = """  --exclude tests/run-make
If python will let you, please split this line like this:

+            exclude_list = """
+                                 --exclude tests/run-make

to separate the variables from the list name to make future updates a bit 
easier.

+                                --exclude tests/run-make/pgo-branch-weights/
+                                --exclude 
tests/ui/macros/restricted-shadowing-legacy.rs
+                                --exclude tests/ui-fulldeps/issue-14021.rs


><snip>< -- the middle bits of the long unsorted list.


+                                --exclude library/panic_unwind
+                                --exclude src/tools/lint-docs
+                                --exclude tests/rustdoc-js-std"""

Similarly, if python will let you, put the terminating triple quote on a new line with proper identation of course.

These last two comments are "nice-to-have" so just call me a python newbie if that's not possible or is not pythonic!

+
+            exclude_fail_tests = exclude_list.split("\n")
+            exclude_fail_tests = " ".join(exclude_fail_tests)
+
+            # Add exclude_fail_tests with other test arguments
+            testargs =  exclude_fail_tests + " --doc --no-fail-fast --bless"
# Set path for target-poky-linux-gcc, RUST_TARGET_PATH and hosttools.
              cmd = " export PATH=%s/recipe-sysroot-native/usr/bin:$PATH;" % 
rustlibpath
diff --git a/meta/recipes-devtools/rust/files/rust-oe-selftest.patch 
b/meta/recipes-devtools/rust/files/rust-oe-selftest.patch

><snip><  -- giant 10x bigger than it needs to be patch


-diff --git a/tests/run-make/pointer-auth-link-with-c/Makefile 
b/tests/run-make/pointer-auth-link-with-c/Makefile
-index dffbd303582..5347d0a90f1 100644
---- a/tests/run-make/pointer-auth-link-with-c/Makefile
-+++ b/tests/run-make/pointer-auth-link-with-c/Makefile
-@@ -1,3 +1,4 @@
-+# ignore-stage1
- include ../tools.mk
-
- # only-aarch64
diff --git a/meta/recipes-devtools/rust/rust-source.inc 
b/meta/recipes-devtools/rust/rust-source.inc
index 8b9199e9ab..4a720e645b 100644
--- a/meta/recipes-devtools/rust/rust-source.inc
+++ b/meta/recipes-devtools/rust/rust-source.inc
@@ -6,7 +6,6 @@ SRC_URI +="https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n file://0001-Do-not-use-LFS64-on-linux-with-musl.patch;patchdir=${RUSTSRC} \ file://zlib-off64_t.patch;patchdir=${RUSTSRC} \ file://0001-musl-Define-SOCK_SEQPACKET-in-common-place.patch;patchdir=${RUSTSRC} \ - file://rust-oe-selftest.patch;patchdir=${RUSTSRC} \ file://bootstrap_fail.patch;patchdir=${RUSTSRC} \ "
  SRC_URI[rust.sha256sum] = 
"bb8e9c564566b2d3228d95de9063a9254182446a161353f1d843bfbaf5c34639"

*
The sorted list so people (mostly me!) can see what is being skipped.
I'm tempted to ask about some of the exclusions but I'll leave that for another time.


+                                --exclude compiler/rustc
+                                --exclude compiler/rustc_interface/src/tests.rs
+                                --exclude library/panic_abort
+                                --exclude library/panic_unwind
+                                --exclude library/test/src/stats/tests.rs
+                                --exclude src/bootstrap/builder/tests.rs
+                                --exclude src/doc/rustc
+                                --exclude src/doc/rustdoc
+                                --exclude src/doc/unstable-book
+                                --exclude src/librustdoc
+                                --exclude src/rustdoc-json-types
+                                --exclude src/tools/compiletest/src/common.rs
+                                --exclude src/tools/lint-docs
+                                --exclude src/tools/rust-analyzer
+                                --exclude src/tools/rustdoc-themes
+                                --exclude src/tools/tidy
+                                --exclude tests/assembly/asm/aarch64-outline-atomics.rs +                                --exclude tests/codegen/abi-main-signature-32bit-c-int.rs
+                                --exclude tests/codegen/abi-repr-ext.rs
+                                --exclude tests/codegen/abi-x86-interrupt.rs +                                --exclude tests/codegen/branch-protection.rs
+                                --exclude tests/codegen/catch-unwind.rs
+                                --exclude tests/codegen/cf-protection.rs
+                                --exclude tests/codegen/enum-bounds-check-derived-idx.rs +                                --exclude tests/codegen/force-unwind-tables.rs +                                --exclude tests/codegen/intrinsic-no-unnamed-attr.rs +                                --exclude tests/codegen/issues/issue-103840.rs +                                --exclude tests/codegen/issues/issue-47278.rs +                                --exclude tests/codegen/issues/issue-73827-bounds-check-index-in-subexpr.rs +                                --exclude tests/codegen/lifetime_start_end.rs +                                --exclude tests/codegen/local-generics-in-exe-internalized.rs +                                --exclude tests/codegen/match-unoptimized.rs +                                --exclude tests/codegen/noalias-rwlockreadguard.rs +                                --exclude tests/codegen/non-terminate/nonempty-infinite-loop.rs +                                --exclude tests/codegen/noreturn-uninhabited.rs +                                --exclude tests/codegen/repr-transparent-aggregates-3.rs +                                --exclude tests/codegen/sse42-implies-crc32.rs
+                                --exclude tests/codegen/thread-local.rs
+                                --exclude tests/codegen/uninit-consts.rs
+                                --exclude tests/pretty/raw-str-nonexpr.rs
+                                --exclude tests/run-make
+                                --exclude tests/run-make/cdylib-fewer-symbols/foo.rs +                                --exclude tests/run-make/doctests-keep-binaries/t.rs
+                                --exclude tests/run-make-fulldeps
+                                --exclude tests/run-make/issue-22131/foo.rs
+                                --exclude tests/run-make/issue-36710/Makefile
+                                --exclude tests/run-make/issue-47551/
+                                --exclude tests/run-make/pgo-branch-weights/
+                                --exclude tests/run-make/pgo-gen/
+                                --exclude tests/run-make/pgo-gen-lto/
+                                --exclude tests/run-make/pgo-indirect-call-promotion/
+                                --exclude tests/run-make/pgo-use/
+                                --exclude tests/run-make/pointer-auth-link-with-c/Makefile
+                                --exclude tests/run-make/profile/
+                                --exclude tests/run-make/static-pie/
+                                --exclude tests/run-make/sysroot-crates-are-unstable/
+                                --exclude tests/run-make/target-specs/
+                                --exclude tests/rustdoc
+                                --exclude tests/rustdoc/async-move-doctest.rs
+                                --exclude tests/rustdoc/async-trait.rs
+                                --exclude tests/rustdoc/auto-traits.rs
+                                --exclude tests/rustdoc/check-source-code-urls-to-def.rs +                                --exclude tests/rustdoc/comment-in-doctest.rs +                                --exclude tests/rustdoc/const-generics/const-generics-docs.rs +                                --exclude tests/rustdoc/cross-crate-hidden-assoc-trait-items.rs +                                --exclude tests/rustdoc/cross-crate-hidden-impl-parameter.rs +                                --exclude tests/rustdoc/cross-crate-links.rs +                                --exclude tests/rustdoc/cross-crate-primitive-doc.rs +                                --exclude tests/rustdoc/doctest-manual-crate-name.rs
+                                --exclude tests/rustdoc/edition-doctest.rs
+                                --exclude tests/rustdoc/edition-flag.rs
+                                --exclude tests/rustdoc/elided-lifetime.rs
+                                --exclude tests/rustdoc/external-macro-src.rs +                                --exclude tests/rustdoc/extern-html-root-url.rs +                                --exclude tests/rustdoc/extern-impl-trait.rs +                                --exclude tests/rustdoc/hide-unstable-trait.rs +                                --exclude tests/rustdoc/inline_cross/add-docs.rs +                                --exclude tests/rustdoc/inline_cross/default-trait-method.rs +                                --exclude tests/rustdoc/inline_cross/dyn_trait.rs +                                --exclude tests/rustdoc/inline_cross/impl_trait.rs +                                --exclude tests/rustdoc/inline_cross/issue-24183.rs +                                --exclude tests/rustdoc/inline_cross/macros.rs +                                --exclude tests/rustdoc/inline_cross/trait-vis.rs +                                --exclude tests/rustdoc/inline_cross/use_crate.rs +                                --exclude tests/rustdoc/intra-doc-crate/self.rs +                                --exclude tests/rustdoc/intra-doc/cross-crate/additional_doc.rs +                                --exclude tests/rustdoc/intra-doc/cross-crate/basic.rs +                                --exclude tests/rustdoc/intra-doc/cross-crate/crate.rs +                                --exclude tests/rustdoc/intra-doc/cross-crate/hidden.rs +                                --exclude tests/rustdoc/intra-doc/cross-crate/macro.rs +                                --exclude tests/rustdoc/intra-doc/cross-crate/module.rs +                                --exclude tests/rustdoc/intra-doc/cross-crate/submodule-inner.rs +                                --exclude tests/rustdoc/intra-doc/cross-crate/submodule-outer.rs +                                --exclude tests/rustdoc/intra-doc/cross-crate/traits.rs +                                --exclude tests/rustdoc/intra-doc/extern-builtin-type-impl.rs +                                --exclude tests/rustdoc/intra-doc/extern-crate-only-used-in-link.rs +                                --exclude tests/rustdoc/intra-doc/extern-crate.rs +                                --exclude tests/rustdoc/intra-doc/extern-inherent-impl.rs +                                --exclude tests/rustdoc/intra-doc/extern-reference-link.rs +                                --exclude tests/rustdoc/intra-doc/issue-103463.rs +                                --exclude tests/rustdoc/intra-doc/issue-104145.rs +                                --exclude tests/rustdoc/intra-doc/issue-66159.rs +                                --exclude tests/rustdoc/intra-doc/pub-use.rs +                                --exclude tests/rustdoc/intra-doc/reexport-additional-docs.rs
+                                --exclude tests/rustdoc/issue-18199.rs
+                                --exclude tests/rustdoc/issue-23106.rs
+                                --exclude tests/rustdoc/issue-23744.rs
+                                --exclude tests/rustdoc/issue-25944.rs
+                                --exclude tests/rustdoc/issue-30252.rs
+                                --exclude tests/rustdoc/issue-38129.rs
+                                --exclude tests/rustdoc/issue-40936.rs
+                                --exclude tests/rustdoc/issue-43153.rs
+                                --exclude tests/rustdoc/issue-46727.rs
+                                --exclude tests/rustdoc/issue-48377.rs
+                                --exclude tests/rustdoc/issue-48414.rs
+                                --exclude tests/rustdoc/issue-53689.rs
+                                --exclude tests/rustdoc/issue-54478-demo-allocator.rs
+                                --exclude tests/rustdoc/issue-57180.rs
+                                --exclude tests/rustdoc/issue-61592.rs
+                                --exclude tests/rustdoc/issue-73061-cross-crate-opaque-assoc-type.rs
+                                --exclude tests/rustdoc/issue-75588.rs
+                                --exclude tests/rustdoc/issue-85454.rs
+                                --exclude tests/rustdoc/issue-86620.rs
+                                --exclude tests/rustdoc-json
+                                --exclude tests/rustdoc-js-std"""
+                                --exclude tests/rustdoc/macro_pub_in_module.rs
+                                --exclude tests/rustdoc/masked.rs
+                                --exclude tests/rustdoc/normalize-assoc-item.rs +                                --exclude tests/rustdoc/no-stack-overflow-25295.rs +                                --exclude tests/rustdoc/primitive-reexport.rs +                                --exclude tests/rustdoc/process-termination.rs
+                                --exclude tests/rustdoc/pub-extern-crate.rs
+                                --exclude tests/rustdoc/pub-use-extern-macros.rs
+                                --exclude tests/rustdoc/reexport-check.rs
+                                --exclude tests/rustdoc/reexport-dep-foreign-fn.rs
+                                --exclude tests/rustdoc/reexport-doc.rs
+                                --exclude tests/rustdoc/reexports-priv.rs
+                                --exclude tests/rustdoc/reexports.rs
+                                --exclude tests/rustdoc/rustc-incoherent-impls.rs +                                --exclude tests/rustdoc/test_option_check/bar.rs +                                --exclude tests/rustdoc/test_option_check/test.rs +                                --exclude tests/rustdoc/trait-alias-mention.rs
+                                --exclude tests/rustdoc/trait-visibility.rs
+                                --exclude tests/rustdoc-ui/cfg-test.rs
+                                --exclude tests/rustdoc-ui/check-cfg-test.rs +                                --exclude tests/rustdoc-ui/display-output.rs +                                --exclude tests/rustdoc-ui/doc-comment-multi-line-attr.rs +                                --exclude tests/rustdoc-ui/doc-comment-multi-line-cfg-attr.rs +                                --exclude tests/rustdoc-ui/doc-test-doctest-feature.rs +                                --exclude tests/rustdoc-ui/doctest-multiline-crate-attribute.rs +                                --exclude tests/rustdoc-ui/doctest-output.rs +                                --exclude tests/rustdoc-ui/doc-test-rustdoc-feature.rs +                                --exclude tests/rustdoc-ui/failed-doctest-compile-fail.rs
+                                --exclude tests/rustdoc-ui/issue-80992.rs
+                                --exclude tests/rustdoc-ui/issue-91134.rs
+                                --exclude tests/rustdoc-ui/nocapture-fail.rs
+                                --exclude tests/rustdoc-ui/nocapture.rs
+                                --exclude tests/rustdoc-ui/no-run-flag.rs
+                                --exclude tests/rustdoc-ui/run-directory.rs
+                                --exclude tests/rustdoc-ui/test-no_std.rs
+                                --exclude tests/rustdoc-ui/test-type.rs
+                                --exclude tests/rustdoc/unit-return.rs
+                                --exclude tests/ui/abi/stack-probes-lto.rs
+                                --exclude tests/ui/abi/stack-probes.rs
+                                --exclude tests/ui/array-slice-vec/subslice-patterns-const-eval-match.rs
+                                --exclude tests/ui/asm/x86_64/sym.rs
+                                --exclude tests/ui/associated-type-bounds/fn-apit.rs +                                --exclude tests/ui/associated-type-bounds/fn-dyn-apit.rs +                                --exclude tests/ui/associated-type-bounds/fn-wrap-apit.rs +                                --exclude tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs
+                                --exclude tests/ui/drop/dynamic-drop.rs
+                                --exclude tests/ui/empty_global_asm.rs
+                                --exclude tests/ui-fulldeps/deriving-encodable-decodable-box.rs +                                --exclude tests/ui-fulldeps/deriving-encodable-decodable-cell-refcell.rs +                                --exclude tests/ui-fulldeps/deriving-global.rs +                                --exclude tests/ui-fulldeps/deriving-hygiene.rs +                                --exclude tests/ui-fulldeps/dropck_tarena_sound_drop.rs +                                --exclude tests/ui-fulldeps/empty-struct-braces-derive.rs +                                --exclude tests/ui-fulldeps/internal-lints/bad_opt_access.rs +                                --exclude tests/ui-fulldeps/internal-lints/bad_opt_access.stderr +                                --exclude tests/ui-fulldeps/internal-lints/default_hash_types.rs +                                --exclude tests/ui-fulldeps/internal-lints/diagnostics.rs +                                --exclude tests/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.rs +                                --exclude tests/ui-fulldeps/internal-lints/qualified_ty_ty_ctxt.rs +                                --exclude tests/ui-fulldeps/internal-lints/query_stability.rs +                                --exclude tests/ui-fulldeps/internal-lints/rustc_pass_by_value.rs +                                --exclude tests/ui-fulldeps/internal-lints/ty_tykind_usage.rs
+                                --exclude tests/ui-fulldeps/issue-14021.rs
+                                --exclude tests/ui-fulldeps/lint-group-denied-lint-allowed.rs +                                --exclude tests/ui-fulldeps/lint-group-forbid-always-trumps-cli.rs +                                --exclude tests/ui-fulldeps/lint-pass-macros.rs +                                --exclude tests/ui-fulldeps/regions-mock-tcx.rs +                                --exclude tests/ui-fulldeps/rustc_encodable_hygiene.rs +                                --exclude tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs +                                --exclude tests/ui/functions-closures/fn-help-with-err.rs +                                --exclude tests/ui/linkage-attr/issue-10755.rs +                                --exclude tests/ui/macros/restricted-shadowing-legacy.rs
+                                --exclude tests/ui/process/nofile-limit.rs
+                                --exclude tests/ui/process/process-panic-after-fork.rs +                                --exclude tests/ui/process/process-sigpipe.rs +                                --exclude tests/ui/simd/target-feature-mixup.rs +                                --exclude tests/ui/structs-enums/multiple-reprs.rs

Better, eh?

Thanks for the quick turn-around on this nice change!

--
# Randy MacLeod
# Wind River Linux
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184903): 
https://lists.openembedded.org/g/openembedded-core/message/184903
Mute This Topic: https://lists.openembedded.org/mt/100374212/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to