| Summary: | [ews-build] unit-tests fail when run from another directory | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Aakash Jain <aakash_jain> | ||||
| Component: | Tools / Tests | Assignee: | Aakash Jain <aakash_jain> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | aakash_jain, ap, dean_johnson, lforschler, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | Other | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
Created attachment 343204 [details]
Proposed patch
Add support for passing master_prefix_path in loadConfig.py. This is similar to what we do in other similar Buildbot related code.
Committed r233050: <https://trac.webkit.org/changeset/233050> |
unit-tests fail when run from another directory, e.g.: [~/code/OpenSource/Tools/BuildSlaveSupport]$python ews-build/loadConfig_unittest.py E.................. ====================================================================== ERROR: test_configuration (__main__.ConfigDotJSONTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "ews-build/loadConfig_unittest.py", line 33, in test_configuration loadConfig.loadBuilderConfig({}) File "/Users/jain/code1/OpenSource/Tools/BuildSlaveSupport/ews-build/loadConfig.py", line 39, in loadBuilderConfig config = json.load(open(os.path.join(master_prefix_path, 'config.json'))) IOError: [Errno 2] No such file or directory: './config.json' ---------------------------------------------------------------------- Ran 19 tests in 0.001s FAILED (errors=1) [~/code/OpenSource/Tools/BuildSlaveSupport]$cd ews-build [~/code/OpenSource/Tools/BuildSlaveSupport/ews-build]$python loadConfig_unittest.py ................... ---------------------------------------------------------------------- Ran 19 tests in 0.004s OK