diff options
author | don bright <hugh.m.bright@gmail.com> | 2013-02-01 01:01:31 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2013-02-01 01:01:31 (GMT) |
commit | 0c04641aa06b5831605deaec54e3cd90a42b00d2 (patch) | |
tree | ac45d079880c231a63c8f86a8326bd51452cf559 /tests/test_cmdline_tool.py | |
parent | 8776da0b68fd647e8cc5e444c2d002f91fbd51e9 (diff) |
clarify code that enables 'sharing' of expected imgs between test progs
Diffstat (limited to 'tests/test_cmdline_tool.py')
-rwxr-xr-x | tests/test_cmdline_tool.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test_cmdline_tool.py b/tests/test_cmdline_tool.py index 2ccd301..78524bf 100755 --- a/tests/test_cmdline_tool.py +++ b/tests/test_cmdline_tool.py @@ -28,6 +28,9 @@ import shutil import platform import string +share_expected_imgs = {} +share_expected_imgs["guicgalpngtest"] = "cgalpngtest" + def initialize_environment(): if not options.generate: options.generate = bool(os.getenv("TEST_GENERATE")) return True @@ -35,9 +38,8 @@ def initialize_environment(): def init_expected_filename(testname, cmd): global expecteddir, expectedfilename testbinary_filename = os.path.split(cmd)[1] - # guicgalpngtest uses the images from cgalpngtest - if testbinary_filename.startswith("gui"): - testbinary_filename = testbinary_filename[3:] + if testbinary_filename in share_expected_imgs: + testbinary_filename = share_expected_imgs[testbinary_filename] expecteddir = os.path.join(options.regressiondir, testbinary_filename ) expectedfilename = os.path.join(expecteddir, testname + "-expected." + options.suffix) expectedfilename = os.path.normpath( expectedfilename ) |