mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-12 10:03:51 +01:00
Moved jsontestrunner data from test/ to test/data.
This commit is contained in:
parent
45c499d310
commit
7dec64f57e
@ -262,8 +262,9 @@ def runJSONTests_action( target, source = None, env = None ):
|
||||
# Add test scripts to python path
|
||||
jsontest_path = Dir( '#test' ).abspath
|
||||
sys.path.insert( 0, jsontest_path )
|
||||
data_path = os.path.join( jsontest_path, 'data' )
|
||||
import runjsontests
|
||||
return runjsontests.runAllTests( os.path.abspath(source[0].path), jsontest_path )
|
||||
return runjsontests.runAllTests( os.path.abspath(source[0].path), data_path )
|
||||
|
||||
def runJSONTests_string( target, source = None, env = None ):
|
||||
return 'RunJSONTests("%s")' % source[0]
|
||||
|
@ -4,7 +4,7 @@ import os
|
||||
|
||||
paths = []
|
||||
for pattern in [ '*.actual', '*.actual-rewrite', '*.rewrite', '*.process-output' ]:
|
||||
paths += glob.glob( pattern )
|
||||
paths += glob.glob( 'data/' + pattern )
|
||||
|
||||
for path in paths:
|
||||
os.unlink( path )
|
||||
|
@ -41,7 +41,7 @@ def safeReadFile( path ):
|
||||
def runAllTests( jsontest_executable_path, input_dir = None,
|
||||
use_valgrind=False ):
|
||||
if not input_dir:
|
||||
input_dir = os.getcwd()
|
||||
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' ) )
|
||||
|
Loading…
Reference in New Issue
Block a user