[gparted] Exclude unit test which fails in Docker CI image (!4)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Exclude unit test which fails in Docker CI image (!4)
- Date: Wed, 18 Jul 2018 19:13:00 +0000 (UTC)
commit fe2fc33e67980f0b4a5bba958d257be54715f301
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Fri Jun 22 15:27:29 2018 +0100
Exclude unit test which fails in Docker CI image (!4)
Fragment of the tests/test-suite.log from the Docker CI image showing
details of the unit test failure:
Running main() from gtest_main.cc
[==========] Running 26 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 26 tests from BlockSpecialTest
...
[ RUN ] BlockSpecialTest.NamedBlockSpecialObjectBySymlinkMatches
test_BlockSpecial.cc:137: Failure
Failed
get_link_name(): Failed to open directory '/dev/disk/by-id'
test_BlockSpecial.cc:168: Failure
Failed
follow_link_name(): Failed to resolve symbolic link ''
test_BlockSpecial.cc:255: Failure
Expected: (lnk.m_name.c_str()) != (bs.m_name.c_str()), actual: "" vs ""
[ FAILED ] BlockSpecialTest.NamedBlockSpecialObjectBySymlinkMatches (0 ms)
...
[==========] 26 tests from 1 test case ran. (1 ms total)
[ PASSED ] 25 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] BlockSpecialTest.NamedBlockSpecialObjectBySymlinkMatches
1 FAILED TEST
So the code is trying to find a symbolic link to a block device to use
in the test. It is trying to read the directory /dev/disk/by-id to find
a symbolic link, but the directory doesn't exist in the Docker CI image.
The used directory was recently changed [1] to use one which existed on
all distributions. Docker images don't even have the /dev/disk
directory. Exclude just this specific test.
[1] 7fe41480749c795dfb79daeba7b058cece2dfdd2
Use /dev/disk/by-id/ to get device symlink in test_BlockSpecial
Closes !4 - Add GitLab CI jobs to build and test GParted
.gitlab-ci.yml | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6598562b..ebc920e5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,16 +23,9 @@ build:
test:
stage: test
script:
- - ls -lR /dev
- ./autogen.sh
- make
+ # Exclude specific unit test which fails without /dev/disk in Docker images.
+ - export GTEST_FILTER='-BlockSpecialTest.NamedBlockSpecialObjectBySymlinkMatches'
- make check
- make distcheck
- # Capture all GParted files from the Docker image for investigation.
- artifacts:
- when: always
- name: "$CI_PROJECT_NAME-ci-job-$CI_JOB_ID-$CI_JOB_NAME"
- untracked: true
- paths:
- - ./
- expire_in: 1 week
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]