Merge "releasetools: Fix an issue with pubkey extraction."
This commit is contained in:
@@ -21,18 +21,12 @@ import unittest
|
||||
import zipfile
|
||||
|
||||
import common
|
||||
import test_utils
|
||||
from ota_from_target_files import (
|
||||
_LoadOemDicts, BuildInfo, GetPackageMetadata, Payload, PayloadSigner,
|
||||
WriteFingerprintAssertion)
|
||||
|
||||
|
||||
def get_testdata_dir():
|
||||
"""Returns the testdata dir, in relative to the script dir."""
|
||||
# The script dir is the one we want, which could be different from pwd.
|
||||
current_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
return os.path.join(current_dir, 'testdata')
|
||||
|
||||
|
||||
class MockScriptWriter(object):
|
||||
"""A class that mocks edify_generator.EdifyGenerator.
|
||||
|
||||
@@ -513,7 +507,7 @@ class PayloadSignerTest(unittest.TestCase):
|
||||
SIGNED_SIGFILE = 'signed-sigfile.bin'
|
||||
|
||||
def setUp(self):
|
||||
self.testdata_dir = get_testdata_dir()
|
||||
self.testdata_dir = test_utils.get_testdata_dir()
|
||||
self.assertTrue(os.path.exists(self.testdata_dir))
|
||||
|
||||
common.OPTIONS.payload_signer = None
|
||||
@@ -589,7 +583,7 @@ class PayloadSignerTest(unittest.TestCase):
|
||||
class PayloadTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.testdata_dir = get_testdata_dir()
|
||||
self.testdata_dir = test_utils.get_testdata_dir()
|
||||
self.assertTrue(os.path.exists(self.testdata_dir))
|
||||
|
||||
common.OPTIONS.wipe_user_data = False
|
||||
|
Reference in New Issue
Block a user