#!/bin/sh -ex

export LC_ALL=C.UTF-8

QUILT_PATCHES=debian/patches quilt push -a || true
mkdir ${HOME}/tmp

TMPDIR=${HOME}/tmp TOIL_TEST_QUICK=True TOIL_SKIP_DOCKER=True python3 -m pytest \
	-n auto --dist loadscope \
	--junit-xml=$AUTOPKGTEST_ARTIFACTS/toil-tests-junit.xml \
	-vv -rs -W ignore -k "not (test_bioconda or AWSJobStoreTest or \
	awsjobstoretest or testCwlexample or CWLv10Test or CWLv11Test or \
	CWLv12Test or AWSAutoscaleTest or AWSStaticAutoscaleTest or \
	AWSManagedAutoscaleTest or AWSAutoscaleTestMultipleNodeTypes or \
	AWSRestartTest or PreemptableDeficitCompensationTest or ToilDocumentationTest \
	or test_cwl_toil_kill or testImportReadFileCompatibility or testBuiltIn \
	or testVirtualEnv or CleanWorkDirTest or CWLOnARMTest or WdlLanguageSpecWorkflowsTest \
	or ToilWdlIntegrationTest or ToilWdlIntegrationTest or ToilDebugFileTest or WdlToilTest)" \
	--ignore /usr/lib/python3/dist-packages/toil/test/cwl/cwlTest.py \
	--ignore /usr/lib/python3/dist-packages/toil/test/lib/aws/test_s3.py \
	--ignore /usr/lib/python3/dist-packages/toil/test/lib/aws/test_iam.py \
	--ignore /usr/lib/python3/dist-packages/toil/test/provisioners/aws/awsProvisionerTest.py \
	--pyargs toil.test

QUILT_PATCHES=debian/patches quilt pop -a || true

