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:
parent
9f7ce3d27f
commit
9ab148c450
|
@ -53,12 +53,29 @@ def run_test(test_name, path):
|
||||||
print("{} {}".format(prefix_pass, test_name))
|
print("{} {}".format(prefix_pass, test_name))
|
||||||
return True
|
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__))
|
root_dir = os.path.dirname(os.path.realpath(__file__))
|
||||||
test_dir = os.path.join(root_dir, "tests")
|
test_dir = os.path.join(root_dir, "tests")
|
||||||
tests = os.listdir(test_dir)
|
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
|
success = True
|
||||||
for test in sorted(tests):
|
for test in sorted(tests):
|
||||||
|
if test.startswith("slow") and not run_slow:
|
||||||
|
continue
|
||||||
path = os.path.join(test_dir, test)
|
path = os.path.join(test_dir, test)
|
||||||
if not os.path.isdir(path):
|
if not os.path.isdir(path):
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue