::testing::GTEST_FLAG(filter) = "SmokeTest.*";
}
testing::InitGoogleTest(&argc, argv);
- testing::Environment *env = testing::AddGlobalTestEnvironment(
+ env = testing::AddGlobalTestEnvironment(
new common_installer::SmokeEnvironment(request_mode));
+ signal(SIGINT, signalHandler);
+ signal(SIGSEGV, signalHandler);
return RUN_ALL_TESTS();
}
// found in the LICENSE file.
#include <common/utils/subprocess.h>
-
#include <common/utils/file_util.h>
-#include <gtest/gtest.h>
#include <gtest/gtest-death-test.h>
#include "unit_tests/smoke_utils.h"
::testing::GTEST_FLAG(filter) = "SmokeTest.*";
}
testing::InitGoogleTest(&argc, argv);
- testing::Environment *env = testing::AddGlobalTestEnvironment(
+ env = testing::AddGlobalTestEnvironment(
new common_installer::SmokeEnvironment(request_mode));
+ signal(SIGINT, signalHandler);
+ signal(SIGSEGV, signalHandler);
return RUN_ALL_TESTS();
}
const char kPreloadManifestDir[] = "/usr/share/packages";
const char kPreloadIcons[] = "/usr/share/icons";
+testing::Environment *env = nullptr;
+void signalHandler(int signum) {
+ env->TearDown();
+ exit(signum);
+}
ci::RequestMode ParseRequestMode(int argc, char** argv) {
bo::options_description desc("Available options");
}
void UninstallAllSmokeApps(ci::RequestMode request_mode) {
+ std::cout << "Uninstalling all smoke apps" << std::endl;
if (getuid() == 0 && request_mode == ci::RequestMode::GLOBAL) {
bf::path root_path = kPreloadApps;
UninstallAllAppsInDirectory(root_path, true);
#include <gum/gum-user-service.h>
#include <gum/common/gum-user-types.h>
+#include <gtest/gtest.h>
+
#include <memory>
#include <vector>
#include <string>
extern const char kPreloadManifestDir[];
extern const char kPreloadIcons[];
+extern testing::Environment *env;
+void signalHandler(int signum);
+
enum class RequestResult {
NORMAL,
FAIL