From ffc891efcd4a35f6ad76a5751225301075eeef7a Mon Sep 17 00:00:00 2001 From: Bernd Wachter Date: Mon, 7 Sep 2015 14:58:04 +0300 Subject: [PATCH] [tests] Drop special treatment for in-tree tests The URL resolver test used to compare empty values when running in-tree, assuming sandbox was not set up properly. Running tests like this is no longer supported, for running tests in-tree use the run-tests script in top level which takes care of setting up sandboxes. --- tests/ut_urlresolver/urlresolvertest.cpp | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/tests/ut_urlresolver/urlresolvertest.cpp b/tests/ut_urlresolver/urlresolvertest.cpp index 1fcb53f..850741e 100644 --- a/tests/ut_urlresolver/urlresolvertest.cpp +++ b/tests/ut_urlresolver/urlresolvertest.cpp @@ -14,10 +14,14 @@ #include "testutils/process.h" void UrlResolverTest::initTestCase(){ -#ifdef TARGET_ARCH // test will fail if executed without proper installation of libssu and repos QString arch = ""; +#ifdef TARGET_ARCH arch = TARGET_ARCH; +#else +#warning "TARGET_ARCH not defined" +#warning "In-tree tests will fail without using run-tests script" +#endif rndRepos["nemo"] = QString("https://packages.example.com/nemo/latest/platform/%1/").arg(arch); rndRepos["mer-core"] = QString("https://packages.example.com/mer/latest/builds/%1/packages/").arg(arch); /* @@ -26,18 +30,6 @@ void UrlResolverTest::initTestCase(){ releaseRepos["nemo"] = QString("https://packages.example.com/releases/0.1/nemo/platform/%1/").arg(arch); releaseRepos["mer-core"] = QString("https://packages.example.com/0.1/mer/%1/packages/").arg(arch); releaseRepos["jolla"] = QString("https://packages.example.com/releases/0.1/jolla/%1/").arg(arch); -#else -#warning "TARGET_ARCH not defined" -// if run in build dir, ssu.ini and repos missing the repo urls to compare will be empty! - rndRepos["nemo"] = ""; - rndRepos["mer-core"] = ""; - /* - rndRepos["non-oss"] = ""; - */ - releaseRepos["nemo"] = ""; - releaseRepos["mer-core"] = ""; - releaseRepos["jolla"] = ""; -#endif } void UrlResolverTest::cleanupTestCase(){ @@ -106,11 +98,7 @@ void UrlResolverTest::simpleRepoUrlLookup(){ url=ssu.repoUrl(i.key(), true); QCOMPARE(url, i.value()); url=ssu.repoUrl(i.key(), false); -#ifdef TARGET_ARCH QVERIFY(url.compare(i.value()) != 0); -#else - QCOMPARE(url, i.value()); -#endif } /* QCOMPARE(ssu.repoUrl("jolla", 0), QString(""));