#!/bin/bash

# Set failfast
# set -e
# set -o pipefail

echo "Happy Testing!"

pkgs=($(sed -n "s/\-e .\///p" requirements.txt | tr "\n" " "))

# Install testing requirements
cd src/test
pip install -r requirements.txt
cd ../..

for pkg in "${pkgs[@]}"
do
    printf "\n --- Running: package-tester %s --- \n" $pkg
    package-tester $pkg
done

echo "Package Tester has completed."
