#!/bin/sh run_test() { echo "Running backup on branch main; dest $1; num: $2..." /bin/bash scripts/backup.sh -b main -d $1 -n $2 echo diff -r $1 tests/tests_cases/$2 if test $? -ne 0 then echo "Test fail" exit 1 fi echo "... done" echo } ROOTDIR=$(git rev-parse --show-toplevel) TMPDIR=$(mktemp -d) cd ${ROOTDIR} run_test ${TMPDIR}/1 1 run_test ${TMPDIR}/2 2 run_test ${TMPDIR}/10 10 echo "All tests were OK"