versioner: add idempotence test that uses the bionic headers.

Bug: http://b/30170081
Change-Id: Iaf798077518a1a82c626c3b1524633c6df578409
Test: python run_tests.py
This commit is contained in:
Josh Gao 2016-08-15 14:19:05 -07:00
parent 9f7ce3d27f
commit 9ab148c450
2 changed files with 23 additions and 0 deletions

View File

@ -53,12 +53,29 @@ def run_test(test_name, path):
print("{} {}".format(prefix_pass, test_name))
return True
def usage():
print("Usage: run_tests.py [-f]")
print(" -f\t\tdon't run slow tests")
sys.exit(0)
root_dir = os.path.dirname(os.path.realpath(__file__))
test_dir = os.path.join(root_dir, "tests")
tests = os.listdir(test_dir)
run_slow = True
if len(sys.argv) > 2:
usage()
elif len(sys.argv) == 2:
if sys.argv[1] != "-f":
usage()
run_slow = False
success = True
for test in sorted(tests):
if test.startswith("slow") and not run_slow:
continue
path = os.path.join(test_dir, test)
if not os.path.isdir(path):
continue

View File

@ -0,0 +1,6 @@
rm -rf out
set -e
mkdir out
versioner -o out/initial
versioner out/initial ../../dependencies -o out/second
diff -qrwB out/initial out/second