github.com/rclone/rclone@v1.66.1-0.20240517100346-7b89735ae726/cmd/test/info/test.sh (about) 1 #!/usr/bin/env zsh 2 # 3 # example usage: 4 # $GOPATH/src/github.com/rclone/rclone/cmd/info/test.sh --list | \ 5 # parallel -P20 $GOPATH/src/github.com/rclone/rclone/cmd/info/test.sh 6 7 export PATH=$GOPATH/src/github.com/rclone/rclone:$PATH 8 9 typeset -A allRemotes 10 allRemotes=( 11 TestB2 '' 12 TestBox '' 13 TestDrive '--tpslimit=5' 14 TestCrypt '' 15 TestDropbox '--checkers=1' 16 TestGCS '' 17 TestJottacloud '' 18 TestKoofr '' 19 TestMega '' 20 TestOneDrive '' 21 TestOpenDrive '--low-level-retries=4 --checkers=5' 22 TestPcloud '--low-level-retries=2 --timeout=15s' 23 TestS3 '' 24 Local '' 25 ) 26 27 set -euo pipefail 28 29 if [[ $# -eq 0 ]]; then 30 set -- ${(k)allRemotes[@]} 31 elif [[ $1 = --list ]]; then 32 printf '%s\n' ${(k)allRemotes[@]} 33 exit 0 34 fi 35 36 for remote; do 37 case $remote in 38 Local) 39 l=Local$(uname) 40 export RCLONE_CONFIG_${l:u}_TYPE=local 41 dir=$l:infotest;; 42 TestGCS) 43 dir=$remote:$GCS_BUCKET/infotest;; 44 *) 45 dir=$remote:infotest;; 46 esac 47 48 rclone purge $dir || : 49 rclone info -vv $dir --write-json=info-$remote.json ${=allRemotes[$remote]:-} &> info-$remote.log 50 rclone ls -vv $dir &> info-$remote.list 51 done