-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking Issue for porting run-make
tests to use Rust
#121876
Labels
A-run-make
Area: port run-make Makefiles to rmake.rs
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-tracking-issue
Category: An issue tracking the progress of sth. like the implementation of an RFC
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
jieyouxu
added
A-testsuite
Area: The testsuite used to check the correctness of rustc
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
E-help-wanted
Call for participation: Help is requested to fix this issue.
C-tracking-issue
Category: An issue tracking the progress of sth. like the implementation of an RFC
labels
Mar 1, 2024
4 tasks
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
workingjubilee
added
the
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
label
Mar 22, 2024
5 tasks
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this issue
Mar 31, 2024
Rewrite `core-no-fp-fmt-parse` test in Rust Claiming the simple "core-no-fp-fmt-parse" test from rust-lang#121876. `run_make_support` was altered with `arg_path` written in rust-lang#121918 by `@abhay-51,` with additional doc comment. Preliminary GSoC contribution for the project proposal mentored by `@jieyouxu.`
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Mar 31, 2024
Rollup merge of rust-lang#123180 - Oneirical:master, r=Mark-Simulacrum Rewrite `core-no-fp-fmt-parse` test in Rust Claiming the simple "core-no-fp-fmt-parse" test from rust-lang#121876. `run_make_support` was altered with `arg_path` written in rust-lang#121918 by `@abhay-51,` with additional doc comment. Preliminary GSoC contribution for the project proposal mentored by `@jieyouxu.`
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Apr 4, 2024
Port hir-tree run-make test to ui test As part of rust-lang#121876 cc `@jieyouxu`
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Apr 4, 2024
Rollup merge of rust-lang#122448 - high-cloud:move-hir-tree, r=oli-obk Port hir-tree run-make test to ui test As part of rust-lang#121876 cc `@jieyouxu`
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Apr 5, 2024
…e-enum, r=Mark-Simulacrum Port argument-non-c-like-enum to Rust Part of rust-lang#121876.
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Apr 5, 2024
…imulacrum Port `run-make/issue-7349` to a codegen test The test does not need to be a run-make test, it can use the codegen test infrastructure. Also took the opportunity to rename the test to `no-redundant-item-monomorphization` so it's not just some opaque issue number. Part of rust-lang#121876.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Apr 5, 2024
Rollup merge of rust-lang#123474 - jieyouxu:issue-7349-port, r=Mark-Simulacrum Port `run-make/issue-7349` to a codegen test The test does not need to be a run-make test, it can use the codegen test infrastructure. Also took the opportunity to rename the test to `no-redundant-item-monomorphization` so it's not just some opaque issue number. Part of rust-lang#121876.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Apr 5, 2024
Rollup merge of rust-lang#123149 - jieyouxu:rmake-arguments-non-c-like-enum, r=Mark-Simulacrum Port argument-non-c-like-enum to Rust Part of rust-lang#121876.
This was referenced Nov 14, 2024
This was referenced Nov 22, 2024
This was referenced Nov 30, 2024
Merged
This was referenced Dec 7, 2024
This was referenced Dec 14, 2024
This was referenced Dec 23, 2024
Re-triage (2024-12-25):
|
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Dec 26, 2024
…-component, r=wesleywiser Migrate `incr-add-rust-src-component` to rmake This PR partially supersedes rust-lang#128562, and ports the Makefile-based `tests/run-make/incr-add-rust-src-component` to use rmake.rs infra. Part of rust-lang#121876. This run-make test is a regression test for rust-lang#70924. It (tries to) checks that if we add the `rust-src` component in between two incremental compiles, that the compiler doesn't ICE on the second invocation. - Original issue:rust-lang#70924 - Fix PR: rust-lang#72767 - PR adding this regression test: rust-lang#72952 However, the Makefile version of this used `$SYSROOT/lib/rustlib/src/rust/src/libstd/lib.rs`, but that actually got moved around and reorganized over the years. As of Dec 2024, the `rust-src` component is more like (specific for our purposes): ``` $SYSROOT/lib/rustlib/src/rust/ library/std/src/lib.rs src/ ``` However, this run-make test is ancient and it exercises incr-comp system logic. I'm not sure if this test would actually catch the original regression. This PR was co-authored with `@Oneirical.` r? incremental try-job: i686-msvc try-job: x86_64-mingw-1 try-job: x86_64-msvc try-job: aarch64-apple
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-run-make
Area: port run-make Makefiles to rmake.rs
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-tracking-issue
Category: An issue tracking the progress of sth. like the implementation of an RFC
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
We want to stop
run-make
tests from relying onmake
, and improve therun-make
tests so thatthey are more accessible to rustc contributors by allowing the tests to be written in Rust (see
#40713 for context). PR #113026 was merged to address this, and now we are able to write
run-make
tests in Rust recipes. We would like your help to port over existing
run-make
tests still usingMakefiles to use Rust recipes instead.
If you would like to work on porting one of the
run-make
tests, please link to this issue in yourPR and leave a comment to claim the test (or multiple tests). If you are stuck, please don't hesitate to open a thread
on Rust's Zulip.
run-make
is the most flexible fallback test kind, but somerun-make
tests could be migrated to become e.g. ui tests instead. Please check if you can convert therun-make
test into other test kinds before porting!When you try to port a test, also consider:
Context: Rust recipes?
PR #113026 adds basic infrastructure support to write
run-make
tests using small Rust programs,called recipes.
We aim to eliminate the dependency on make and Makefiles for building
run-make
-style tests.Makefiles are replaced by recipes (
rmake.rs
). The PR implements runningrun-make
recipes in3 steps:
run_make_support
which thermake.rs
recipes depend on as a toollib.
rmake.rs
and link in the support library.rmake.rs
is basically a replacement forMakefile
, and allows running arbitrary Rust code. Thesupport library is built using cargo, and so can depend on external crates if desired.
The infrastructure implemented by the PR is very barebones, and is the minimally required
infrastructure needed to build, run and pass the two example run-make tests ported over to the new
infrastructure:
You likely will find that you would need to improve the API of the support library, and extend
the functionality of the support library.
Common traps and pitfalls, and tips and tricks
$PATH
uses;
on Windows and:
for *nixes. Usestd::env::{join,split}_paths
to properlyhandle
$PATH
.Be careful of path separator platform differences. Always prefer
PathBuf
operations not stringpaths if possible.
tests/
are not (currently) formatted by rustfmt.Consult https://github.com/rust-lang/rust/blob/master/tests/run-make/tools.mk for which flags
and envs are passed to various executables or libraries. May have to triple check on those.
You can always request your reviewer to run try jobs to test out your PR on environments you don't locally have access to. Good candidate CI jobs include:
Tests that need porting
run-make
alloc tests to rmake #125024)run-make/allow-non-lint-warnings-cmdline
tormake.rs
#126386)run-make/allow-warnings-cmdline-stability
tormake.rs
#125573)atomic-lock-free
tormake
#127787)branch-protection-check-IBT
run-make test #126720, run-make: Deletecat-and-grep-sanity-check
and restrictbranch-protection-check-IBT
to stable #129156, Migratebranch-protection-check-IBT
to rmake.rs #134760)run-make/c-link-to-rust-dylib
tormake.rs
#125808)run-make/c-link-to-rust-staticlib
tormake
#125027)run-make/c-link-to-rust-va-list-fn
tormake
#125026)c-unwind-abi-catch-lib-panic
,foreign-rust-exceptions
andexport-executable-symbols
run-make
tests to rmake #128065)cat-and-grep-sanity-check
and restrictbranch-protection-check-IBT
to stable #129156, Deletecat-and-grep-sanity-check
#134762)cdylib-dylib-linkage
run-make
test to rmake #128245)run-make/codegen-options-parsing
tormake.rs
#126478)run-make/comment-section
tormake.rs
#126534)run-make/compile-stdin
tormake.rs
#125607)compiler-lookup-paths
,dump-mono-stats
andprune-link-args
run-make
tests tormake
orui
format #126208)run-make/compressed-debuginfo
tormake.rs
#126629)run-make/const-prop-lint
tormake.rs
#125653)core-no-fp-fmt-parse
test in Rust #123180)run-make/crate-data-smoke
tormake.rs
#125723)crate-hash-rustc-version
tormake
#127693)cross-lang-lto
run-make
test to rmake #128352)cross-lang-lto-clang
andcross-lang-lto-pgo-smoketest
run-make
tests to rmake #128356)cross-lang-lto-upstream-rlibs
,long-linker-command-lines
andlong-linker-command-lines-cmd-exe
run-make
tests to rmake #128196)run-make/dep-graph
tormake.rs
#126517)dep-info
,dep-info-spaces
anddep-info-doesnt-run-much
run-make
tests intodep-info
rmake.rs #128787)run-make/doctests-keep-binaries
to new rmake.rs format #124658)run-make/doctests-runtool
to rmake #124711)dump-ice-to-disk
andpanic-abort-eh_frame
run-make
tests to rmake #127523)run-make/duplicate-output-flavors
tormake.rs
#126542)dylib-chain
,rlib-chain
,issue-47384
,msvc-opt-minsize
andtest-harness
run-make
tests to ui/rmake #127044)run-make/emit-named-files
tormake.rs
#125849)emit-shared-files
andemit-path-unhashed
run-make
tests to rmake #127335)emit-to-stdout
run-make
test to rmake #128460, Add tests for some old fixed issues #131355)error-found-staticlib-instead-crate
,output-filename-conflicts-with-directory
,output-filename-overwrites-input
,native-link-modifier-verbatim-rustc
andnative-link-verbatim-linker
run-make
tests tormake.rs
format #126500)extern-diff-internal-name
,extern-multiple-copies
andextern-multiple-copies2
run-make
tests to rmake #128102)extern-flag-fun
,incremental-debugger-visualiser
andincremental-session-fail
run-make
tests tormake.rs
#126490)extern-flag-pathless
,silly-file-names
,metadata-dep-info
,cdylib-fewer-symbols
andsymbols-include-type-name
run-make
tests to rmake #127006)extra-filename-with-temp-outputs
andissue-85019-moved-src-dir
run-make
tests to rmake #127338)foreign-double-unwind
,issue-36710
andforeign-exceptions
run-make
tests to rmake #127926run-make/glibc-staticlib-args
tormake.rs
#126684)inaccessible-temp-dir
,output-with-hyphens
andissue-10971-temps-dir
run-make
tests tormake
#126279)incr-add-rust-src-component
andissue-84395-lto-embed-bitcode
run-make
tests to rmake #128562, Migrateincr-add-rust-src-component
to rmake #134656)run-make
test suite inx86_64-gnu-debug
#131917)run-make/inline-always-many-cgu
tormake.rs
#126823)interdependent-c-libraries
,compiler-rt-works-on-mingw
andincr-foreign-head-span
run-make
tests to rmake #127989)intrinsic-unreachable
,sepcomp-cci-copies
,sepcomp-inlining
andsepcomp-separate
run-make
tests to rmake.rs #126427)run-make/invalid-library
tormake.rs
#126861)run-make/issue-7349
to a codegen test #123474)run-make/issue-11908
to newrmake.rs
format #125031)run-make/issue-14500
to newrmake.rs
format #125047)issue-14698
.issue-33329
andissue-107094
run-make
tests to rmake or ui #127820)issue-22131
andissue-26006
run-make
tests to rmake #127621)run-make
tests to rmake #127491)run-make/issue-28766
tormake
#125221)run-make/issue-30063
tormake
#125227)issue-37839
,track-path-dep-info
andtrack-pgo-dep-info
run-make
tests to rmake #127378)run-make/issue-46239
tormake
#125222)issue-47551
,issue-35164
andissue-69368
run-make
tests to rmake #127624)bin-emit-no-symbols
run-make
test tormake
#125787)run-make/issue-53964
tormake
#125224)issue-64153
,invalid-staticlib
andno-builtins-lto
run-make
tests tormake
#126437)issue-83045
,rustc-macro-dep-files
andenv-dep-info
run-make
tests to rmake #127381)issue-83112-incr-test-moved-file
,type-mismatch-same-crate-name
andissue-109934-lto-debuginfo
run-make
tests to rmake or ui #127538)issue-85401-static-mir
,missing-crate-dependency
andunstable-flag-required
run-make
tests to rmake #127822)run-make/issue64319
tormake
and rename #125215)jobserver-error
run-make
test to rmake #128789)libs-through-symlinks
andtranslation
run-make tests to rmake #129011)tests/run-make/libtest-json
totests/ui
#126773, Portrun-make/libtest-json
andrun-make/libtest-junit
to rmake #129037)link-args-order
,ls-metadata
andlto-readonly-lib
run-make
tests tormake
#126095)link-cfg
andrustdoc-default-output
run-make
tests to rmake #128361)run-make/link-framework
tormake.rs
#126898)run-make/llvm-ident
tormake.rs
#126941)lto-empty
,invalid-so
andissue-20626
run-make
tests to rmake.rs #126964)lto-linkage-used-attr
,no-duplicate-libs
andpgo-gen-no-imp-symbols
run-make
tests to rmake #127990)lto-smoke-c
andlink-path-order
run-make
tests to rmake #127928)libtest-thread-limit
run-make
test to rmake #128507)macos-fat-archive
,manual-link
andarchive-duplicate-names
run-make
tests to rmake #127825)run-make/manual-crate-name
tormake.rs
#126064)min-global-align
andno-alloc-shim
run-make
tests to rmake #128407)run-make/multiple-emits
tormake.rs
#126186)run-make/no-cdylib-as-rdylib
tormake
#125104)no-input-file.stderr
test in Rust and support diff #124257)run-make/no-intermediate-extras
to newrmake.rs
#125218)output-type-permutations
run-make
test to rmake #127098)run-make/override-aliased-flags
tormake.rs
#127041)run-make/panic-impl-transitive
tormake
#125146)pass-linker-flags-flavor
,pass-linker-flags-from-dep
andpass-linker-flags
run-make
tests to rmake #127328)pdb-buildinfo-cl-cmd
andpgo-indirect-call-promotion
run-make
tests to rmake #128363)pdb-alt-path
,mismatching-target-triples
andmingw-export-call-convention
run-make
tests to rmake #126805)run-make/pgo-branch-weights
tormake
#125165)pgo-gen
,pgo-use
andprofile
run-make
tests to rmake.rs #126957)pgo-gen-lto
run-make
test to rmake #128757)pointer-auth-link-with-c
,c-dynamic-rlib
andc-dynamic-dylib
run-make
tests to rmake #127872)tests/run-make/prefer-dylib
tormake.rs
#126174)pretty-print-with-dep-file
,pretty-print-to-file
andlibtest-padding
run-make
tests to rmake #126995)print-target-list
tormake
andprint-calling-convention
to ui-test #127877)print-cfg
run-make test to Rust-based rmake.rs #124473)--print=native-static-libs
to rmake.rs #124383)raw-dylib-alt-calling-convention
,raw-dylib-c
andredundant-libs
run-make
tests to rmake #128107)raw-dylib-inline-cross-dylib
andraw-dylib-custom-dlltool
run-make
tests to rmake #127390)remap-path-prefix
,debug-assertions
andemit-stack-sizes
run-make
tests to rmake #126801)remap-path-prefix-dwarf
run-make
test to rmake #128410)reproducible-build
run-make
test to rmake #128456)reproducible-build-2
andstable-symbol-names
run-make
tests to rmake #127095)run-make/return-non-c-like-enum
tormake.rs
#127116)run-make
tests to rmake #127663)rlib-format-packed-bundled-libs
andnative-link-modifier-bundle
run-make
tests to rmake #129018)rlib-format-packed-bundled-libs-2
,native-link-modifier-whole-archive
andno-builtins-attribute
run-make
tests to rmake #128075)rust-lld
run-make tests tormake
#123975)rustdoc-determinism
test in Rust #124698)run-make/rustdoc-error-lines
to newrmake.rs
#124753)run-make/rustdoc-io-error
tormake.rs
#124807)run-make/rustdoc-map-file
to rmake #124837)run-make/rustdoc-output-path
to rmake #124888)run-make/rustdoc-scrape-examples-invalid-expr
tormake.rs
#125248)run-make/rustdoc-scrape-examples-macros
tormake.rs
#125401)run-make/rustdoc-scrape-examples-multiple
tormake.rs
#125357)run-make/rustdoc-scrape-examples-remap
tormake.rs
#125207)run-make/rustdoc-scrape-examples-test
to newrmake.rs
#125275)run-make/rustdoc-scrape-examples-whitespace
tormake.rs
#125318)run-make/rustdoc-shared-flags
to rmake #124963)run-make/rustdoc-themes
to new rmake.rs #125142)run-make/rustdoc-with-out-dir-option
to newrmake.rs
#125178)run-make/rustdoc-with-output-dir-option
tormake.rs
#125485)run-make/rustdoc-with-short-out-dir-option
tormake.rs
#125445)share-generics-dylib
,raw-dylib-import-name-type
,raw-dylib-link-ordinal
andraw-dylib-stdcall-ordinal
run-make
tests to rmake #128112)run-make/short-ice
tormake
#126036)simd-ffi
run-make
test to rmake #128700)split-debuginfo
run-make
test to rmake #128754)static-dylib-by-default
,sanitizer-dylib-link
,sanitizer-cdylib-link
andsanitizer-staticlib-link
run-make
tests to rmake #128079)run-make/static-unwinding
tormake
#125213)staticlib-blank-lib
,rlib-format-packed-bundled-libs-3
andissue-97463-abi-param-passing
run-make
tests to rmake #127778)staticlib-dylib-linkage
run-make
test to rmake #128696)std-core-cycle
,obey-crate-type-flag
,mixing-libs
andissue-18943
run-make
tests tormake.rs
#126484)symbol-mangling-hashed
to rmake.rs #128567)symbol-visibility
run-make
test to rmake #127060)tests/run-make/sysroot-crates-are-unstable
from Python to rmake #126231, Portrun-make/sysroot-crates-are-unstable
to rmake #129071)target-cpu-native
,target-specs
andtarget-without-atomic-cas
run-make
tests to rmake #127325)test-benches
,c-unwind-abi-catch-panic
andcompiler-lookup-paths-2
run-make
tests to rmake #127985)thumb-none-cortex-m
to rmake #128636)thumb-none-qemu
to rmake #128639)tools.mk(should be removed)use-suggestions-rust-2018
,overwrite-input
,lto-dylib-dep
andmany-crates-but-no-match
run-make
tests to rmake #127000)run-make/used
tormake.rs
#125988)--print
request #124333)version
test run-make as an UI test #123563)volatile-intrinsics
,weird-output-filenames
,wasm-override-linker
,wasm-exceptions-nostd
tormake
#126880)x86_64-fortanix-unknown-sgx-lvi
run-make
test to rmake #129055)emit
,mixing-formats
andbare-outfile
run-make
tests inrmake.rs
format #125383)core-no-oom-handling
,issue-24445
andissue-38237
run-make
tests to newrmake.rs
format #125421)rmake
forwindows-
run-make tests #125613)lto-smoke
,simple-rlib
andmixing-deps
run-make
tests inrmake.rs
format #125638)fpic
,simple-dylib
andissue-37893
run-make
tests inrmake.rs
or ui test format #125662)suspicious-library
,resolve-rename
andincr-prev-body-beyond-eof
run-make
tests inrmake.rs
format #125683)link-arg
,link-dedup
andissue-26092
run-make
tests tormake
format #125500)symlinked-extern
,symlinked-rlib
andsymlinked-libraries
run-make
tests inrmake.rs
format #125674)separate-link
,separate-link-fail
andallocator-shim-circular-deps
run-make
tests toui
orrmake
#126607)extern-flag-rename-transitive
.debugger-visualizer-dep-info
,metadata-flag-frobs-symbols
,extern-overrides-distribution
andforced-unwind-terminate-pof
run-make
tests to rmake #126644)unknown-mod-stdin
,issue-68794-textrel-on-minimal-lib
,raw-dylib-cross-compilation
andused-cdylib-macos
run-make
tests to rmake #126698)include_bytes_deps
,optimization-remarks-dir-pgo
,optimization-remarks-dir
,issue-40535
andrmeta-preferred
run-make
tests to rmake #126709)relocation-model
,error-writing-dependencies
andcrate-name-priority
run-make
tests to rmake #126712)relro-levels
,static-pie
tormake
#126715)The text was updated successfully, but these errors were encountered: