diff --git a/package/test-package b/package/test-package index 704750337ac..4d2c4acee72 100755 --- a/package/test-package +++ b/package/test-package @@ -23,5 +23,17 @@ 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}") + +if [ "$KOMPILE_VERSION" != "$KSERVER_VERSION" ]; then + echo "KOMPILE_VERSION: $KOMPILE_VERSION" + echo "KSERVER_VERSION: $KSERVER_VERSION" + exit 1 +fi + # Make sure that the Haskell Backend Booster has been installed properly. kore-rpc-booster --help