diff --git a/tools/integration_tests_runner.py b/tools/integration_tests_runner.py index 24255c325a..29ae8d2400 100644 --- a/tools/integration_tests_runner.py +++ b/tools/integration_tests_runner.py @@ -32,8 +32,11 @@ class IntegrationRunner: self.file_lock = Lock() self.tests = Queue() - self.resource_path_postfix = " \"--user_resource_path={}\"".format(self.user_resource_path) if self.user_resource_path else "" - + self.key_postfix = "" + if self.user_resource_path: + self.key_postfix += ' --user_resource_path="{0}"'.format(self.user_resource_path) + if self.data_path: + self.key_postfix += ' --data_path="{0}"'.format(self.data_path) def run_tests(self): for exec_file in self.runlist: @@ -76,11 +79,11 @@ class IntegrationRunner: keys = '"--filter={test}"'.format(test=test) if clean_env: tmpdir = tempfile.mkdtemp() - keys = '{old_key} "--user_resource_path={tmpdir}"'.format(old_key=keys, tmpdir=tmpdir) + keys = '{old_key} "--data_path={tmpdir}"'.format(old_key=keys, tmpdir=tmpdir) logging.debug("Temp dir: {tmpdir}".format(tmpdir=tmpdir)) else: - keys = "{old_key}{resource_path}".format(old_key=keys, resource_path=self.resource_path_postfix) - logging.debug("Setting user_resource_path to {resource_path}".format(resource_path=self.resource_path_postfix)) + keys = "{old_key}{resource_path}".format(old_key=keys, resource_path=self.key_postfix) + logging.debug("Setting user_resource_path and data_path to {resource_path}".format(resource_path=self.key_postfix)) out, err, result = self.get_tests_from_exec_file(test_file, keys) @@ -118,6 +121,7 @@ class IntegrationRunner: parser.add_option("-f", "--folder", dest="folder", default="omim-build-release/out/release", help="specify the folder where the tests reside (absolute path or relative to the location of this script)") parser.add_option("-i", "--include", dest="runlist", action="append", default=[], help="Include test into execution, comma separated list with no spaces or individual tests, or both. E.g.: -i one -i two -i three,four,five") parser.add_option("-r", "--user_resource_path", dest="user_resource_path", default="", help="Path to user resources, such as MWMs") + parser.add_option("-d", "--data_path", dest="data_path", default="", help="Path to the writable dir") (options, args) = parser.parse_args() @@ -133,6 +137,7 @@ class IntegrationRunner: self.runlist = filter(lambda x: x in tests_on_disk(self.workspace_path), interim_runlist) self.output = options.output self.user_resource_path = options.user_resource_path + self.data_path = options.data_path if __name__ == "__main__":