[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
#include <dpl/test/test_runner.h>
#include <dpl/log/log.h>
#include <dpl/wrt-dao-ro/plugin_dao_read_only.h>
#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)
////////////////////////////////////////////////////////////////////////////////
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) \
{ \
#define MAKE_PLUGIN_CHECK_TESTCASE(TESTCASE, LIBNAME) \
RUNNER_TEST(PluginsInstallation_##TESTCASE) \
{ \
WrtDB::PluginDAOReadOnly pdao(#LIBNAME); \
RUNNER_ASSERT_MSG(pdao.getInstallationStatus() == WrtDB::PluginDAOReadOnly::INSTALLATION_COMPLETED, "Plugin is not installed correctly"); \
} Catch(DPL::Exception) { \
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"); \
} \
} \
RUNNER_ASSERT_MSG(false, "DPL::Exception"); \
} \
} \