#!/bin/sh
# autopkgtest check: Run the spades tests for each tool. 
# Author: Sascha Steinbiss <satta@debian.org>
set -ex

WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR

spades --test
coronaspades --test
metaspades --test
plasmidspades --test
rnaspades --test

# truspades is deprecated in v3.15 and may fail its own test suite.
if command -v truspades > /dev/null
then
	if ! truspades --test
	then echo 'W: truspades failed its self-test suite.'
	fi
else
	echo 'W: truspades is not provided upstream anymore.'
fi
