on xenial help sign in
MockAppMan: emit SIGSTOP so AP test apps are run
f3d426dGerry Boland
tests/mocks/Unity/Application/ApplicationManager.cpp+7
@@ -20,6 +20,7 @@
20#include "ApplicationTestInterface.h"
20#include "ApplicationTestInterface.h"
21
21
22#include <paths.h>
22#include <paths.h>
23+#include <csignal>
23
24
24#include <QDir>
25#include <QDir>
25#include <QGuiApplication>
26#include <QGuiApplication>
@@ -36,6 +37,12 @@ ApplicationManager *ApplicationManager::singleton()
36{
37{
37 if (!the_application_manager) {
38 if (!the_application_manager) {
38 the_application_manager = new ApplicationManager();
39 the_application_manager = new ApplicationManager();
40+
41+ // Emit signal to notify Upstart that Mir is ready to receive client connections
42+ // see http://upstart.ubuntu.com/cookbook/#expect-stop
43+ if (qgetenv("UNITY_MIR_EMITS_SIGSTOP") == "1") {
44+ raise(SIGSTOP);
45+ }
39 }
46 }
40 return the_application_manager;
47 return the_application_manager;
41}
48}