Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

fstest/test_all: upload a copy of the report to "current"

Nick Craig-Wood07addf74fd42
diff --git a/fstest/test_all/report.go b/fstest/test_all/report.go
index a647239a2..ddc2167c1 100644
--- a/fstest/test_all/report.go
+++ b/fstest/test_all/report.go
@@ -242,14 +242,11 @@ func (r *Report) EmailHTML() {
_ = in.Close()
}
-// Upload uploads a copy of the report online
-func (r *Report) Upload() {
- if *uploadPath == "" || r.IndexHTML == "" {
- return
- }
- dst := path.Join(*uploadPath, r.DateTime)
+// uploadTo uploads a copy of the report online to the dir given
+func (r *Report) uploadTo(uploadDir string) {
+ dst := path.Join(*uploadPath, uploadDir)
log.Printf("Uploading results to %q", dst)
- cmdLine := []string{"rclone", "copy", "-v", r.LogDir, dst}
+ cmdLine := []string{"rclone", "sync", "--stats-log-level", "NOTICE", r.LogDir, dst}
cmd := exec.Command(cmdLine[0], cmdLine[1:]...)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
@@ -258,3 +255,14 @@ func (r *Report) Upload() {
log.Fatalf("Failed to upload results: %v", err)
}
}
+
+// Upload uploads a copy of the report online
+func (r *Report) Upload() {
+ if *uploadPath == "" || r.IndexHTML == "" {
+ return
+ }
+ // Upload into dated directory
+ r.uploadTo(r.DateTime)
+ // And again into current
+ r.uploadTo("current")
+}