• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# -*- coding: utf-8 -*-
2# Copyright (c) 2023 Huawei Device Co., Ltd.
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#!/usr/bin/python3
15# -*- coding: utf-8 -*-
16
17import os
18# PATH='D:\\repo_test\\APL_compare_02\\'
19# PATH=os.getcwd()+'/'
20PATH = os.path.dirname(os.path.realpath(__file__)) + os.sep
21# read_excel.py
22'''
23SHEET_NAME:excel中的表名,中英文都可
24COLS:excel中的列号,从0开始
25SVN:SVN的安装目录下/bin目录(SVN在环境变量中的位置)
26SVN_URL:excel文件对应的url
27USER:svn的用户名
28PWD:svn的密码
29FILE_PATH:本地下载文件的路径
30'''
31SHEET_NAME = "Sheet1"
32COLS = [1, 3]
33
34SVN = 'D:/TortoiseSVN/bin'
35SVN_URL = 'https://PMAIL_2140981.china.huawei.com/svn/test测试/01 目录/01_1 目录/APL基线标准v1.0.xlsx'
36USER = 'hhhhs'
37PWD = '123456'
38FILE_PATH = PATH + SVN_URL.split('/')[-1]
39
40# read_device.py
41'''
42SQL_SRC:设备上的数据库路径
43SQL_DES:本地下载文件路径
44DOWNLOAD_DB:从设备下载的hdc命令
45QUERY_HAP_APL:查询HAP APL的sql语句(查询多列可以依次添加字段,添加字段的顺序为比较时的字段优先级)
46QUERY_NATIVE_APL:查Native APL的sql语句
47'''
48SQL_SRC = " /data/service/el1/public/access_token/access_token.db"
49SQL_DES = PATH
50DOWNLOAD_DB = "hdc -t {} file recv"
51QUERY_HAP_APL = "select bundle_name,apl from hap_token_info_table"
52QUERY_NATIVE_APL = "select process_name,apl from native_token_info_table"
53
54'''
55APL_LOG_FILE:执行脚本的日志信息
56APL_RECORD_PATH:APL对比记录的日志信息
57IS_OVERWRITE:是否覆盖之前的APL日志,w表示覆盖,a表示追加
58'''
59APL_LOG_FILE = PATH + 'apl_compare.log'
60APL_RECORD_PATH = PATH + 'apl_record.txt'
61IS_OVERWRITE = 'w'
62