#!/bin/bash
set -e

pkg=mptp

if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
  trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
fi

cp /usr/share/doc/${pkg}/examples/* -a "${AUTOPKGTEST_TMP}"

cd "${AUTOPKGTEST_TMP}"
gunzip -r *

echo 'Test 1'
mptp --ml --multi --tree_file RAxML_bestTree.Clubiona --minbr 0.0009330519 --output_file out --outgroup A,C --tree_show
echo 'PASS'

echo 'Test 2'
mptp --mcmc 50000000 --multi --mcmc_sample 1000000 --mcmc_burnin 1000000 --tree_file RAxML_bestTree.Clubiona --output_file out
echo 'PASS'

