~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to buildout-templates/bin/test.in

  • Committer: Danilo Segan
  • Date: 2011-04-22 14:02:29 UTC
  • mto: This revision was merged to the branch mainline in revision 12910.
  • Revision ID: danilo@canonical.com-20110422140229-zhq4d4c2k8jpglhf
Ignore hidden files when building combined JS file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
    sys.exit(-1 * signal.SIGTERM)
79
79
signal.signal(signal.SIGTERM, exit_with_atexit_handlers)
80
80
 
81
 
# Tell lp.services.config to use the testrunner config instance.
82
 
from lp.services.config import config
 
81
# Tell canonical.config to use the testrunner config instance.
 
82
from canonical.config import config
83
83
config.setInstance('testrunner')
84
84
config.generate_overrides()
85
85
 
88
88
sys.path[:] = [p for p in sys.path if os.path.abspath(p) != BUILD_DIR]
89
89
 
90
90
# Turn on psycopg debugging wrapper
91
 
#import lp.services.database.debug
92
 
#lp.services.database.debug.install()
 
91
#import canonical.database.debug
 
92
#canonical.database.debug.install()
93
93
 
94
94
# Unset the http_proxy environment variable, because we're going to make
95
95
# requests to localhost and we don't wand this to be proxied.
98
98
except KeyError:
99
99
    pass
100
100
 
101
 
# Suppress accessability warning because the test runner does not have UI.
102
 
os.environ['GTK_MODULES'] = ''
103
 
 
104
101
# Silence spurious warnings. Note that this does not propagate to subprocesses
105
102
# so this is not always as easy as it seems. Warnings caused by our code that
106
103
# need to be silenced should have an accompanied Bug reference.
172
169
    'tests_pattern': '^f?tests$',
173
170
    'test_path': [${buildout:directory/lib|path-repr}],
174
171
    'package': ['canonical', 'lp', 'devscripts', 'launchpad_loggerhead'],
175
 
    'layer': ['!(MailmanLayer)'],
 
172
    'layer': ['!(MailmanLayer|WindmillLayer|YUITestLayer)'],
176
173
    }
177
174
 
178
175
# Monkey-patch os.listdir to randomise the results
194
191
os.listdir = listdir
195
192
 
196
193
 
197
 
from lp.services.testing.customresult import filter_tests, patch_find_tests
 
194
from canonical.testing.customresult import filter_tests, patch_find_tests
198
195
 
199
196
 
200
197
if __name__ == '__main__':
216
213
    # thunk across to parallel support if needed.
217
214
    if '--parallel' in sys.argv and '--list-tests' not in sys.argv:
218
215
        # thunk over to parallel testing.
219
 
        from lp.services.testing.parallel import main
 
216
        from canonical.testing.parallel import main
220
217
        sys.exit(main(sys.argv))
221
218
 
222
219
    def load_list(option, opt_str, list_name, parser):
246
243
            options.parser.defaults[name] = value
247
244
 
248
245
    # Turn on Layer profiling if requested.
249
 
    from lp.services.testing import profiled
 
246
    from canonical.testing import profiled
250
247
    if local_options.verbose >= 3 and main_process:
251
248
        profiled.setup_profiling()
252
249