Symbol: Add presubmit testing

Add symbol's unit tests to presubmit.

Test: atest python-symbol_test
Change-Id: I37eb4151365507ab2a95d7789408504cca78153c
This commit is contained in:
Andreas Gampe
2018-10-29 18:31:37 -07:00
parent 3ee240c6c3
commit e547eb3c9b
4 changed files with 26 additions and 2 deletions

View File

@@ -28,8 +28,11 @@ import signal
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 @@ class FindToolchainTests(unittest.TestCase):
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")