From 3fe1e1804a5616e1d156be9252db355a67753553 Mon Sep 17 00:00:00 2001 From: jenkins Date: Sat, 3 Mar 2012 00:05:28 +0000 Subject: [PATCH] Fixing minor log issue and add tests --- bin/gvm-pkg-install | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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() {