Fix test when compiling from a tarball
Summary: Otherwise it doesn't work when falling back to the project name.
Test Plan: Ran the test locally with and without .git directory
Reviewers: Frameworks, joselema, sitter
Reviewed By: sitter
Subscribers: Build System
Tags: Frameworks, Build System
Differential Revision: https://phabricator.kde.org/D5741