File: win_test_rdiffbackup.sh

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 (40 lines) | stat: -rw-r--r-- 898 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
BITS=$1
PYTHON_VERSION=$2
PYDIRECT=$3

if [[ ${BITS} == *32 ]] || [[ ${BITS} == *86 ]]
then
	bits=32
	lib_win_bits=Win32
	py_win_bits=win32
elif [[ ${BITS} == *64 ]]
then
	bits=64
	lib_win_bits=x64
	py_win_bits=win-amd64
else
	echo "ERROR: bits size must be 32 or 64, not '${BITS}'." >&2
	exit 1
fi

PYEXE=python.exe
if [[ -n ${PYDIRECT} ]]
then
	py_dir=C:/Python${bits}
	PYEXE=${py_dir}/${PYEXE}
fi

LIBRSYNC_DIR=${HOME}/librsync${bits}
export LIBRSYNC_DIR

ver_name=rdiff-backup-$(${PYEXE} setup.py --version)
py_ver_brief=${PYTHON_VERSION%.[0-9]}

# Extract the test files one directory higher
pushd ..
git clone --depth 1 https://github.com/rdiff-backup/rdiff-backup-filesrepo.git rdiff-backup-filesrepo
# ignore the one "Can not create hard link" error
7z x rdiff-backup-filesrepo/rdiff-backup_testfiles.tar || true
popd
# Then execute the necessary tests
${PYEXE} -m tox -c tox_win.ini -e py