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