diff --git a/e2e_tests/tests/fixture/vm.rs b/e2e_tests/tests/fixture/vm.rs index f08157aba8..b0126c6960 100644 --- a/e2e_tests/tests/fixture/vm.rs +++ b/e2e_tests/tests/fixture/vm.rs @@ -170,7 +170,6 @@ impl TestVm { let kernel_path = kernel_path(); if env::var("CROSVM_CARGO_TEST_KERNEL_BINARY").is_err() { if !kernel_path.exists() { - println!("Downloading kernel prebuilt:"); download_file(&kernel_prebuilt_url(), &kernel_path).unwrap(); } } @@ -179,7 +178,6 @@ impl TestVm { let rootfs_path = rootfs_path(); if env::var("CROSVM_CARGO_TEST_ROOTFS_IMAGE").is_err() { if !rootfs_path.exists() { - println!("Downloading rootfs prebuilt:"); download_file(&rootfs_prebuilt_url(), &rootfs_path).unwrap(); } } diff --git a/prebuilts/src/lib.rs b/prebuilts/src/lib.rs index fe3b685638..7c61f927e7 100644 --- a/prebuilts/src/lib.rs +++ b/prebuilts/src/lib.rs @@ -80,9 +80,11 @@ pub fn download_file(url: &str, destination: &Path) -> Result<()> { // Another process may have already downloaded this since we last checked. if destination.exists() { + println!("Prebuilt {destination:?} has already been downloaded by another process."); return Ok(()); } + println!("Downloading prebuilt {url} to {destination:?}"); let mut cmd = sys::download_command(url, destination); match cmd.status() { Ok(exit_code) => {