Add a test for _repository_name() a function added for fetch-translations
ClosedPublic

Authored by apol on Apr 8 2017, 2:05 PM.

Details

Summary

It turns out it's more complex than it looks, it's always better to have tests.

Diff Detail

Repository
R240 Extra CMake Modules
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
apol created this revision.Apr 8 2017, 2:05 PM
Restricted Application added projects: Frameworks, Build System. · View Herald TranscriptApr 8 2017, 2:05 PM
Restricted Application added subscribers: Build System, Frameworks. · View Herald Transcript
apol updated this revision to Diff 13293.Apr 10 2017, 11:46 AM

Include a check to make sure the target is created

sitter added inline comments.Apr 10 2017, 12:11 PM
tests/KDEFetchTranslations/CMakeLists.txt
25

AND NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../../po" is the wrong path, it should be CMAKE_CURRENT_SOURCE_DIR/po.

The effective source dir of the test is /tests/KDEFetchTranslations, so whether the ecm tree has a po has no impact on the target definition as it is effectively "scoped" to the /tests/KDEFetchTranslations tree.

Negative side effect of the wrongness is that the test would not pass for tarballed builds with a /po dir as the asserted conditions suddenly is true ;)

apol updated this revision to Diff 13296.Apr 10 2017, 12:58 PM
apol marked an inline comment as done.

Fix test

sitter accepted this revision.Apr 10 2017, 1:00 PM
This revision is now accepted and ready to land.Apr 10 2017, 1:00 PM
This revision was automatically updated to reflect the committed changes.