mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
b32df94527
This uses the build-directory which, hence is not the same. Achieve this by adding the path itself and the whole defines dictionary to the exclude list. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
42 lines
1018 B
Python
Executable File
42 lines
1018 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
#
|
|
# Compare the results of native and cross-compiled configure tests
|
|
#
|
|
|
|
import sys
|
|
import difflib
|
|
|
|
exceptions = ['BUILD_DIRECTORY', 'CROSS_COMPILE', 'CROSS_ANSWERS',
|
|
'CROSS_EXECUTE', 'SELFTEST_PREFIX', 'LIBSOCKET_WRAPPER_SO_PATH',
|
|
'defines' ]
|
|
|
|
base_lines = list()
|
|
base_fname = ''
|
|
|
|
found_diff = False
|
|
|
|
for fname in sys.argv[1:]:
|
|
lines = list()
|
|
f = open(fname, 'r')
|
|
for line in f:
|
|
if len(line.split('=', 1)) == 2:
|
|
key = line.split('=', 1)[0].strip()
|
|
if key in exceptions:
|
|
continue
|
|
lines.append(line)
|
|
f.close()
|
|
if base_fname:
|
|
diff = list(difflib.unified_diff(base_lines,lines,base_fname,fname))
|
|
if diff:
|
|
print 'configuration files %s and %s do not match' % (base_fname, fname)
|
|
for l in diff:
|
|
sys.stdout.write(l)
|
|
found_diff = True
|
|
else:
|
|
base_fname = fname
|
|
base_lines = lines
|
|
|
|
if found_diff:
|
|
sys.exit(1)
|