Skip to content

Commit 4237e5d

Browse files
committed
remove --config flags from unit test configs
Signed-off-by: onur-ozkan <[email protected]>
1 parent 9d21178 commit 4237e5d

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

src/bootstrap/src/core/config/tests.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ use crate::core::build_steps::clippy::get_clippy_rules_in_order;
1212
use crate::core::config::{LldMode, Target, TargetSelection, TomlConfig};
1313

1414
fn parse(config: &str) -> Config {
15-
Config::parse_inner(&["check".to_string(), "--config=/does/not/exist".to_string()], |&_| {
16-
toml::from_str(&config).unwrap()
17-
})
15+
Config::parse_inner(&["check".to_string()], |&_| toml::from_str(&config).unwrap())
1816
}
1917

2018
#[test]
@@ -110,7 +108,6 @@ fn override_toml() {
110108
let config = Config::parse_inner(
111109
&[
112110
"check".to_owned(),
113-
"--config=/does/not/exist".to_owned(),
114111
"--set=change-id=1".to_owned(),
115112
"--set=rust.lto=fat".to_owned(),
116113
"--set=rust.deny-warnings=false".to_owned(),
@@ -201,12 +198,7 @@ runner = "x86_64-runner"
201198
#[should_panic]
202199
fn override_toml_duplicate() {
203200
Config::parse_inner(
204-
&[
205-
"check".to_owned(),
206-
"--config=/does/not/exist".to_string(),
207-
"--set=change-id=1".to_owned(),
208-
"--set=change-id=2".to_owned(),
209-
],
201+
&["check".to_owned(), "--set=change-id=1".to_owned(), "--set=change-id=2".to_owned()],
210202
|&_| toml::from_str("change-id = 0").unwrap(),
211203
);
212204
}

src/bootstrap/src/utils/helpers/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fn test_check_cfg_arg() {
5858

5959
#[test]
6060
fn test_program_out_of_date() {
61-
let config = Config::parse(&["check".to_owned(), "--config=/does/not/exist".to_owned()]);
61+
let config = Config::parse(&["check".to_owned()]);
6262
let tempfile = config.tempdir().join(".tmp-stamp-file");
6363
File::create(&tempfile).unwrap().write_all(b"dummy value").unwrap();
6464
assert!(tempfile.exists());
@@ -73,7 +73,7 @@ fn test_program_out_of_date() {
7373

7474
#[test]
7575
fn test_symlink_dir() {
76-
let config = Config::parse(&["check".to_owned(), "--config=/does/not/exist".to_owned()]);
76+
let config = Config::parse(&["check".to_owned()]);
7777
let tempdir = config.tempdir().join(".tmp-dir");
7878
let link_path = config.tempdir().join(".tmp-link");
7979

0 commit comments

Comments
 (0)