Skip to content

Commit f6b1ed8

Browse files
author
Michael Vasseur
committed
Add extra test to detect the error
Add the case where the user did not run the `make domserver` In that case root will create the files and not chown them to the right user.
1 parent 465e07b commit f6b1ed8

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed

.github/jobs/configure-checks/all.bats

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ setup() {
4040
repo-install gcc g++ libcgroup-dev composer
4141
}
4242

43+
run_user_stderr () {
44+
su $u -c "$*" 2>&1
45+
}
46+
47+
run_stderr () {
48+
"$*" 2>&1
49+
}
50+
4351
run_configure () {
4452
su $u -c "./configure $*"
4553
}
@@ -454,3 +462,31 @@ compile_assertions_finished () {
454462
run make judgehost
455463
assert_failure
456464
}
465+
466+
@test "'Make distclean' has all permissions" {
467+
if [ "$distro_id" = "ID=fedora" ]; then
468+
# Fails as libraries are not found
469+
skip
470+
fi
471+
setup
472+
run run_configure
473+
run_user_stderr make domserver
474+
make install-domserver
475+
run_user_stderr make distclean
476+
refute_partial "cannot remove"
477+
refute_partial "Permission denied"
478+
assert_success
479+
}
480+
481+
@test "'Make distclean' has permission errors" {
482+
if [ "$distro_id" = "ID=fedora" ]; then
483+
# Fails as libraries are not found
484+
skip
485+
fi
486+
setup
487+
run run_configure
488+
run_stderr make install-domserver
489+
run_user_stderr make distclean
490+
assert_partial "cannot remove"
491+
assert_partial "Permission denied"
492+
}

.github/jobs/configure-checks/setup_configure_image.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ case $distro_id in
1212
apt-get update; apt-get full-upgrade -y
1313
apt-get install pkg-config make bats autoconf -y
1414
apt-get install composer php php-cli php-curl php-fpm php-gd \
15-
php-intl php-json php-mbstring php-mysql php-xml php-zip -y ;;
15+
php-intl php-json php-mbstring php-mysql php-xml php-zip \
16+
acl zip unzip mariadb-server python3-sphinx \
17+
python3-sphinx-rtd-theme rst2pdf fontconfig python3-yaml \
18+
latexmk texlive-latex-recommended texlive-latex-extra \
19+
tex-gyre -y ;;
1620
esac
1721

1822
# Build the configure file
@@ -22,7 +26,7 @@ case $distro_id in
2226
"ID=fedora")
2327
true ;;
2428
*)
25-
composer install --no-scripts ;;
29+
(cd webapp; composer install --no-scripts ) ;;
2630
esac
2731

2832
# Install extra assert statements for bots

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy