#!/bin/sh
export THEANO_FLAGS=base_compiledir='$AUTOPKGTEST_TMP/theanocache',init_gpu_device=opencl0:0
testroot="/usr/lib/python3/dist-packages/theano"
conftestdir=$PWD
#Avoid importing the source tree
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=$conftestdir $testroot/gpuarray/tests/test_subtensor.py::G_advancedsubtensor::test_adv_sub_slice $testroot/gpuarray/tests/test_rng_mrg.py::test_GPUA_full_fill
