-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from siemens/feature/distro-install-tests
Feature/distro install tests
- Loading branch information
Showing
19 changed files
with
222 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
update-desktop-database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
update-desktop-database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Do a test installation of the cshargextcap*.apk package on Alpine. | ||
FROM alpine:latest | ||
COPY install.sh / | ||
CMD ["/bin/sh", "install.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
RED="\033[1;31m" | ||
GREEN="\033[1;32m" | ||
NOCOLOR="\033[0m" | ||
|
||
arch=$(uname -m) | ||
case ${arch} in | ||
x86_64) arch="amd64";; | ||
aarch64) arch="arm64";; | ||
*) echo -e "${RED}FAIL:${NOCOLOR} unsupported architecture ${arch}"; exit 1;; | ||
esac | ||
|
||
# test harness | ||
apk update | ||
apk add xdg-utils | ||
|
||
# the real deal... | ||
apk add --allow-untrusted /dist/cshargextcap_*_${arch}.apk | ||
|
||
apk add tshark | ||
|
||
# Ask tshark to tell us the extcap interfaces it knows of: this must list the | ||
# packetflix extcap so we know we've installed the plugin properly. | ||
tshark -D | grep packetflix \ | ||
&& echo -e "${GREEN}OK:${NOCOLOR} tshark detects extcap plugin" \ | ||
|| (echo -e "${RED}FAIL:${NOCOLOR} tshark doesn't detect the packetflix extcap"; exit 1) | ||
|
||
# Check that the default URL scheme handler registration is in place. | ||
xdg-mime query default x-scheme-handler/packetflix | grep "packetflix.desktop" \ | ||
&& echo -e "${GREEN}OK:${NOCOLOR} packetflix URL scheme handler registered" \ | ||
|| (echo -e "${RED}FAIL:${NOCOLOR} packetflix URL scheme handler not detected"; exit 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
|
||
RED="\033[1;31m" | ||
GREEN="\033[1;32m" | ||
NOCOLOR="\033[0m" | ||
|
||
docker build --pull -f Dockerfile -t cshargextcap-alpine-test-install . | ||
docker run --rm --name cshargextcap-alpine-test-install -v ./../../../../dist:/dist cshargextcap-alpine-test-install \ | ||
&& echo -e "${GREEN}SUCCESS${NOCOLOR}" \ | ||
|| (echo -e "${RED}FAIL${NOCOLOR}"; exit 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Do a test installation of the cshargextcap*.deb package on Debian. | ||
FROM debian:12-slim | ||
COPY install.sh / | ||
CMD ["/bin/bash", "install.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
RED="\033[1;31m" | ||
GREEN="\033[1;32m" | ||
NOCOLOR="\033[0m" | ||
|
||
arch=$(uname -m) | ||
case ${arch} in | ||
x86_64) arch="amd64";; | ||
aarch64) arch="arm64";; | ||
*) echo -e "${RED}FAIL:${NOCOLOR} unsupported architecture ${arch}"; exit 1;; | ||
esac | ||
|
||
# test harness | ||
apt-get update | ||
apt-get install --no-install-recommends --no-install-suggests -y xdg-utils | ||
|
||
# the real deal... | ||
apt-get install --no-install-suggests -y /dist/cshargextcap_*_${arch}.deb | ||
|
||
apt-get install --no-install-recommends --no-install-suggests -y tshark | ||
|
||
# Ask tshark to tell us the extcap interfaces it knows of: this must list the | ||
# packetflix extcap so we know we've installed the plugin properly. | ||
tshark -D | grep packetflix \ | ||
&& echo -e "${GREEN}OK:${NOCOLOR} tshark detects extcap plugin" \ | ||
|| (echo -e "${RED}FAIL:${NOCOLOR} tshark doesn't detect the packetflix extcap"; exit 1) | ||
|
||
# Check that the default URL scheme handler registration is in place. | ||
xdg-mime query default x-scheme-handler/packetflix | grep "packetflix.desktop" \ | ||
&& echo -e "${GREEN}OK:${NOCOLOR} packetflix URL scheme handler registered" \ | ||
|| (echo -e "${RED}FAIL:${NOCOLOR} packetflix URL scheme handler not detected"; exit 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
|
||
RED="\033[1;31m" | ||
GREEN="\033[1;32m" | ||
NOCOLOR="\033[0m" | ||
|
||
docker build --pull -f Dockerfile -t cshargextcap-debian-test-install . | ||
docker run --rm --name cshargextcap-debian-test-install -v ./../../../../dist:/dist cshargextcap-debian-test-install \ | ||
&& echo -e "${GREEN}SUCCESS${NOCOLOR}" \ | ||
|| (echo -e "${RED}FAIL${NOCOLOR}"; exit 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Do a test installation of the cshargextcap*.rpm package on Fedora. | ||
FROM fedora:latest | ||
COPY install.sh / | ||
CMD ["/bin/bash", "install.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
RED="\033[1;31m" | ||
GREEN="\033[1;32m" | ||
NOCOLOR="\033[0m" | ||
|
||
arch=$(uname -m) | ||
case ${arch} in | ||
x86_64) arch="amd64";; | ||
aarch64) arch="arm64";; | ||
*) echo -e "${RED}FAIL:${NOCOLOR} unsupported architecture ${arch}"; exit 1;; | ||
esac | ||
|
||
# test harness | ||
dnf install -y xdg-utils | ||
|
||
# the real deal... | ||
dnf install -y /dist/cshargextcap_*_${arch}.rpm | ||
|
||
# Ask tshark to tell us the extcap interfaces it knows of: this must list the | ||
# packetflix extcap so we know we've installed the plugin properly. | ||
tshark -D | grep packetflix \ | ||
&& echo -e "${GREEN}OK:${NOCOLOR} tshark detects extcap plugin" \ | ||
|| (echo -e "${RED}FAIL:${NOCOLOR} tshark doesn't detect the packetflix extcap"; exit 1) | ||
|
||
# Check that the default URL scheme handler registration is in place. | ||
xdg-mime query default x-scheme-handler/packetflix | grep "packetflix.desktop" \ | ||
&& echo -e "${GREEN}OK:${NOCOLOR} packetflix URL scheme handler registered" \ | ||
|| (echo -e "${RED}FAIL:${NOCOLOR} packetflix URL scheme handler not detected"; exit 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
|
||
RED="\033[1;31m" | ||
GREEN="\033[1;32m" | ||
NOCOLOR="\033[0m" | ||
|
||
docker build --pull -f Dockerfile -t cshargextcap-fedora-test-install . | ||
docker run --rm --name cshargextcap-fedora-test-install -v ./../../../../dist:/dist cshargextcap-fedora-test-install \ | ||
&& echo -e "${GREEN}SUCCESS${NOCOLOR}" \ | ||
|| (echo -e "${RED}FAIL${NOCOLOR}"; exit 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Do a test installation of the cshargextcap*.deb package on Ubuntu. | ||
FROM ubuntu:rolling | ||
COPY install.sh / | ||
CMD ["/bin/bash", "install.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
RED="\033[1;31m" | ||
GREEN="\033[1;32m" | ||
NOCOLOR="\033[0m" | ||
|
||
arch=$(uname -m) | ||
case ${arch} in | ||
x86_64) arch="amd64";; | ||
aarch64) arch="arm64";; | ||
*) echo -e "${RED}FAIL:${NOCOLOR} unsupported architecture ${arch}"; exit 1;; | ||
esac | ||
|
||
# test harness | ||
apt-get update | ||
apt-get install --no-install-recommends --no-install-suggests -y xdg-utils | ||
|
||
# the real deal... | ||
apt-get install --no-install-suggests -y /dist/cshargextcap_*_${arch}.deb | ||
|
||
apt-get install --no-install-recommends --no-install-suggests -y tshark | ||
|
||
# Ask tshark to tell us the extcap interfaces it knows of: this must list the | ||
# packetflix extcap so we know we've installed the plugin properly. | ||
tshark -D | grep packetflix \ | ||
&& echo -e "${GREEN}OK:${NOCOLOR} tshark detects extcap plugin" \ | ||
|| (echo -e "${RED}FAIL:${NOCOLOR} tshark doesn't detect the packetflix extcap"; exit 1) | ||
|
||
# Check that the default URL scheme handler registration is in place. | ||
xdg-mime query default x-scheme-handler/packetflix | grep "packetflix.desktop" \ | ||
&& echo -e "${GREEN}OK:${NOCOLOR} packetflix URL scheme handler registered" \ | ||
|| (echo -e "${RED}FAIL:${NOCOLOR} packetflix URL scheme handler not detected"; exit 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
|
||
RED="\033[1;31m" | ||
GREEN="\033[1;32m" | ||
NOCOLOR="\033[0m" | ||
|
||
docker build --pull -f Dockerfile -t cshargextcap-ubuntu-test-install . | ||
docker run --rm --name cshargextcap-ubuntu-test-install -v ./../../../../dist:/dist cshargextcap-ubuntu-test-install \ | ||
&& echo -e "${GREEN}SUCCESS${NOCOLOR}" \ | ||
|| (echo -e "${RED}FAIL${NOCOLOR}"; exit 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters