Use default load.ini

This commit is contained in:
Andrey Pohilko 2012-11-12 16:20:06 +04:00
parent 68b4937452
commit 5816c33ed0

View File

@ -214,11 +214,16 @@ class ConsoleTank:
configs += [os.path.expanduser('~/.yandex-tank')]
if not self.options.config:
# just for old 'lunapark' compatibility
self.log.debug("No config passed via cmdline, using ./load.conf")
conf_file = self.__adapt_old_config(os.path.realpath('load.conf'))
configs += [conf_file]
self.core.add_artifact_file(conf_file, True)
if os.path.exists(os.path.realpath('load.ini')):
self.log.info("No config passed via cmdline, using ./load.ini")
configs += [os.path.realpath('load.ini')]
self.core.add_artifact_file(os.path.realpath('load.ini'), True)
elif os.path.exists(os.path.realpath('load.conf')):
# just for old 'lunapark' compatibility
self.log.warn("Using 'load.conf' is unrecommended, please use 'load.ini' instead")
conf_file = self.__adapt_old_config(os.path.realpath('load.conf'))
configs += [conf_file]
self.core.add_artifact_file(conf_file, True)
else:
for config_file in self.options.config:
self.__add_adapted_config(configs, config_file)