Skip to content

Commit 5f2c7e3

Browse files
Michael Vasseurvmcj
authored andcommitted
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 07c1023 commit 5f2c7e3

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
}
@@ -458,3 +466,31 @@ compile_assertions_finished () {
458466
run make judgehost
459467
assert_failure
460468
}
469+
470+
@test "'Make distclean' has all permissions" {
471+
if [ "$distro_id" = "ID=fedora" ]; then
472+
# Fails as libraries are not found
473+
skip
474+
fi
475+
setup
476+
run run_configure
477+
run_user_stderr make domserver
478+
make install-domserver
479+
run_user_stderr make distclean
480+
refute_partial "cannot remove"
481+
refute_partial "Permission denied"
482+
assert_success
483+
}
484+
485+
@test "'Make distclean' has permission errors" {
486+
if [ "$distro_id" = "ID=fedora" ]; then
487+
# Fails as libraries are not found
488+
skip
489+
fi
490+
setup
491+
run run_configure
492+
run_stderr make install-domserver
493+
run_user_stderr make distclean
494+
assert_partial "cannot remove"
495+
assert_partial "Permission denied"
496+
}

.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)