From 43f04e12add4dc15bbbb215467781ee3b2b228b8 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 8 Aug 2023 08:40:31 +0000 Subject: [PATCH] Bump ui_test crate --- Cargo.toml | 2 +- tests/compile-test.rs | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index dcdd2161d754..6730888f58a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ tempfile = { version = "3.2", optional = true } termize = "0.1" [dev-dependencies] -ui_test = "0.13" +ui_test = "0.15" tester = "0.9" regex = "1.5" toml = "0.7.3" diff --git a/tests/compile-test.rs b/tests/compile-test.rs index af2e87715b45..fd7839ba7f94 100644 --- a/tests/compile-test.rs +++ b/tests/compile-test.rs @@ -201,9 +201,10 @@ fn run_ui() { let quiet = args.quiet; compiletest::run_tests_generic( - config, + vec![config], + std::thread::available_parallelism().unwrap(), args, - move |path, args| compiletest::default_file_filter(path, args) && test_filter(path), + move |path, args, config| compiletest::default_file_filter(path, args, config) && test_filter(path), compiletest::default_per_file_config, if quiet { status_emitter::Text::quiet() @@ -227,9 +228,10 @@ fn run_internal_tests() { let quiet = args.quiet; compiletest::run_tests_generic( - config, + vec![config], + std::thread::available_parallelism().unwrap(), args, - move |path, args| compiletest::default_file_filter(path, args) && test_filter(path), + move |path, args, config| compiletest::default_file_filter(path, args, config) && test_filter(path), compiletest::default_per_file_config, if quiet { status_emitter::Text::quiet() @@ -259,16 +261,15 @@ fn run_ui_toml() { let quiet = args.quiet; ui_test::run_tests_generic( - config, + vec![config], + std::thread::available_parallelism().unwrap(), args, - |path, args| compiletest::default_file_filter(path, args) && test_filter(path), - |config, path| { - let mut config = config.clone(); + |path, args, config| compiletest::default_file_filter(path, args, config) && test_filter(path), + |config, path, _file_contents| { config .program .envs .push(("CLIPPY_CONF_DIR".into(), Some(path.parent().unwrap().into()))); - Some(config) }, if quiet { status_emitter::Text::quiet() @@ -318,11 +319,11 @@ fn run_ui_cargo() { let quiet = args.quiet; ui_test::run_tests_generic( - config, + vec![config], + std::thread::available_parallelism().unwrap(), args, - |path, _args| test_filter(path) && path.ends_with("Cargo.toml"), - |config, path| { - let mut config = config.clone(); + |path, _args, _config| test_filter(path) && path.ends_with("Cargo.toml"), + |config, path, _file_contents| { config.out_dir = canonicalize( std::env::current_dir() .unwrap() @@ -330,7 +331,6 @@ fn run_ui_cargo() { .join("ui_test_cargo/") .join(path.parent().unwrap()), ); - Some(config) }, if quiet { status_emitter::Text::quiet()