mirror of
https://gitlab.gnome.org/GNOME/gparted
synced 2024-10-02 14:13:47 +00:00
cbb25a2511
The GitLab Continuous Integration test stage jobs can fail like this:
$ make check
...
Making check in help
make[1]: Entering directory `/builds/mfleetwo/gparted/help'
...
xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' gparted-C.omf
warning: failed to load external entity "http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd"
Could not parse DTD http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd
xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' gparted-cs.omf
...
make[1]: *** [check-doc-omf] Error 2
make[1]: Leaving directory `/builds/mfleetwo/gparted/help'
make: *** [check-recursive] Error 1
ERROR: Job failed: exit code 1
It fails when the scrollkeeper.sourceforge.net site reports that
SourceForge is undergoing maintenance or is temporarily unavailable. I
have seen this occur on 3 separate occasions in the last 4 weeks since I
started experimenting with GitLab CI, which is rather too often.
Xmllint comes from the GNOME 2 gnome-doc-utils.make rules used to build
and validate GNOME 2 documentation.
Fragment of useful Debian bug report 730688:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=730688
--disable-scrollkeeper requieres scrollkeeper installed
"You can reproduce the problem in mdbtoools version 0.7.1-1 with no
network, and rarian-compat not installed.
When the network is available, buildd downloads the DTD for checks.
When there is no network, gnome-doc-utils fails.
"
Fix by:
(1) adding the rarian-compat package to the CI Docker images, which
provides a local copy of the scrollkeeper-omf.dtd file;
(2) adding the xmllint --nonet option to prevent fetching of DTDs
remotely.
With reference to earlier commit:
0eb9f1fcfb
Reduce dependency on scrollkeeper (#743318)
That commit allowed GParted to be installed on GNOME 3 desktops without
requiring rarian-compat package to be installed. This commit adds
rarian-compat to the CI images so that 'make check' can succeed without
accessing the Internet. Just the intricate path to continue to build
and test a GNOME 2 application in a world of GNOME 3 desktops with
beginning to be reduced backward compatibility.
Closes #9 - CI test jobs occasionally fail with xmllint not loading
external entity http://scrollkeeper.sourceforce.net/dtds/
scrollkeeper-omf-1.0/scrollkeeper-omf.dtd
63 lines
1.9 KiB
YAML
63 lines
1.9 KiB
YAML
stages:
|
|
- build
|
|
- test
|
|
|
|
.centos_image_template: ¢os_image_definition
|
|
# Use official CentOS image https://hub.docker.com/_/centos/.
|
|
image: centos:latest
|
|
before_script:
|
|
- yum update -y
|
|
- yum install -y which gnome-common gnome-doc-utils glib2-devel intltool
|
|
gcc-c++ libuuid-devel parted-devel gtkmm24-devel make
|
|
polkit file rarian-compat
|
|
|
|
.ubuntu_image_template: &ubuntu_image_definition
|
|
# Use official Ubuntu image https://hub.docker.com/_/ubuntu/.
|
|
image: ubuntu:latest
|
|
before_script:
|
|
- apt-get update
|
|
- apt-get install -y gnome-common gnome-doc-utils libglib2.0-dev-bin
|
|
uuid-dev libparted-dev libgtkmm-2.4-dev make
|
|
policykit-1 rarian-compat
|
|
|
|
.build_stage_template: &build_stage_definition
|
|
stage: build
|
|
script:
|
|
- ./autogen.sh
|
|
- nproc=`grep -c '^processor' /proc/cpuinfo` || nproc=1
|
|
- echo nproc=$nproc
|
|
- make -j $nproc
|
|
- make install
|
|
|
|
.test_stage_template: &test_stage_definition
|
|
stage: test
|
|
script:
|
|
- ./autogen.sh
|
|
- nproc=`grep -c '^processor' /proc/cpuinfo` || nproc=1
|
|
- echo nproc=$nproc
|
|
# Prevent xmllint fetching scrollkeeper DTD file remotely.
|
|
- sed -i '/xmllint.*http.*scrollkeeper-omf.dtd/s|xmllint |xmllint --nonet |' help/Makefile
|
|
- make -j $nproc
|
|
# Exclude specific unit test which fails without /dev/disk in Docker images.
|
|
- export GTEST_FILTER='-BlockSpecialTest.NamedBlockSpecialObjectBySymlinkMatches'
|
|
- make check
|
|
- make distcheck
|
|
|
|
# Check GParted can be built and installed on CentOS and Ubuntu.
|
|
centos_build:
|
|
<<: *centos_image_definition
|
|
<<: *build_stage_definition
|
|
|
|
ubuntu_build:
|
|
<<: *ubuntu_image_definition
|
|
<<: *build_stage_definition
|
|
|
|
# Check GParted unit tests and distcheck pass on CentOS and Ubuntu.
|
|
centos_test:
|
|
<<: *centos_image_definition
|
|
<<: *test_stage_definition
|
|
|
|
ubuntu_test:
|
|
<<: *ubuntu_image_definition
|
|
<<: *test_stage_definition
|