Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package: improve verify helper #735

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fluent-package/test-install-in-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function check_installed_version()
echo "Succeeded to install $TARGET on $ID from $REPO"
;;
*)
echo "Failed to install $TARGET from $REPO"
echo "Failed to install $TARGET on $ID from $REPO"
exit 1
;;
esac
Expand Down
22 changes: 18 additions & 4 deletions fluent-package/test-verify-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@

function test_deb() {
for d in $DEB_TARGETS; do
if [ $d = "dummy" ]; then
continue
fi
for r in $REPO_TARGETS; do
echo "TEST: on $d $r"
docker run --rm -v $(pwd):/work $d /work/test-install-in-docker.sh $USER $r $VERSION
if [ $? -eq 0 ]; then
LOG=install-${d/:/-}-on-${r//\//-}.log
docker run --rm -v $(pwd):/work $d /work/test-install-in-docker.sh $USER $r $VERSION 2>&1 | tee $LOG
if [ ${PIPESTATUS[0]} -eq 0 ]; then
RESULTS="$RESULTS\nOK: $d $r"
else
RESULTS="$RESULTS\nNG: $d $r"
Expand All @@ -23,10 +27,14 @@ function test_deb() {

function test_rpm() {
for d in $RPM_TARGETS; do
if [ $d = "dummy" ]; then
continue
fi
for r in $REPO_TARGETS; do
echo "TEST: on $d $r"
docker run --rm -v $(pwd):/work $d /work/test-install-in-docker.sh $USER $r $VERSION
if [ $? -eq 0 ]; then
LOG=install-${d/:/-}-on-${r//\//-}.log
docker run --rm -v $(pwd):/work $d /work/test-install-in-docker.sh $USER $r $VERSION 2>&1 | tee $LOG
if [ ${PIPESTATUS[0]} -eq 0 ]; then
RESULTS="$RESULTS\nOK: $d $r"
else
RESULTS="$RESULTS\nNG: $d $r"
Expand All @@ -52,7 +60,13 @@ if [ -z "$REPO_TARGETS" ]; then
REPO_TARGETS="exp/5 exp/lts/5"
fi

echo "DEB_TARGETS: $DEB_TARGETS"
echo "RPM_TARGETS: $RPM_TARGETS"
echo "REPO_TARGETS: $REPO_TARGETS"
# give a grace period to terminate (Ctrl+C)
sleep 3
RESULTS=""
test_deb
test_rpm
grep "Failed to install" install-*.log
echo -e $RESULTS