#!/bin/sh
export THEANO_FLAGS=base_compiledir='$AUTOPKGTEST_TMP/theanocache',init_gpu_device=opencl0:0
#Avoid importing the source tree
sourcetestroot="$PWD/tests"
cd $AUTOPKGTEST_TMP
#workaround for #997908
if [ `dpkg --print-architecture` = armel -o `dpkg --print-architecture` = armhf ] ; then
    export POCL_DEVICES=basic
fi

#Check that GPU use isn't totally broken
#(it is known to not be complete under OpenCL)
python3 -m pytest -s -v --confcutdir=$sourcetestroot/.. $sourcetestroot/gpuarray/test_subtensor.py::TestGPUAdvancedSubtensor::test_adv_sub_slice
