From eec0f55843fb22a8803131138ae0bc3122719ed1 Mon Sep 17 00:00:00 2001 From: Dominik Berner Date: Sat, 3 Aug 2019 16:00:09 +0200 Subject: [PATCH] Integrated version number check in installtion tests --- test/installation-tests.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/installation-tests.sh b/test/installation-tests.sh index 36adca32..590b2f27 100755 --- a/test/installation-tests.sh +++ b/test/installation-tests.sh @@ -51,5 +51,18 @@ testCpackInstallation(){ } +testVersionNumberConsistency() +{ + CHANGELOG_VERSION=$(sed -n -E '/## [0-9]+\.[0-9]+\.[0-9]+/p' ${ROOT_DIR}/CHANGELOG.md | head -1 | grep -E -o '[0-9]+\.[0-9]+\.[0-9]+') + ORIG_DIR=$(pwd) + cmake ${ROOT_DIR} -B${SI_BUILD_DIR} -DBUILD_TESTING=off -G Ninja + cd ${SI_BUILD_DIR} + CMAKE_VERSION=$(cmake --system-information|grep -E "VERSION:STATIC"|grep -E -o '[0-9]+\.[0-9]+\.[0-9]+') + cd ${ORIG_DIR} + + assertEquals "version in changelog (${CHANGELOG_VERSION}) does not match cmake version (${CMAKE_VERSION})" $CHANGELOG_VERSION $CMAKE_VERSION + +} + # Load shUnit2. . shunit2 \ No newline at end of file