Skip to content

Commit

Permalink
Remove reference to version in installation scripts (#2553)
Browse files Browse the repository at this point in the history
* Remove reference to version in installation scripts

Signed-off-by: James Rhodes <[email protected]>

* Update tests to check for possible rc versions

Signed-off-by: James Rhodes <[email protected]>

* Fix escaping in regex

* Fix other regex

---------

Signed-off-by: James Rhodes <[email protected]>
  • Loading branch information
jarhodes314 authored Dec 21, 2023
1 parent a7f8439 commit 580e4e5
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ci/installation_scripts/install_for_amd64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ sudo apt-get --assume-yes install "${EXTERNAL_AMD64_PACKAGES[@]}"
# Install thin-edge packages
for PACKAGE in "${RELEASE_PACKAGES[@]}"
do
sudo dpkg -i ./"$PKG_DIR"/"$PACKAGE"_0.*_amd64.deb
sudo dpkg -i ./"$PKG_DIR"/"$PACKAGE"_*_amd64.deb
done
2 changes: 1 addition & 1 deletion ci/installation_scripts/install_for_arm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ sudo apt-get --assume-yes install "${EXTERNAL_ARM_PACKAGES[@]}"
# Install thin-edge packages
for PACKAGE in "${RELEASE_PACKAGES[@]}"
do
sudo dpkg -i ./"$PKG_DIR"/"$PACKAGE"_0.*_armhf.deb
sudo dpkg -i ./"$PKG_DIR"/"$PACKAGE"_*_armhf.deb
done

# Configure collectd
Expand Down
2 changes: 1 addition & 1 deletion tests/RobotFramework/tasks/build_install_rpi.robot
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ${HOST}
${USERNAME} pi
${PASSWORD} crypt:LO3wCxZPltyviM8gEyBkRylToqtWm+hvq9mMVEPxtn0BXB65v/5wxUu7EqicpOgGhgNZVgFjY0o=
${DeviceID}
${Version} 0.*
${Version} *.*
${download_dir} /home/pi/
${url_dow} https://github.com/thin-edge/thin-edge.io/actions
${user_git} crypt:3Uk76kNdyyYOXxus2GFoLf8eRlt/W77eEkcSiswwh04HNfwt0NlJwI7ATKPABmxKk8K1a8NsI5QH0w8EmT8GWeqrFwX2
Expand Down
4 changes: 2 additions & 2 deletions tests/RobotFramework/tests/installation/install_tedge.robot
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Test Teardown Get Logs
*** Test Cases ***
Install latest via script (from current branch)
Execute Command curl -fsSL https://thin-edge.io/install.sh | sh -s
Tedge Version Should Match Regex ^\\d+\\.\\d+\\.\\d+$
Tedge Version Should Match Regex ^\\d+\\.\\d+\\.\\d+(-rc\\.\\d+)?$

# Uninstall
Uninstall tedge using local Script
Expand All @@ -30,7 +30,7 @@ Install specific version via script (from current branch)

Install latest tedge via script
Execute Command curl -fsSL https://thin-edge.io/install.sh | sh -s
Tedge Version Should Match Regex ^\\d+\\.\\d+\\.\\d+$
Tedge Version Should Match Regex ^\\d+\\.\\d+\\.\\d+(-rc\\.\\d+)?$

Install then uninstall latest tedge via script (from main branch)
# Install (just install everything, don't set anything up)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ Both filters as empty string
*** Keywords ***
Custom Setup
Setup
${RAW_VERSION}= Execute Command tedge --version | cut -d' ' -f 2 strip=${True}
${RAW_VERSION}= Execute Command tedge --version | cut -d' ' -f 2 | sed 's/-rc\./~rc./' strip=${True}
${VERSION}= Regexp Escape ${RAW_VERSION}
Set Suite Variable ${VERSION}
2 changes: 1 addition & 1 deletion tests/RobotFramework/tests/tedge/call_tedge.robot
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ${version}
Install thin-edge.io
${output}= Execute Command curl -fsSL https://thin-edge.io/install.sh | sh -s #running the script for installing latest version of tedge
# Use apt-cache policy to get the installed version as the script lets apt handle this
${version}= Execute Command apt-cache policy tedge | grep "Installed:" | cut -d":" -f2 | xargs
${version}= Execute Command apt-cache policy tedge | grep "Installed:" | cut -d":" -f2 | sed 's/~rc\./-rc./' | xargs
Set Suite Variable ${version}

call tedge -V
Expand Down

1 comment on commit 580e4e5

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
378 0 3 378 100 1h2m27.132999999s

Please sign in to comment.