diff options
author | halton.huo <halton.huo@intel.com> | 2015-06-04 01:47:53 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-04 08:48:20 +0000 |
commit | aa0a06e511651d6e775d8c1594fe6894c1d886e5 (patch) | |
tree | 6f026a1fe2a8b464776c8e6446eacd503f8c546c /tools/idl_parser/idl_lexer_test.py | |
parent | 661e87b62f4f466432fbfef8851582f8ead4b25d (diff) | |
download | chromium_src-aa0a06e511651d6e775d8c1594fe6894c1d886e5.zip chromium_src-aa0a06e511651d6e775d8c1594fe6894c1d886e5.tar.gz chromium_src-aa0a06e511651d6e775d8c1594fe6894c1d886e5.tar.bz2 |
IDL: Allow run idl tests from anywhere.
BUG=
Review URL: https://codereview.chromium.org/1159603004
Cr-Commit-Position: refs/heads/master@{#332801}
Diffstat (limited to 'tools/idl_parser/idl_lexer_test.py')
-rwxr-xr-x | tools/idl_parser/idl_lexer_test.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/idl_parser/idl_lexer_test.py b/tools/idl_parser/idl_lexer_test.py index 8b20da8..f8d8bb9 100755 --- a/tools/idl_parser/idl_lexer_test.py +++ b/tools/idl_parser/idl_lexer_test.py @@ -3,11 +3,13 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import os import unittest from idl_lexer import IDLLexer from idl_ppapi_lexer import IDLPPAPILexer + # # FileToTokens # @@ -32,9 +34,10 @@ def TextToTokens(lexer, text): class WebIDLLexer(unittest.TestCase): def setUp(self): self.lexer = IDLLexer() + cur_dir = os.path.dirname(os.path.realpath(__file__)) self.filenames = [ - 'test_lexer/values.in', - 'test_lexer/keywords.in' + os.path.join(cur_dir, 'test_lexer/values.in'), + os.path.join(cur_dir, 'test_lexer/keywords.in') ] # @@ -89,9 +92,10 @@ class WebIDLLexer(unittest.TestCase): class PepperIDLLexer(WebIDLLexer): def setUp(self): self.lexer = IDLPPAPILexer() + cur_dir = os.path.dirname(os.path.realpath(__file__)) self.filenames = [ - 'test_lexer/values_ppapi.in', - 'test_lexer/keywords_ppapi.in' + os.path.join(cur_dir, 'test_lexer/values_ppapi.in'), + os.path.join(cur_dir, 'test_lexer/keywords_ppapi.in') ] |