]> git.proxmox.com Git - proxmox-backup.git/commitdiff
tests/pxar: increase verbosity
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 18 Dec 2019 10:46:05 +0000 (11:46 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 20 Dec 2019 11:55:32 +0000 (12:55 +0100)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
tests/pxar.rs

index cf162a53c53725ac2e453dc2b9313bab220178bb..cdb25e3fde5c607cfa6f151089d0265bd2847ac8 100644 (file)
@@ -24,6 +24,8 @@ fn pxar_create_and_extract() {
             panic!("Failed to invoke '{}': {}", exec_path, err)
         });
 
+    println!("run '{} extract archive.pxar {}'", exec_path, dest_dir);
+
     Command::new(exec_path)
         .arg("extract")
         .arg("./tests/archive.pxar")
@@ -34,6 +36,7 @@ fn pxar_create_and_extract() {
             panic!("Failed to invoke '{}': {}", exec_path, err)
         });
 
+    println!("run 'rsync --dry-run --itemize-changes --archive {} {}' to verify'", src_dir, dest_dir);
     /* Use rsync with --dry-run and --itemize-changes to compare
        src_dir and dest_dir */
     let stdout = Command::new("rsync")
@@ -49,7 +52,12 @@ fn pxar_create_and_extract() {
         .unwrap();
 
     let reader = BufReader::new(stdout);
-    let linecount = reader.lines().fold(0, |count, _| count + 1 );
+    let mut line_iter = reader.lines().map(|l| l.unwrap());
+    let mut linecount = 0;
+    while let Some(curr) = line_iter.next() {
+        println!("{}", curr);
+        linecount += 1;
+    }
     println!("Rsync listed {} differences to address", linecount);
 
     // Cleanup archive