Skip to content
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

Rollup of 10 pull requests #109438

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9261fd0
Nested impl traits trigger opaque_hidden_inferred_bound too much
compiler-errors Feb 27, 2023
d7049ca
add the --json flag to compiletest
pietroalbini Mar 1, 2023
d2f3806
render compiletest output with render_tests
pietroalbini Mar 2, 2023
f96774b
add support for terse output
pietroalbini Mar 2, 2023
f816d3a
add a splash of color
pietroalbini Mar 2, 2023
9388c8e
record tests in build metrics
pietroalbini Mar 2, 2023
b14b355
add support for benchmarks
pietroalbini Mar 2, 2023
50b3583
switch all tests to use render_tests
pietroalbini Mar 2, 2023
ad9a444
avoid overlapping stderr
pietroalbini Mar 2, 2023
f23e205
do not use render_tests for clippy
pietroalbini Mar 2, 2023
9a1ff1b
handle non-json output in stdout
pietroalbini Mar 3, 2023
4958272
change approach to prevent interleaving compiletest message
pietroalbini Mar 3, 2023
3248ab7
fix name of the field containing the ignore reason
pietroalbini Mar 6, 2023
c015d0d
switch to termcolor
pietroalbini Mar 7, 2023
f7a9702
rustdoc: Cleanup parent module tracking for doc links
petrochenkov Mar 18, 2023
ae47810
rustdoc: Factor out some doc link resolution code into a separate fun…
petrochenkov Mar 19, 2023
69a82f7
add myself to mailmap
aDotInTheVoid Mar 19, 2023
9f80c75
Walk un-shifted nested `impl Trait` in trait when setting up default …
compiler-errors Mar 16, 2023
239ec6c
drive-by: Fix a comment in TyCtxt::fold_regions and remove an unused …
compiler-errors Mar 17, 2023
5b4fa5b
fix typo
lcnr Mar 20, 2023
8e4e55e
Support aggregate expressions
cbeuw Mar 20, 2023
e24f5ac
Fix off-by-one in mir syntax doc
cbeuw Mar 20, 2023
f404f33
Use builtin_index instead of match
cbeuw Mar 20, 2023
e4a4064
adapt tests/codegen/vec-shrink-panik for LLVM 17
krasimirgg Mar 20, 2023
5058cc8
not *all* retags might be explicit in Runtime MIR
RalfJung Mar 20, 2023
93eeb12
Refactor `handle_missing_lit`.
nnethercote Feb 1, 2023
3ecc354
Rollup merge of #108541 - compiler-errors:lol-nested-rpits, r=oli-obk
Noratrieb Mar 21, 2023
d3749f0
Rollup merge of #108659 - ferrocene:pa-test-metrics, r=Mark-Simulacrum
Noratrieb Mar 21, 2023
38e6c35
Rollup merge of #109240 - compiler-errors:dont-binder-twice, r=oli-obk
Noratrieb Mar 21, 2023
3d6676a
Rollup merge of #109312 - petrochenkov:docice5, r=GuillaumeGomez
Noratrieb Mar 21, 2023
17c9f27
Rollup merge of #109385 - lcnr:typo, r=Dylan-DPC
Noratrieb Mar 21, 2023
bb98a8e
Rollup merge of #109386 - aDotInTheVoid:mailmap, r=WaffleLapkin
Noratrieb Mar 21, 2023
a352a17
Rollup merge of #109390 - cbeuw:aggregate-lit, r=oli-obk
Noratrieb Mar 21, 2023
aa8d357
Rollup merge of #109394 - krasimirgg:llvm-17-vec-panic, r=nikic
Noratrieb Mar 21, 2023
27a9dcf
Rollup merge of #109408 - RalfJung:retags, r=compiler-errors
Noratrieb Mar 21, 2023
b567a1c
Rollup merge of #109415 - nnethercote:refactor-handle_missing_lit, r=…
Noratrieb Mar 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add the --json flag to compiletest
  • Loading branch information
pietroalbini committed Mar 2, 2023
commit d7049cabd0a370ac5af8b4f03ce836b3f9384d98
4 changes: 2 additions & 2 deletions src/tools/compiletest/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::str::FromStr;

use crate::util::{add_dylib_path, PathBufExt};
use lazycell::LazyCell;
use test::ColorConfig;
use test::{ColorConfig, OutputFormat};

#[derive(Clone, Copy, PartialEq, Debug)]
pub enum Mode {
Expand Down Expand Up @@ -337,7 +337,7 @@ pub struct Config {
pub verbose: bool,

/// Print one character per test instead of one line
pub quiet: bool,
pub format: OutputFormat,

/// Whether to use colors in test.
pub color: ColorConfig,
Expand Down
12 changes: 9 additions & 3 deletions src/tools/compiletest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
)
.optflag("", "quiet", "print one character per test instead of one line")
.optopt("", "color", "coloring: auto, always, never", "WHEN")
.optflag("", "json", "emit json output instead of plaintext output")
.optopt("", "logfile", "file to log test execution to", "FILE")
.optopt("", "target", "the target to build for", "TARGET")
.optopt("", "host", "the host to build for", "HOST")
Expand Down Expand Up @@ -281,7 +282,12 @@ pub fn parse_config(args: Vec<String>) -> Config {
&& !opt_str2(matches.opt_str("adb-test-dir")).is_empty(),
lldb_python_dir: matches.opt_str("lldb-python-dir"),
verbose: matches.opt_present("verbose"),
quiet: matches.opt_present("quiet"),
format: match (matches.opt_present("quiet"), matches.opt_present("json")) {
(true, true) => panic!("--quiet and --json are incompatible"),
(true, false) => test::OutputFormat::Terse,
(false, true) => test::OutputFormat::Json,
(false, false) => test::OutputFormat::Pretty,
},
only_modified: matches.opt_present("only-modified"),
color,
remote_test_client: matches.opt_str("remote-test-client").map(PathBuf::from),
Expand Down Expand Up @@ -339,7 +345,7 @@ pub fn log_config(config: &Config) {
logv(c, format!("ar: {}", config.ar));
logv(c, format!("linker: {:?}", config.linker));
logv(c, format!("verbose: {}", config.verbose));
logv(c, format!("quiet: {}", config.quiet));
logv(c, format!("format: {:?}", config.format));
logv(c, "\n".to_string());
}

Expand Down Expand Up @@ -501,7 +507,7 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
filters: config.filters.clone(),
filter_exact: config.filter_exact,
run_ignored: if config.run_ignored { test::RunIgnored::Yes } else { test::RunIgnored::No },
format: if config.quiet { test::OutputFormat::Terse } else { test::OutputFormat::Pretty },
format: config.format,
logfile: config.logfile.clone(),
run_tests: true,
bench_benchmarks: true,
Expand Down