Last change
on this file was 988, checked in by Silvan Scherrer, 9 years ago |
Samba Server: update vendor to version 4.4.3
|
File size:
963 bytes
|
Line | |
---|
1 | #!/usr/bin/env python
|
---|
2 |
|
---|
3 | #
|
---|
4 | # Compare the results of native and cross-compiled configure tests
|
---|
5 | #
|
---|
6 |
|
---|
7 | import sys
|
---|
8 | import difflib
|
---|
9 |
|
---|
10 | exceptions = ['BUILD_DIRECTORY', 'CROSS_COMPILE', 'CROSS_ANSWERS',
|
---|
11 | 'CROSS_EXECUTE', 'SELFTEST_PREFIX']
|
---|
12 |
|
---|
13 | base_lines = list()
|
---|
14 | base_fname = ''
|
---|
15 |
|
---|
16 | found_diff = False
|
---|
17 |
|
---|
18 | for fname in sys.argv[1:]:
|
---|
19 | lines = list()
|
---|
20 | f = open(fname, 'r')
|
---|
21 | for line in f:
|
---|
22 | if len(line.split('=', 1)) == 2:
|
---|
23 | key = line.split('=', 1)[0].strip()
|
---|
24 | if key in exceptions:
|
---|
25 | continue
|
---|
26 | lines.append(line)
|
---|
27 | f.close()
|
---|
28 | if base_fname:
|
---|
29 | diff = list(difflib.unified_diff(base_lines,lines,base_fname,fname))
|
---|
30 | if diff:
|
---|
31 | print 'configuration files %s and %s do not match' % (base_fname, fname)
|
---|
32 | for l in diff:
|
---|
33 | sys.stdout.write(l)
|
---|
34 | found_diff = True
|
---|
35 | else:
|
---|
36 | base_fname = fname
|
---|
37 | base_lines = lines
|
---|
38 |
|
---|
39 | if found_diff:
|
---|
40 | sys.exit(1)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.