#!/bin/sh

set -e

if ! [ -d "$ADTTMP" ]; then
	echo "ADTTMP not set." >&2
	exit 1
fi

export LIBGUESTFS_MEMSIZE=128
if [ "$(basename "$0")" = "pytest-with-recommends" ]; then
    export DIFFOSCOPE_FAIL_TESTS_ON_MISSING_TOOLS="apktool zipinfo pedump oggDump ppudump cbfstool otool lipo"
fi

cp -r tests "$ADTTMP"
(cd "$ADTTMP"; py.test-3 -vv -l -r a)
