Skip to content
Snippets Groups Projects
Commit 496f9fda authored by Adriaan de Groot's avatar Adriaan de Groot
Browse files

[libcalamares] Fix tests

 - The test wants to read settings.conf, but by default it's run
   from way inside the build dir, where there is no such file.
   Go looking for one (but not too far).
parent 9b367839
No related branches found
No related tags found
Loading
......@@ -62,9 +62,13 @@ void
LibCalamaresTests::testLoadSaveYaml()
{
QFile f( "settings.conf" );
// Find the nearest settings.conf to read
for ( unsigned int up = 0; !f.exists() && ( up < 4 ); ++up )
f.setFileName( QString( "../" ) + f.fileName() );
cDebug() << QDir().absolutePath() << f.fileName() << f.exists();
QVERIFY( f.exists() );
auto map = CalamaresUtils::loadYaml( "settings.conf" );
auto map = CalamaresUtils::loadYaml( f.fileName() );
CalamaresUtils::saveYaml( "out.yaml", map );
auto other_map = CalamaresUtils::loadYaml( "out.yaml" );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment