File: files

package info (click to toggle)
rdiff-backup 2.2.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,640 kB
  • sloc: python: 24,129; javascript: 9,512; sh: 1,230; ansic: 580; makefile: 36
file content (68 lines) | stat: -rw-r--r-- 1,532 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/sh

set -eux

# Address Shellcheck undefined variable warning (SC2154) by defining a fall-back
# value in case this script was ever called by something that hadn't defined it
AUTOPKGTEST_TMP="${AUTOPKGTEST_TMP:-'/tmp'}"

export RDIFF_TEST_UID=1000

if id "${RDIFF_TEST_UID}" 2>&1 /dev/null
then
    user=$(id -un "${RDIFF_TEST_UID}")
    group=$(id -gn "${RDIFF_TEST_UID}")
else
    user="test"
    group=${user}
    useradd --uid "${RDIFF_TEST_UID}" --user-group "${user}"
fi

export RDIFF_TEST_USER="${user}"
export RDIFF_TEST_GROUP="${group}"


# Download test files and set them up accordingly
wget -qP "${AUTOPKGTEST_TMP}" \
    https://raw.githubusercontent.com/rdiff-backup/rdiff-backup-filesrepo/d85cf80b6c1ab1db89401f65d8a4600996c335eb/rdiff-backup_testfiles.tar

# Tests expect files to be available in the parent directory under
# rdiff-backup_testfiles directory
tar -xvf "${AUTOPKGTEST_TMP}/rdiff-backup_testfiles.tar" \
    --owner="${RDIFF_TEST_USER}":"${RDIFF_TEST_UID}" \
    --group="${RDIFF_TEST_GROUP}" \
    -C ..

# Setup test environment
python3 testing/commontest.py

tests="
backuptest.py
cmdlinetest.py
comparetest.py
connectiontest.py
FilenameMappingtest.py
hardlinktest.py
incrementtest.py
killtest.py
longnametest.py
metadatatest.py
rdiffbackupdeletetest.py
rdifftest.py
regresstest.py
robusttest.py
roottest.py
rpathtest.py
securitytest.py
selectiontest.py
statisticstest.py
"

for test in ${tests}
do
    python3 "testing/${test}"
done

testing/makerestoretest3

python3 testing/restoretest.py