From 71f92bb8123a1307bb52af63b13637d774c744eb Mon Sep 17 00:00:00 2001 From: Chris Simpkins Date: Sat, 29 Feb 2020 23:54:13 -0500 Subject: [PATCH 1/6] [tidy] update documentation from `make check` to `x.py test` --- src/tools/tidy/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/tidy/src/main.rs b/src/tools/tidy/src/main.rs index ec8b14c288a2f..0b43396505138 100644 --- a/src/tools/tidy/src/main.rs +++ b/src/tools/tidy/src/main.rs @@ -1,8 +1,8 @@ //! Tidy checks source code in this repository. //! //! This program runs all of the various tidy checks for style, cleanliness, -//! etc. This is run by default on `make check` and as part of the auto -//! builders. +//! etc. This is run by default on `./x.py test` and as part of the auto +//! builders. The tidy checks can be executed with `./x.py test src/tools/tidy`. #![deny(warnings)] From 0982c58edc5b9fe4cfc8b22bc3edaa95e4f5c638 Mon Sep 17 00:00:00 2001 From: Chris Simpkins Date: Mon, 9 Mar 2020 21:40:00 -0400 Subject: [PATCH 2/6] update tidy documentation to recommend ./x.py test tidy --- src/tools/tidy/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/tidy/src/main.rs b/src/tools/tidy/src/main.rs index 0b43396505138..909529d730784 100644 --- a/src/tools/tidy/src/main.rs +++ b/src/tools/tidy/src/main.rs @@ -2,7 +2,7 @@ //! //! This program runs all of the various tidy checks for style, cleanliness, //! etc. This is run by default on `./x.py test` and as part of the auto -//! builders. The tidy checks can be executed with `./x.py test src/tools/tidy`. +//! builders. The tidy checks can be executed with `./x.py test tidy`. #![deny(warnings)] From 259b06e33f533096f0b46beca8719fd4afceb78b Mon Sep 17 00:00:00 2001 From: Chris Simpkins Date: Mon, 9 Mar 2020 21:55:56 -0400 Subject: [PATCH 3/6] add documentation of x.py tool testing --- src/bootstrap/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bootstrap/README.md b/src/bootstrap/README.md index c501378bff549..87da7327fe619 100644 --- a/src/bootstrap/README.md +++ b/src/bootstrap/README.md @@ -55,6 +55,9 @@ The script accepts commands, flags, and arguments to determine what to do: # run all unit tests ./x.py test + # execute tool tests + ./x.py test tidy + # execute the UI test suite ./x.py test src/test/ui From 9f734c978c4c32eea552d45fef582804c1d2b9bf Mon Sep 17 00:00:00 2001 From: Chris Simpkins Date: Mon, 9 Mar 2020 22:04:59 -0400 Subject: [PATCH 4/6] Add documentation of tool testing with x.py script --- src/bootstrap/flags.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs index 516be6a30c235..a8b76c44f79d3 100644 --- a/src/bootstrap/flags.rs +++ b/src/bootstrap/flags.rs @@ -359,7 +359,7 @@ Arguments: subcommand_help.push_str( "\n Arguments: - This subcommand accepts a number of paths to directories to tests that + This subcommand accepts a number of paths to test directories that should be compiled and run. For example: ./x.py test src/test/ui @@ -367,11 +367,15 @@ Arguments: ./x.py test src/libstd --stage 0 --no-doc ./x.py test src/test/ui --bless ./x.py test src/test/ui --compare-mode nll - + Note that `test src/test/* --stage N` does NOT depend on `build src/rustc --stage N`; just like `build src/libstd --stage N` it tests the compiler produced by the previous stage. + Execute tool tests with a tool name argument: + + ./x.py test tidy + If no arguments are passed then the complete artifacts for that stage are compiled and tested. From 4922b683de170c70260b73426ccf16172fa63b7f Mon Sep 17 00:00:00 2001 From: Chris Simpkins Date: Mon, 9 Mar 2020 22:15:41 -0400 Subject: [PATCH 5/6] remove trailing whitespace (tidy) --- src/bootstrap/flags.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs index a8b76c44f79d3..4b04ee84c31db 100644 --- a/src/bootstrap/flags.rs +++ b/src/bootstrap/flags.rs @@ -367,7 +367,7 @@ Arguments: ./x.py test src/libstd --stage 0 --no-doc ./x.py test src/test/ui --bless ./x.py test src/test/ui --compare-mode nll - + Note that `test src/test/* --stage N` does NOT depend on `build src/rustc --stage N`; just like `build src/libstd --stage N` it tests the compiler produced by the previous stage. From c60d581eb15d6fbe17a657da7c1de4dc82b70b68 Mon Sep 17 00:00:00 2001 From: Chris Simpkins Date: Mon, 9 Mar 2020 23:00:41 -0400 Subject: [PATCH 6/6] update x.py tidy testing command --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d6840b20c89ac..a58d4f2a7c6a4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -142,7 +142,7 @@ the issue in question. Please make sure your pull request is in compliance with Rust's style guidelines by running - $ python x.py test src/tools/tidy + $ python x.py test tidy Make this check before every pull request (and every new commit in a pull request); you can add [git hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks)