Files
git-upstream/functional-tests/010-test_version_check.sh
Davide Guerri 8e066904b5 Add functional test framework and some basic tests
hpgit lacks of functional tests that ensure it works as expected and
that can be used to automate code verifications.
Functional tests will help to improve hpgit software quality.

JIRA: CICD-1089
Change-Id: Id9764b93c504da3fcc8d8c56415120536388a432
2014-02-03 17:14:46 +00:00

25 lines
473 B
Bash
Executable File

#!/bin/bash
BASE_DIR=$(cd $(dirname $0); pwd -P)
# Include and run common test functions and initializations
source $BASE_DIR/libs/logging.lib
source $BASE_DIR/libs/utils.lib
function test_version_output() {
log DEBUG "Starting $TEST_NAME::$FUNCNAME"
git-hp --version >/dev/null 2>&1
return $?
}
TESTS="test_version_output"
for test in $TESTS; do
$test && log INFO "$TEST_NAME::$test() passed." || \
log ERROR "$TEST_NAME::$test() failed!"
done