Commit b506ddef authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Change test to check that all needed parts are included by apa

parent 45fc6f10
SOURCE_hashbackup = command.py config.py loghandler.py hashtoc.py \
primary.py secondary.py
primary.py secondary.py tar_stream.py
all: md5backup sha512backup
......
......@@ -47,27 +47,43 @@ config > "${TESTDIR}/2/TOTALBACKUP.config"
#config
#../config.py <(config)
../sha512backup --xattr --primary <(config) 2> /dev/null
cp ../sha512backup "${TESTDIR}/"
${TESTDIR}/sha512backup --xattr --primary <(config) 2> /dev/null
# Check that source and dest are equal
diff -u <(cd ../test ; find | sort) <(cd ${TESTDIR}/1/test ; find | sort)
diff -u <(cd ../.git/refs ; find | sort) <(cd ${TESTDIR}/2/.git/refs ; find | sort)
diff -u \
<(cd ../test ; find | sort) \
<(cd ${TESTDIR}/1/test ; find | sort)
diff -u \
<(cd ../.git/refs ; find | sort) \
<(cd ${TESTDIR}/2/.git/refs ; find | sort)
# Delete temporary file
rm ${TESTFILE}
# Make sure source and dest differs
! diff -u <(cd ../test ; find | sort) <(cd ${TESTDIR}/1/test ; find | sort)
diff -u <(cd ../.git/refs ; find | sort) <(cd ${TESTDIR}/2/.git/refs ; find | sort)
! \
diff -u \
<(cd ../test ; find | sort) \
<(cd ${TESTDIR}/1/test ; find | sort)
diff -u \
<(cd ../test ; find | sort) \
<(cd ${TESTDIR}/1/test ; find | grep -v "${TESTFILE}" | sort)
diff -u \
<(cd ../.git/refs ; find | sort) \
<(cd ${TESTDIR}/2/.git/refs ; find | sort)
# Bring dest to sync
../sha512backup --xattr --primary <(config) 2> /dev/null
${TESTDIR}/sha512backup --xattr --primary <(config) 2> /dev/null
# Check that source and dest are equal
diff -u <(cd ../test ; find | sort) <(cd ${TESTDIR}/1/test ; find | sort)
diff -u <(cd ../.git/refs ; find | sort) <(cd ${TESTDIR}/2/.git/refs ; find | sort)
diff -u \
<(cd ../test ; find | sort) \
<(cd ${TESTDIR}/1/test ; find | sort)
diff -u \
<(cd ../.git/refs ; find | sort) \
<(cd ${TESTDIR}/2/.git/refs ; find | sort)
# Check that deleted file exists in TRASH
[ -f ${TESTDIR}/1/TRASH/*/${TESTFILE} ]
# ../md5backup --xattr --primary <(config)
# find ${TESTDIR}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment