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] 7fe4148074
Use /dev/disk/by-id/ to get device symlink in test_BlockSpecial
Closes !4 - Add GitLab CI jobs to build and test GParted
This commit is contained in:
parent
f5e161f698
commit
fe2fc33e67
|
@ -23,16 +23,9 @@ build:
|
||||||
test:
|
test:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- ls -lR /dev
|
|
||||||
- ./autogen.sh
|
- ./autogen.sh
|
||||||
- make
|
- make
|
||||||
|
# Exclude specific unit test which fails without /dev/disk in Docker images.
|
||||||
|
- export GTEST_FILTER='-BlockSpecialTest.NamedBlockSpecialObjectBySymlinkMatches'
|
||||||
- make check
|
- make check
|
||||||
- make distcheck
|
- 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
|
|
||||||
|
|
Loading…
Reference in New Issue