Merge "[ApfCounterTest] Add new test case for APF counters"
diff --git a/acts/framework/acts/controllers/packet_capture.py b/acts/framework/acts/controllers/packet_capture.py
index df3a989..0528aa2 100755
--- a/acts/framework/acts/controllers/packet_capture.py
+++ b/acts/framework/acts/controllers/packet_capture.py
@@ -320,12 +320,10 @@
Args:
pid: process id of tcpdump to kill.
"""
- for key,val in self.pcap_properties.items():
+ for key, val in self.pcap_properties.items():
if val.pid == pid:
break
- try:
- key
- except NameError:
+ else:
self.log.error("Failed to stop tcpdump. Invalid PID %s" % pid)
return
diff --git a/acts/framework/acts/test_utils/tel/tel_test_utils.py b/acts/framework/acts/test_utils/tel/tel_test_utils.py
index 62275cf..07838e2 100644
--- a/acts/framework/acts/test_utils/tel/tel_test_utils.py
+++ b/acts/framework/acts/test_utils/tel/tel_test_utils.py
@@ -2552,11 +2552,14 @@
try:
ad.log.info("Download %s to %s by adb shell command %s", url,
file_path, curl_cmd)
- out = ad.adb.shell("df -h")
- ad.log.debug("%s", out)
+ for cmd in ("df -h", "du -d 4 -h"):
+ out = ad.adb.shell(cmd)
+ ad.log.debug("%s", out)
+
ad.adb.shell(curl_cmd, timeout=timeout)
if _check_file_existance(ad, file_path, expected_file_size):
ad.log.info("%s is downloaded to %s successfully", url, file_path)
+ return True
else:
ad.log.warning("Fail to download %s", url)
return False
@@ -2722,8 +2725,9 @@
ad.log.info("Before downloading: %s", data_accounting)
ad.log.info("Download file from %s to %s by sl4a RPC call", url,
file_path)
- out = ad.adb.shell("df -h")
- ad.log.debug("%s", out)
+ for cmd in ("df -h", "du -d 4 -h"):
+ out = ad.adb.shell(cmd)
+ ad.log.debug("%s", out)
try:
ad.data_droid.httpDownloadFile(url, file_path, timeout=timeout)
except Exception as e: