Lines Matching +full:open +full:- +full:source
16 def run_test(target, source, env): argument
17 if len(source) > 1:
18 infile = open(str(source[1]))
25 args = [str(source[0])]
33 stdout = open(str(target[0]), 'w'),
47 def decode_actions(source, target, env, for_signature): argument
49 dirs = ' '.join(['-I' + esc(env.GetBuildPath(d)) for d in env['PROTOCPATH']])
50 return '$PROTOC $PROTOCFLAGS %s --decode=%s %s <%s >%s' % (
51 dirs, env['MESSAGE'], esc(str(source[1])), esc(str(source[0])), esc(str(target[0])))
58 def encode_actions(source, target, env, for_signature): argument
60 dirs = ' '.join(['-I' + esc(env.GetBuildPath(d)) for d in env['PROTOCPATH']])
61 return '$PROTOC $PROTOCFLAGS %s --encode=%s %s <%s >%s' % (
62 dirs, env['MESSAGE'], esc(str(source[1])), esc(str(source[0])), esc(str(target[0])))
69 def compare_files(target, source, env): argument
70 data1 = open(str(source[0]), 'rb').read()
71 data2 = open(str(source[1]), 'rb').read()
73 … print('\033[32m[ OK ]\033[0m Files equal: ' + str(source[0]) + ' and ' + str(source[1]))
76 … print('\033[31m[FAIL]\033[0m Files differ: ' + str(source[0]) + ' and ' + str(source[1]))
84 def match_files(target, source, env): argument
85 data = open(str(source[0]), 'rU').read()
86 patterns = open(str(source[1]))
97 … print('\033[31m[FAIL]\033[0m Pattern not found in ' + str(source[0]) + ': ' + pattern)
100 …t('\033[31m[FAIL]\033[0m Pattern should not exist, but does in ' + str(source[0]) + ': ' + patte…
103 print('\033[32m[ OK ]\033[0m All patterns found in ' + str(source[0]))