File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ pub fn measure(
22
22
artifact : & database:: ArtifactId ,
23
23
aid : database:: ArtifactIdNumber ,
24
24
) -> anyhow:: Result < ( ) > {
25
- checkout ( ) . context ( "checking out rust-lang/rust" ) ?;
25
+ checkout ( & artifact ) . context ( "checking out rust-lang/rust" ) ?;
26
26
27
27
// Run the compiler multiple times -- we'll call min(duration) on each crate
28
28
// later on. This should (hopefully) reduce variance.
@@ -144,12 +144,16 @@ fn record(
144
144
Ok ( ( ) )
145
145
}
146
146
147
- fn checkout ( ) -> anyhow:: Result < ( ) > {
147
+ fn checkout ( artifact : & ArtifactId ) -> anyhow:: Result < ( ) > {
148
148
if Path :: new ( "rust" ) . exists ( ) {
149
149
let status = Command :: new ( "git" )
150
150
. current_dir ( "rust" )
151
151
. arg ( "fetch" )
152
152
. arg ( "origin" )
153
+ . arg ( match artifact {
154
+ ArtifactId :: Commit ( c) => c. sha . as_str ( ) ,
155
+ ArtifactId :: Artifact ( id) => id. as_str ( ) ,
156
+ } )
153
157
. status ( )
154
158
. context ( "git fetch origin" ) ?;
155
159
assert ! ( status. success( ) , "git fetch successful" ) ;
You can’t perform that action at this time.
0 commit comments