From 928ac5884e284806cd10a4853626b98c8bcd5734 Mon Sep 17 00:00:00 2001 From: Roberto Rosmaninho Date: Wed, 4 Oct 2023 13:30:49 -0300 Subject: [PATCH 1/2] Adding version test to test-package --- package/test-package | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/package/test-package b/package/test-package index 704750337ac..bf46dd82212 100755 --- a/package/test-package +++ b/package/test-package @@ -23,5 +23,16 @@ 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. +KOMPILE_VERSION=$(kompile --version | grep -oP 'v[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g[0-9a-z]+(-dirty)?') +KSERVER_VERSION=$(kserver --version | grep -oP 'v[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g[0-9a-z]+(-dirty)?') + +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 From 371096ed1ca1d0f0916a5eb996fd609f65a9ee70 Mon Sep 17 00:00:00 2001 From: Roberto Rosmaninho Date: Wed, 4 Oct 2023 13:45:54 -0300 Subject: [PATCH 2/2] Using $VERSION_REGEX var --- package/test-package | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/test-package b/package/test-package index bf46dd82212..4d2c4acee72 100755 --- a/package/test-package +++ b/package/test-package @@ -25,8 +25,9 @@ HERE # Make sure that the version of the various components is correct comparing to # the KServer version that uses JVM. -KOMPILE_VERSION=$(kompile --version | grep -oP 'v[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g[0-9a-z]+(-dirty)?') -KSERVER_VERSION=$(kserver --version | grep -oP 'v[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g[0-9a-z]+(-dirty)?') +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"