[packagechooser] Adjust AppData path for tests

- running tests by hand or from "make test" uses different paths.
main
Adriaan de Groot 6 years ago
parent 781be3368e
commit 20f43225b5

@ -47,6 +47,14 @@ PackageChooserTests::testAppData()
{
// Path from the build-dir
QString appdataName( "../io.calamares.calamares.appdata.xml" );
if ( !QFile::exists( appdataName ) )
{
// Running the tests by hand from the build-dir uses the
// path above, but ctest, used by "make test", runs them in
// the module build dir (e.g. build/src/modules/packagechooser)
// so we need to adjust the path some.
appdataName.prepend( "../../../" );
}
QVERIFY( QFile::exists( appdataName ) );
QVariantMap m;

Loading…
Cancel
Save