From b3c4644d21b1d3cd461b36bffaaf984c624aadd3 Mon Sep 17 00:00:00 2001 From: gtrepta <50716988+gtrepta@users.noreply.github.com> Date: Wed, 4 Oct 2023 18:02:56 -0500 Subject: [PATCH] Packaging: `version` path fix (#3691) Follow up to finish #3683 --------- Co-authored-by: Roberto Rosmaninho Co-authored-by: rv-jenkins --- k-distribution/src/main/scripts/lib/k | 2 +- package/test-package | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/k-distribution/src/main/scripts/lib/k b/k-distribution/src/main/scripts/lib/k index 34f4bf3b639..1d510a2ff60 100755 --- a/k-distribution/src/main/scripts/lib/k +++ b/k-distribution/src/main/scripts/lib/k @@ -22,7 +22,7 @@ for flag in "$@"; do fi if [[ -z "${version}" ]]; then - version="v"$(cat "${K_BASE}"/version) + version="v"$(cat "${K_BASE}"/kframework/version) fi echo "K version: ${version}" diff --git a/package/test-package b/package/test-package index 704750337ac..6c4ae1f0bcb 100755 --- a/package/test-package +++ b/package/test-package @@ -23,5 +23,27 @@ sort_int = kllvm.ast.CompositeSort("SortInt") assert str(sort_int) == "SortInt{}" HERE +# Make sure that the help messages work and that the version of the various components is correct +PACKAGE_VERSION=$(cat /usr/lib/kframework/version) + +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 ${PACKAGE_VERSION} +kdep --version | grep -q ${PACKAGE_VERSION} +kompile --version | grep -q ${PACKAGE_VERSION} +kprove --version | grep -q ${PACKAGE_VERSION} +krun --version | grep -q ${PACKAGE_VERSION} +kserver --version | grep -q ${PACKAGE_VERSION} +kparse --version | grep -q ${PACKAGE_VERSION} +kparse-gen --version | grep -q ${PACKAGE_VERSION} +kore-print --version | grep -q ${PACKAGE_VERSION} + # Make sure that the Haskell Backend Booster has been installed properly. kore-rpc-booster --help