diff options
author | YAMAMOTO Takashi <yamamoto@valinux.co.jp> | 2014-10-14 10:34:56 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-10-14 10:54:36 +0900 |
commit | 2d52d1922bf2c0da7112b23676ec8accb3952739 (patch) | |
tree | b85fc03bd651ac26d32b4538db7f997e8d003a4d | |
parent | aae00a8ba5cf7f000ad8d30756ffee8cfd4545a6 (diff) |
test_parser: Make this independent from test environment path
To make this able to run via testr.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/tests/unit/ofproto/test_parser.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ryu/tests/unit/ofproto/test_parser.py b/ryu/tests/unit/ofproto/test_parser.py index d3131fd5..0dc2398c 100644 --- a/ryu/tests/unit/ofproto/test_parser.py +++ b/ryu/tests/unit/ofproto/test_parser.py @@ -194,12 +194,14 @@ class Test_Parser(unittest.TestCase): def _add_tests(): import os + import os.path import fnmatch import new import functools - packet_data_dir = '../packet_data' - json_dir = './ofproto/json' + this_dir = os.path.dirname(sys.modules[__name__].__file__) + packet_data_dir = os.path.join(this_dir, '../../packet_data') + json_dir = os.path.join(this_dir, 'json') ofvers = [ 'of10', 'of12', |