#!/bin/bash -e
# Copyright (C) 2015 Square, Inc.
# Copyright (C) 2014 CoreOS

source ./build

if [ -z "$PKG" ]; then
    PKG="cmd depot pkix tests"
fi

export BUILD_TAG="${TRAVIS_TAG:-$(git describe --all | sed -e's/.*\///g')}"

# Unit tests
echo
for mod in $PKG; do
  mod_path=$REPO_PATH/$mod
  go test -i $mod_path
  godep go test -v $mod_path
done
