#!/bin/bash

NAME=$1
[[ -z "${NAME}" ]] && NAME=all && rm -fv output/*.wav output/*.txt

echo "Building unit tests..."
./build || exit 1

echo "Running unit tests..."
./unittest ${NAME} || exit 1

echo "Verifying output audio..."
sha256sum -c audio_hash.txt || exit 1

echo "Unit tests: PASS"
exit 0
