Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8471a9d3 authored by Victor Hsieh's avatar Victor Hsieh
Browse files

ApkVerityTest: print debug log in retry loop

This adds more visibility to when the cache was not evicted for some
reasons.

Test: run atest, saw the log
Bug: 146350859
Change-Id: I926c9702ff5540ff8291f447d14559fcf5f8395e
parent 30b1ff1b
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -27,6 +27,7 @@ import android.platform.test.annotations.RootPermissionTest;


import com.android.tradefed.device.DeviceNotAvailableException;
import com.android.tradefed.device.DeviceNotAvailableException;
import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.log.LogUtil.CLog;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test;
import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test;
import com.android.tradefed.util.CommandResult;
import com.android.tradefed.util.CommandResult;
@@ -412,6 +413,7 @@ public class ApkVerityTest extends BaseHostJUnit4Test {
                        break;
                        break;
                    }
                    }
                    try {
                    try {
                        CLog.d("lsof: " + expectRemoteCommandToSucceed("lsof " + apkPath));
                        Thread.sleep(1000);
                        Thread.sleep(1000);
                        String pid = expectRemoteCommandToSucceed("pidof system_server");
                        String pid = expectRemoteCommandToSucceed("pidof system_server");
                        mDevice.executeShellV2Command("kill -10 " + pid);  // force GC
                        mDevice.executeShellV2Command("kill -10 " + pid);  // force GC