2ecdf4a0eb
Backports the totality of our release script changes to support sudowoodo. Also backports changes that have been made to a few other release script files in master after 3-0-x was cut with the purpose of keeping them in sync.
28 lines
693 B
Python
28 lines
693 B
Python
from config import is_verbose_mode
|
|
from dbusmock import DBusTestCase
|
|
|
|
import atexit
|
|
import os
|
|
import sys
|
|
|
|
|
|
def stop():
|
|
DBusTestCase.stop_dbus(DBusTestCase.system_bus_pid)
|
|
DBusTestCase.stop_dbus(DBusTestCase.session_bus_pid)
|
|
|
|
def start():
|
|
dbusmock_log = sys.stdout if is_verbose_mode() else open(os.devnull, 'w')
|
|
|
|
DBusTestCase.start_system_bus()
|
|
DBusTestCase.spawn_server_template('logind', None, dbusmock_log)
|
|
|
|
DBusTestCase.start_session_bus()
|
|
DBusTestCase.spawn_server_template('notification_daemon', None, dbusmock_log)
|
|
|
|
if __name__ == '__main__':
|
|
import subprocess
|
|
start()
|
|
try:
|
|
subprocess.check_call(sys.argv[1:])
|
|
finally:
|
|
stop()
|