relesetools: Support running all the unittests with atest.

All the unittests will be built into releasetools_test. One can run the
tests with `atest releasetools_test` or the traditional way
`test_utils.py`. The atest way is recommended, which additionally builds
the required tools.

With the current support in Soong, we can't pack the built tools into
releasetools_test yet. So running `releasetools_test` alone in clound
would fail. Follow-up CLs will address the issue in order to deploy the
tests with TEST_MAPPING.

Bug: 112080715
Test: `atest releasetools_test`
Change-Id: Ica95517a5ab326f4e58fc57c6c2c276cfe882f3c
This commit is contained in:
Tao Bao
2019-04-09 00:12:30 -07:00
parent fc6948b588
commit 30e31142ce
4 changed files with 98 additions and 4 deletions

View File

@@ -56,8 +56,10 @@ class ApexUtilsTest(test_utils.ReleaseToolsTestCase):
def test_SignApexPayload_withSignerHelper(self):
payload_file = self._GetTestPayload()
signing_helper = os.path.join(self.testdata_dir, 'signing_helper.sh')
os.chmod(signing_helper, 0o700)
payload_signer_args = '--signing_helper_with_files {}'.format(
os.path.join(self.testdata_dir, 'signing_helper.sh'))
signing_helper)
apex_utils.SignApexPayload(
payload_file,
self.payload_key,