Run wrt-installer -p for plugins tests
authorTomasz Iwanek <t.iwanek@samsung.com>
Thu, 4 Jul 2013 07:23:17 +0000 (09:23 +0200)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Fri, 5 Jul 2013 09:32:15 +0000 (09:32 +0000)
[Issue#]       N/A
[Bug]          Tests may not run properly
[Cause]        N/A
[Solution]     Run plugin installation. Make sure it was run.
[Verification] run: wrt-installer-tests-general --output=text --regexp='PluginsInstallation_'

Change-Id: Idfcb05a3cbb294633a0d2d4fbdff5d192dce17d1

tests/general/PluginsInstallation.cpp

index a1133f6..3a03ad8 100644 (file)
 #include <dpl/test/test_runner.h>
 #include <dpl/log/log.h>
 #include <dpl/wrt-dao-ro/plugin_dao_read_only.h>
+#include <dpl/static_block.h>
 
 ////////////////////////////////////////////////////////////////////////////////
 
 RUNNER_TEST_GROUP_INIT(PluginsInstallation)
 
+STATIC_BLOCK
+{
+    (void)system("wrt_reset_all.sh");
+    (void)system("wrt-installer -p");
+}
+
 #define MAKE_PLUGIN_CHECK_TESTCASE(TESTCASE, LIBNAME)                                                                                               \
     RUNNER_TEST(PluginsInstallation_##TESTCASE)                                                                                                     \
     {                                                                                                                                               \
@@ -36,7 +43,7 @@ RUNNER_TEST_GROUP_INIT(PluginsInstallation)
         WrtDB::PluginDAOReadOnly pdao(#LIBNAME);                                                                                                    \
         RUNNER_ASSERT_MSG(pdao.getInstallationStatus() == WrtDB::PluginDAOReadOnly::INSTALLATION_COMPLETED, "Plugin is not installed correctly");   \
         } Catch(DPL::Exception) {                                                                                                                   \
-            LogError(_rethrown_exception.DumpToString());                                                                                                          \
+            LogError(_rethrown_exception.DumpToString());                                                                                           \
             RUNNER_ASSERT_MSG(false, "DPL::Exception");                                                                                             \
         }                                                                                                                                           \
     }                                                                                                                                               \