diff --git a/bin/gvm-pkg-install b/bin/gvm-pkg-install index 0e890f7..2b4c7f1 100755 --- a/bin/gvm-pkg-install +++ b/bin/gvm-pkg-install @@ -20,8 +20,8 @@ function download_package() { function select_version() { if [ "$version" != "" ]; then - cd $source_dir && git pull && - git checkout $version > /dev/null 2>&1 + cd $source_dir && git pull &> /dev/null && + git checkout $version &> /dev/null if [[ $? -ne 0 ]]; then echo "Invalid version $version" exit 1 @@ -81,6 +81,13 @@ function build_package() { cat "$build_dir/build.log" exit 1 fi + echo "Running tests..." + cd $source_dir && gvmake test >> $build_dir/build.log 2>&1 + if [ $? -ne 0 ]; then + echo "ERROR: Failed tests" + cat "$build_dir/build.log" + exit 1 + fi } function install_package() {