diff options
author | montellese <montellese@xbmc.org> | 2011-01-28 14:08:12 +0100 |
---|---|---|
committer | montellese <montellese@xbmc.org> | 2011-04-01 20:35:50 +0200 |
commit | 0158bd9ab97f4a4fa8d7770f4137905a3503b224 (patch) | |
tree | c457e66ff0e2eb2a7e2121e3e2d7719dfc8c73cc /lib/jsoncpp/test/runjsontests.py | |
parent | 97b5e9f770405d37ce0f6ca95f538e80fefe18aa (diff) |
JSONRPC: update of jsoncpp library to latest revision
Diffstat (limited to 'lib/jsoncpp/test/runjsontests.py')
-rw-r--r-- | lib/jsoncpp/test/runjsontests.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/jsoncpp/test/runjsontests.py b/lib/jsoncpp/test/runjsontests.py index e05bd52b48..800337d4c3 100644 --- a/lib/jsoncpp/test/runjsontests.py +++ b/lib/jsoncpp/test/runjsontests.py @@ -4,7 +4,6 @@ import os.path from glob import glob import optparse -RUN_JSONCHECKER = False VALGRIND_CMD = 'valgrind --tool=memcheck --leak-check=yes --undef-value-errors=yes ' def compareOutputs( expected, actual, message ): @@ -39,12 +38,12 @@ def safeReadFile( path ): return '<File "%s" is missing: %s>' % (path,e) def runAllTests( jsontest_executable_path, input_dir = None, - use_valgrind=False ): + use_valgrind=False, with_json_checker=False ): if not input_dir: input_dir = os.path.join( os.getcwd(), 'data' ) tests = glob( os.path.join( input_dir, '*.json' ) ) - if RUN_JSONCHECKER: - test_jsonchecker = glob( os.path.join( input_dir, 'jsonchecker', '*.json' ) ) + if with_json_checker: + test_jsonchecker = glob( os.path.join( input_dir, '../jsonchecker', '*.json' ) ) else: test_jsonchecker = [] failed_tests = [] @@ -112,6 +111,9 @@ def main(): parser.add_option("--valgrind", action="store_true", dest="valgrind", default=False, help="run all the tests using valgrind to detect memory leaks") + parser.add_option("-c", "--with-json-checker", + action="store_true", dest="with_json_checker", default=False, + help="run all the tests from the official JSONChecker test suite of json.org") parser.enable_interspersed_args() options, args = parser.parse_args() @@ -125,7 +127,7 @@ def main(): else: input_path = None status = runAllTests( jsontest_executable_path, input_path, - use_valgrind=options.valgrind ) + use_valgrind=options.valgrind, with_json_checker=options.with_json_checker ) sys.exit( status ) if __name__ == '__main__': |