versioner: introduce.
Add a clang-based tool to inspect header availability attributes and
verify them against the NDK platform definitions.
Bug: http://b/28178111
Change-Id: I1bb1925a620e98cc9606cb5a3360b1224c700bd0
diff --git a/tools/versioner/tests/multiple_decl_mismatch/expected_fail b/tools/versioner/tests/multiple_decl_mismatch/expected_fail
new file mode 100644
index 0000000..6d0d209
--- /dev/null
+++ b/tools/versioner/tests/multiple_decl_mismatch/expected_fail
@@ -0,0 +1,5 @@
+foo: availability mismatch for arm-9
+ foo declared in 2 locations:
+ extern function declaration @ headers/bar.h:1:5 [obsoleted = 12]
+ extern function declaration @ headers/foo.h:1:5 [obsoleted = 9]
+versioner: sanity check failed
diff --git a/tools/versioner/tests/multiple_decl_mismatch/headers/bar.h b/tools/versioner/tests/multiple_decl_mismatch/headers/bar.h
new file mode 100644
index 0000000..95f0174
--- /dev/null
+++ b/tools/versioner/tests/multiple_decl_mismatch/headers/bar.h
@@ -0,0 +1 @@
+int foo() __attribute__((availability(android, obsoleted = 12)));
diff --git a/tools/versioner/tests/multiple_decl_mismatch/headers/foo.h b/tools/versioner/tests/multiple_decl_mismatch/headers/foo.h
new file mode 100644
index 0000000..9c81a89
--- /dev/null
+++ b/tools/versioner/tests/multiple_decl_mismatch/headers/foo.h
@@ -0,0 +1 @@
+int foo() __attribute__((availability(android, obsoleted = 9)));
diff --git a/tools/versioner/tests/multiple_decl_mismatch/platforms/android-9/arch-arm/symbols/libc.so.functions.txt b/tools/versioner/tests/multiple_decl_mismatch/platforms/android-9/arch-arm/symbols/libc.so.functions.txt
new file mode 100644
index 0000000..257cc56
--- /dev/null
+++ b/tools/versioner/tests/multiple_decl_mismatch/platforms/android-9/arch-arm/symbols/libc.so.functions.txt
@@ -0,0 +1 @@
+foo
diff --git a/tools/versioner/tests/multiple_decl_mismatch/run.sh b/tools/versioner/tests/multiple_decl_mismatch/run.sh
new file mode 100644
index 0000000..d26ab70
--- /dev/null
+++ b/tools/versioner/tests/multiple_decl_mismatch/run.sh
@@ -0,0 +1 @@
+versioner headers dependencies -p platforms -r arm -a 9