The KListOpenFilesJob unit test on Unix expected lsof to be
installed, but the KDE build infrastructure doesn't have it installed,
so check if it is installed and skip the tests if it is not.
Details
Details
Unit Test
Diff Detail
Diff Detail
- Repository
- R244 KCoreAddons
- Branch
- fix_unittest_if_lsof_is_not_installed
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 16443 Build 16461: arc lint + arc unit
autotests/klistopenfilesjobtest_unix.cpp | ||
---|---|---|
36 | A prior career in build engineering tells me that this will start failing in 10 years when lsof removes the -v argument and replaces it with --version. For robustness' sake, I would additionally check for --version (and possibly even -version too) if the initial lsof -v call fails. |
autotests/klistopenfilesjobtest_unix.cpp | ||
---|---|---|
33 | Can't you simply use QStandardPaths::findExecutable()? |
Comment Actions
Meanwhile lsof was installed on the Linux CI nodes, but this fix is still good to have of course, just in case.
autotests/klistopenfilesjobtest_unix.cpp | ||
---|---|---|
33 | Method names start with a lowercase letter in Qt/KDE code. | |
65 | Please use QSKIP instead, otherwise the test output looks like the test passed, rather than was skipped. |
autotests/klistopenfilesjobtest_unix.cpp | ||
---|---|---|
65 | Good point, I didn't know that :) |