Skip to content

Commit 1818903

Browse files
committed
integration: run git checkout in git repo!
1 parent 0a79d65 commit 1818903

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/integration.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,11 @@ fn integration_test_rustc() {
175175
.strip_prefix("commit-hash: ")
176176
.expect("failed parsing commit line");
177177

178+
dbg!(&commit);
178179
// check out the commit in the rustc repo to ensure clippy is compatible
179180

180181
let st_git_checkout = Command::new("git")
182+
.current_dir(&repo_dir)
181183
.arg("checkout")
182184
.arg(commit)
183185
.status()
@@ -186,15 +188,15 @@ fn integration_test_rustc() {
186188

187189
let root_dir = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"));
188190
let target_dir = std::path::Path::new(&root_dir).join("target");
189-
let clippy_binary = target_dir.join(env!("PROFILE")).join(CARGO_CLIPPY);
191+
// let clippy_binary = target_dir.join(env!("PROFILE")).join(CARGO_CLIPPY);
190192

191193
// we need to make sure that `x.py clippy` picks up our self-built clippy
192194
// try to make the target dir discoverable as PATH
193195

194196
let path_env = target_dir.join(env!("PROFILE"));
195197

196198
let output = Command::new("x.py")
197-
.current_dir("rust")
199+
.current_dir(&repo_dir)
198200
.env("RUST_BACKTRACE", "full")
199201
.env("PATH", path_env)
200202
.args(["clippy", "-Wclippy::pedantic", "-Wclippy::nursery"])

0 commit comments

Comments
 (0)