mirror of
https://gitee.com/openharmony/testfwk_xdevice
synced 2024-11-30 02:50:56 +00:00
删除规避弹窗的命令,增加linux环境下last目录的区分操作
Signed-off-by: deveco_xdevice <liguangjie1@huawei.com>
This commit is contained in:
parent
ba15202dd7
commit
c51c6608b1
@ -693,8 +693,6 @@ class AppInstallKit(ITestKit):
|
||||
if len(self.app_list) == 0:
|
||||
LOG.info("No app to install, skipping!")
|
||||
return
|
||||
# to disable app install alert
|
||||
device.execute_shell_command("setprop persist.sys.platformautotest 1")
|
||||
for app in self.app_list:
|
||||
if self.alt_dir:
|
||||
app_file = get_file_absolute_path(app, self.paths,
|
||||
|
@ -15,8 +15,9 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
import getpass
|
||||
import os
|
||||
import platform
|
||||
import sys
|
||||
import tempfile
|
||||
from dataclasses import dataclass
|
||||
@ -66,8 +67,7 @@ def _init_global_config():
|
||||
MODULES_DIR, "_core", "resource"))
|
||||
|
||||
# create xdevice temp folder
|
||||
Variables.temp_dir = os.path.join(tempfile.gettempdir(),
|
||||
"xdevice_data")
|
||||
Variables.temp_dir = os.path.join(_get_temp_dir(), "xdevice_data")
|
||||
if not os.path.exists(Variables.temp_dir):
|
||||
os.makedirs(Variables.temp_dir)
|
||||
|
||||
@ -97,6 +97,14 @@ def _init_global_config():
|
||||
_init_logger()
|
||||
|
||||
|
||||
def _get_temp_dir():
|
||||
name = platform.system()
|
||||
if name == "Linux":
|
||||
return os.path.join(tempfile.gettempdir(), getpass.getuser())
|
||||
else:
|
||||
return tempfile.gettempdir()
|
||||
|
||||
|
||||
def _init_logger():
|
||||
import time
|
||||
from _core.constants import LogType
|
||||
|
Loading…
Reference in New Issue
Block a user