blob: 545703bf3bdce21c130c2d1222747b8293771138 [file] [log] [blame]
Matthew Treinish3d468112013-10-24 21:49:14 +00001# vim: tabstop=4 shiftwidth=4 softtabstop=4
2
3# Copyright 2013 IBM Corp.
4# All Rights Reserved.
5#
6# Licensed under the Apache License, Version 2.0 (the "License"); you may
7# not use this file except in compliance with the License. You may obtain
8# a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15# License for the specific language governing permissions and limitations
16# under the License.
17#
18
19import sys
20
21from tempest import config
22from tempest.openstack.common.config import generator
23
Matthew Treinish6eb05852013-11-26 15:28:12 +000024# NOTE(mtreinish): This hack is needed because of how oslo config is used in
25# tempest. Tempest is run from inside a test runner and so we can't rely on the
26# global CONF object being fully populated when we run a test. (test runners
27# don't init every file for running a test) So to get around that we manually
28# load the config file in tempest for each test class to ensure that every
29# config option is set. However, the tool expects the CONF object to be fully
30# populated when it inits all the files in the project. This just works around
31# the issue by manually loading the config file (which may or may not exist)
32# which will populate all the options before running the generator.
Matthew Treinish3d468112013-10-24 21:49:14 +000033
34config.TempestConfig()
35generator.generate(sys.argv[1:])