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

build: add example scripts for bisecting rclone and go

Nick Craig-Woodb3d8bc61acea
diff --git a/bin/bisect-go-rclone.sh b/bin/bisect-go-rclone.sh
new file mode 100755
index 000000000..8dffee301
--- /dev/null
+++ b/bin/bisect-go-rclone.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+# An example script to run when bisecting go with git bisect -run when
+# looking for an rclone regression
+
+# Run this from the go root
+
+set -e
+
+# Compile the go version
+cd src
+./make.bash
+
+# Make sure we are using it
+source ~/bin/use-go1.11
+go version
+
+# Compile rclone
+cd ~/go/src/github.com/ncw/rclone
+make
+
+# run the failing test
+go run -race race.go
diff --git a/bin/bisect-rclone.sh b/bin/bisect-rclone.sh
new file mode 100755
index 000000000..c48ab2da9
--- /dev/null
+++ b/bin/bisect-rclone.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# Example script for git-bisect -run
+# Run from the project root
+
+set -e
+
+# Compile
+make
+rclone version
+
+# Test whatever it is that is going wrong
+truncate -s 10M /tmp/10M
+rclone delete azure:rclone-test1/10M || true
+rclone --retries 1 copyto -vv /tmp/10M azure:rclone-test1/10M --azureblob-upload-cutoff 1M