diff options
author | jahinimtiaz <jahinimtiaz@google.com> | 2024-03-26 22:18:00 +0000 |
---|---|---|
committer | Jahin Imtiaz <jahinimtiaz@google.com> | 2024-03-29 16:25:52 +0000 |
commit | 84516e37537451f5c779b2fd64ed679f38fed249 (patch) | |
tree | 0cea4302f6a2206fe08c2fd09260d44c4a1ddfb1 | |
parent | a32c94aa969fafe799f512744c954652024080aa (diff) | |
download | tradefederation-84516e37537451f5c779b2fd64ed679f38fed249.tar.gz |
Pass keyStoreClient when backfill sandbox config
Bug: 328070326
Test: Presubmit, https://atp.googleplex.com/test_runs/393826008
Change-Id: Ia011c138e87e5690573429181e84e0b6ee8036d8
-rw-r--r-- | src/com/android/tradefed/sandbox/TradefedSandbox.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/tradefed/sandbox/TradefedSandbox.java b/src/com/android/tradefed/sandbox/TradefedSandbox.java index 4d07e261b..2289b9378 100644 --- a/src/com/android/tradefed/sandbox/TradefedSandbox.java +++ b/src/com/android/tradefed/sandbox/TradefedSandbox.java @@ -63,6 +63,7 @@ import com.android.tradefed.util.SubprocessExceptionParser; import com.android.tradefed.util.SubprocessTestResultsParser; import com.android.tradefed.util.SystemUtil; import com.android.tradefed.util.keystore.IKeyStoreClient; +import com.android.tradefed.util.keystore.KeyStoreException; import com.google.common.base.Joiner; @@ -614,12 +615,16 @@ public class TradefedSandbox implements ISandbox { } tmpParentConfig = FileUtil.createTempFile("parent-config", ".xml", mSandboxTmpFolder); pw = new PrintWriter(tmpParentConfig); - parentConfig = ConfigurationFactory.getInstance().createConfigurationFromArgs(args); + IKeyStoreClient keyStoreClient = + GlobalConfiguration.getInstance().getKeyStoreFactory().createKeyStoreClient(); + parentConfig = + ConfigurationFactory.getInstance() + .createConfigurationFromArgs(args, null, keyStoreClient); // Do not print deprecated options to avoid compatibility issues, and do not print // unchanged options. parentConfig.dumpXml(pw, new ArrayList<>(), false, false); return tmpParentConfig; - } catch (ConfigurationException | IOException e) { + } catch (ConfigurationException | IOException | KeyStoreException e) { CLog.e("Parent doesn't understand the command either:"); CLog.e(e); FileUtil.deleteFile(tmpParentConfig); |