diff options
author | Timofey <t.danshin@corp.mail.ru> | 2015-07-20 20:54:36 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:56:39 +0300 |
commit | 6c03ca3939c5d0e3225fdd32477d62bb98320f89 (patch) | |
tree | f9d5b10f005e15dba6a6f44537be210c789da268 /tools | |
parent | bb218416d674a3e1662bda4310b025678406f2a0 (diff) |
Added the possibility to pass data and resource path to the test executables.
Ilya Zverev added parameters to the test executables that specify the path to the mwm/routing files and resources. That broke the tests on Linux.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/run_desktop_tests.py | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/tools/run_desktop_tests.py b/tools/run_desktop_tests.py index 6b35b9a66f..61f49cc2fd 100755 --- a/tools/run_desktop_tests.py +++ b/tools/run_desktop_tests.py @@ -34,6 +34,10 @@ workspace_path = "omim-build-release/out/release" skiplist = [] runlist = [] logfile = "testlog.log" +data_path = None +user_resource_path = None + + TO_RUN = "to_run" SKIP = "skip" @@ -68,6 +72,10 @@ Possbile options: -o --output : resulting log file. Default testlog.log +-d --data_path : Path to data files (passed to the test executables as --data_path=<value>) + +-u --user_resource_path : Path to resources, styles and classificators (passed to the test executables as --user_resource_path=<value>) + Example @@ -81,10 +89,12 @@ def set_global_vars(): global logfile global runlist global workspace_path + global data_path + global user_resource_path try: - opts, args = getopt.getopt(sys.argv[1:], "he:f:o:i:", - ["help", "exclude=", "include=", "folder=", "output="]) + opts, args = getopt.getopt(sys.argv[1:], "he:f:o:i:d:u:", + ["help", "exclude=", "include=", "folder=", "output=", "data_path=", "user_resource_path="]) except getopt.GetoptError as err: print(str(err)) usage() @@ -103,6 +113,11 @@ def set_global_vars(): runlist = argument.split(",") elif option in ("-f", "--folder"): workspace_path = argument + elif option in ("-d", "--data_path"): + data_path = " --data_path={argument} ".format(argument=argument) + elif option in ("-u", "--user_resource_path"): + user_resource_path = " --user_resource_path={argument} ".format(argument=argument) + else: assert False, "unhandled option" @@ -154,6 +169,8 @@ def run_tests(tests_to_run): if file == "platform_tests": start_server() + file="{file}{data}{resources}".format(file=file, data=data_path, resources=user_resource_path) + process = subprocess.Popen("{tests_path}/{file} 2>> {logfile}". format(tests_path=workspace_path, file=file, logfile=logfile), shell=True, |