Symbol: Add presubmit testing

Add symbol's unit tests to presubmit.

Test: atest python-symbol_test
Change-Id: I37eb4151365507ab2a95d7789408504cca78153c
diff --git a/scripts/symbol.py b/scripts/symbol.py
index 6dbc5c4..e6560e4 100755
--- a/scripts/symbol.py
+++ b/scripts/symbol.py
@@ -28,8 +28,11 @@
 import subprocess
 import unittest
 
-ANDROID_BUILD_TOP = str(os.environ["ANDROID_BUILD_TOP"])
-if not ANDROID_BUILD_TOP:
+try:
+  ANDROID_BUILD_TOP = str(os.environ["ANDROID_BUILD_TOP"])
+  if not ANDROID_BUILD_TOP:
+    ANDROID_BUILD_TOP = "."
+except:
   ANDROID_BUILD_TOP = "."
 
 def FindSymbolsDir():
@@ -550,6 +553,7 @@
     ARCH = abi
     FindToolchain() # Will throw on failure.
 
+  @unittest.skipIf(ANDROID_BUILD_TOP == '.', 'Test only supported in an Android tree.')
   def test_toolchains_found(self):
     self.assert_toolchain_found("arm")
     self.assert_toolchain_found("arm64")