1f0704e462
Also adds a test to ensure that they stay that way. Change-Id: Ib34a81885f1eda28e85d04b727e8b810b274cb44
25 lines
500 B
Python
25 lines
500 B
Python
#!/usr/bin/env
|
|
|
|
import sys
|
|
import difflib
|
|
|
|
|
|
def assert_sorted(lines):
|
|
if lines == sorted(lines):
|
|
return True
|
|
else:
|
|
print "Modules not sorted:"
|
|
for line in difflib.context_diff(lines, sorted(lines)):
|
|
print line
|
|
sys.exit(1)
|
|
|
|
|
|
with open(sys.argv[1]) as f:
|
|
lines = f.readlines()
|
|
|
|
integration = [i for i in lines if i.startswith('INTEGRATION')]
|
|
source = [i for i in lines if i.startswith('SOURCE')]
|
|
|
|
assert_sorted(integration)
|
|
assert_sorted(source)
|