diff --git a/src/core/driver/drivers.py b/src/core/driver/drivers.py index 620bfe6942278b87118be265c951deb639b7473b..e4e66077b4bd73012b1ddff24b3279d12347d9b6 100755 --- a/src/core/driver/drivers.py +++ b/src/core/driver/drivers.py @@ -20,6 +20,7 @@ import json import os import re import shutil +import subprocess import time import platform import zipfile @@ -404,8 +405,12 @@ class ResultManager(object): if self.is_exist_target_in_device(DEFAULT_TEST_PATH, target_name): if not os.path.exists(cxx_cov_path): os.makedirs(cxx_cov_path) - src_file = os.path.join(DEFAULT_TEST_PATH, target_name) - self.device.pull_file(src_file, cxx_cov_path, is_create=True, timeout=TIME_OUT) + self.config.device.execute_shell_command( + "cd %s; tar -cvf %s.tar %s" % (DEFAULT_TEST_PATH, target_name, target_name)) + src_file_tar = os.path.join(DEFAULT_TEST_PATH, "%s.tar" % target_name) + self.device.pull_file(src_file_tar, cxx_cov_path, is_create=True, timeout=TIME_OUT) + subprocess.Popen("tar -xvf %s -C %s" % (os.path.join(cxx_cov_path, "%s.tar" % target_name), cxx_cov_path), + stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False) ##############################################################################