File: run-unit-test

package info (click to toggle)
nipype 1.9.2-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 15,364 kB
  • sloc: python: 156,496; javascript: 9,246; tcl: 608; sh: 485; makefile: 168
file content (38 lines) | stat: -rw-r--r-- 936 bytes parent folder | download | duplicates (3)
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
#!/bin/bash
set -efu

pkg='nipype'
CUR_DIR=`pwd`

QUILT_PATCHES=debian/patches quilt push -a || true

export LC_ALL=C.UTF-8
if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
  trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
fi

cp -a ${CUR_DIR}/nipype "${AUTOPKGTEST_TMP}"
cp -a ${CUR_DIR}/debian/tests/test_sample.py "${AUTOPKGTEST_TMP}/nipype/tests"
cd "${AUTOPKGTEST_TMP}"

SKIP_TEST="not nipype.interfaces.io.BIDSDataGrabber"
arch=$(dpkg-architecture -qDEB_HOST_ARCH)
# skip tests
if [ "$arch" = "s390x" ]; then
    SKIP_TEST=$SKIP_TEST" and not nipype.interfaces.mixins.fixheader.CopyHeaderInterface"
fi

echo "Skip following Tests: $SKIP_TEST"

for py in $(py3versions -s 2> /dev/null)
do
    echo "Testing with $py in $(pwd):"
    $py -m pytest -v --doctest-modules -k "$SKIP_TEST" nipype

done

cd ${CUR_DIR}
QUILT_PATCHES=debian/patches quilt pop -a || true

echo "PASS"