#!/bin/sh
set -e
cd "$AUTOPKGTEST_TMP"
for py in `py3versions -s 2>/dev/null` ; do 
    echo "Testing with $py:"
    clinfo || true
    ulimit -a || true
    if [ `dpkg --print-architecture` = armel -o `dpkg --print-architecture` = armhf ] ; then
        # workaround/test for #997908
        DEVICE=opencl0:0 $py -m nose -v pygpu.tests || POCL_DEVICES=basic DEVICE=opencl0:0 $py -m nose -v pygpu.tests
    else
        DEVICE=opencl0:0 $py -m nose -v pygpu.tests
    fi
done
