Skip to content

Commit

Permalink
test-package: Rework help/version fix to mirror regression-new/help
Browse files Browse the repository at this point in the history
  • Loading branch information
gtrepta committed Oct 4, 2023
1 parent ed8eb17 commit b8bb8b9
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions package/test-package
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,28 @@ sort_int = kllvm.ast.CompositeSort("SortInt")
assert str(sort_int) == "SortInt{}"
HERE

# Make sure that the version of the various components is correct comparing to
# the KServer version that uses JVM.
VERSION_REGEX='v[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g[0-9a-z]+(-dirty)?'
KOMPILE_VERSION=$(kompile --version | grep -oP "${VERSION_REGEX}")
KSERVER_VERSION=$(kserver --version | grep -oP "${VERSION_REGEX}")
# Make sure that the help messages work and that the version of the various components is correct
PACKAGE_VERSION=$(cat /usr/lib/kframework/version)
VERSION_REGEX="$(PACKAGE_VERSION)"

if [ "$KOMPILE_VERSION" != "$KSERVER_VERSION" ]; then
echo "KOMPILE_VERSION: $KOMPILE_VERSION"
echo "KSERVER_VERSION: $KSERVER_VERSION"
exit 1
fi
kast --help | grep -q -- "--version"
kdep --help | grep -q -- "--version"
kompile --help | grep -q -- "--version"
kprove --help | grep -q -- "--version"
krun --help | grep -q -- "--version"
kserver --help | grep -q -- "--version"
kparse --help | grep -q -- "--version"
kparse-gen --help | grep -q -- "--version"
kore-print --help | grep -q -- "--version"
kast --version | grep -q $(VERSION_REGEX)
kdep --version | grep -q $(VERSION_REGEX)
kompile --version | grep -q $(VERSION_REGEX)
kprove --version | grep -q $(VERSION_REGEX)
krun --version | grep -q $(VERSION_REGEX)
kserver --version | grep -q $(VERSION_REGEX)
kparse --version | grep -q $(VERSION_REGEX)
kparse-gen --version | grep -q $(VERSION_REGEX)
kore-print --version | grep -q $(VERSION_REGEX)

# Make sure that the Haskell Backend Booster has been installed properly.
kore-rpc-booster --help

0 comments on commit b8bb8b9

Please sign in to comment.