Skip to content

Commit

Permalink
Upgrading Raspberry-Pi version to bullseye.
Browse files Browse the repository at this point in the history
* update to buster

* updated ti debian 11

* testing

* updated

* updated

* Updated with changes to new raspberry os

* updated

* updated to support both  stretch and bullseys

* updated
  • Loading branch information
vikas0212git authored Jun 1, 2022
1 parent bd21794 commit d9c15bf
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/validate-tier1-os.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function is_os_tier1() {
;;

raspbian)
if [ "$VERSION_CODENAME" == "stretch" ] || [ "$VERSION_ID" == "9" ];
if [ "$VERSION_CODENAME" == "bullseye" ] || [ "$VERSION_CODENAME" == "stretch" ] || [ "$VERSION_ID" == "9" ] || [ "$VERSION_ID" == "11" ];
then
return 0
fi
Expand Down Expand Up @@ -74,7 +74,12 @@ function get_platform() {
;;

raspbian)
os_platform="$ID_LIKE/stretch/multiarch"
if [ "$VERSION_CODENAME" == "bullseye" ] || [ "$VERSION_ID" == "11" ];
then
os_platform="$ID_LIKE/11"
else
os_platform="$ID_LIKE/stretch/multiarch"
fi
;;
esac

Expand Down
15 changes: 15 additions & 0 deletions tests/unit-tests/test-validate-tier1-os.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,32 @@ test_raspbian() {
assert_eq 0 $?
}

test_raspbian11() {
ID="raspbian"
VERSION_ID="11"
is_os_tier1 "$ID" "$VERSION_ID"
assert_eq 0 $?
}

test_tier2() {
ID="debian"
VERSION_ID="9"
is_os_tier1 "$ID" "$VERSION_ID"
assert_eq 1 $?
}
test_tier2_11() {
ID="debian"
VERSION_ID="11"
is_os_tier1 "$ID" "$VERSION_ID"
assert_eq 1 $?
}

# run tests
test_ubuntu1804
test_ubuntu2004
test_raspbian
test_raspbian11
test_tier2
test_tier2_11

show_test_totals

0 comments on commit d9c15bf

Please sign in to comment.