1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#! /usr/bin/python -S
#
# Copyright 2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Perform simple librarian operations to verify the current configuration.
"""
import _pythonpath # Not lint, actually needed.
import sys
from zope.component import getUtility
from lp.services.scripts import execute_zcml_for_scripts
from canonical.librarian.interfaces import (
IRestrictedLibrarianClient,
ILibrarianClient,
)
from canonical.librarian.smoketest import do_smoketest
if __name__ == '__main__':
execute_zcml_for_scripts()
restricted_client = getUtility(IRestrictedLibrarianClient)
regular_client = getUtility(ILibrarianClient)
sys.exit(do_smoketest(restricted_client, regular_client))
|