#  Copyright (c) 2022 Huawei Device Co., Ltd.
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.



# 注意:如果target_type有了更改,要相应改变config.py中collector_config
target_type:
  - shared_library
  - ohos_shared_library
  - static_library
  - ohos_static_library
  - executable
  - ohos_executable
  - lite_library
  - ohos_hap
  - ohos_prebuilt_etc
  - ohos_prebuilt_para
  - ohos_sa_profile
  - ohos_prebuilt_shared_library
  - lite_component
  - target
  - unittest
  - hap_pack
  - copy
  
subsystem_component:
  save: true
  filename: sub_com_info.json
gn_info_file: gn_info.json

# extension and prefix of products
default_extension:
  shared_library: .so
  static_library: .a
  app: .hap

default_prefix:
  shared_library: lib
  static_library: lib

# black list for command 'grep', it should be the subdirectory of the root path of oh
black_list: 
  - .repo
  - .ccache
  - doc
  - build
  # 排除out目录,为了避免排除其他路径下的out目录,这里详细列出了out下的所有目录
  - out/gen
  - out/hispark_pegasus
  - out/hispark_taurus
  - out/kernel
  - out/preloader
  - out/rk3568
  # 如果发现了跨形态的错误,如:检查A形态,但是发现将A形态的产品归属到B形态下了,则也可以将B形态的对应路径加在这里进行过滤

# product configuration

ipcamera_hispark_taurus: 
  product_infofile: ipcamera_hispark_taurus_product.json # 编译产物的信息
  output_name: ipcamera_hispark_taurus_result.json # 输出文件的名字
  product_dir: # [required]
    root: out/hispark_taurus/ipcamera_hispark_taurus/rootfs
    relative: 
      bin: bin
      so: usr/lib
      etc: etc
      hap: system/internal
    rest: True  # 是否将上面root目录下除了relative指定的目录归到etc并进行匹配
  query_order:  # 匹配顺序,key应当何relative字段中的key一致,value应当在上面的target_type字段中
    so: 
      - shared_library
      - ohos_shared_library
      - ohos_prebuilt_shared_library
      - lite_library
      - lite_component   
      - target
      - unittest
    bin:
      - executable
      - ohos_executable
      - lite_component
      - unittest
    hap: 
      - hap_pack
  # 对于脚本无法自动检测或误测部分,在这里手动配置
  # manual_config:
  #   usr/lib/libplugin_demuxer_ffmpeg.so: # start with out
  #     subsystem: test_manual_config # [required]
  #     component: test_manual_config # [required]
  #     other_detail_info_key: other_detail_info_value # [optional]
      

ipcamera_hispark_taurus_linux:
  product_infofile: ipcamera_hispark_taurus_linux_product.json
  output_name: ipcamera_hispark_taurus_linux_result.json
  product_dir:
    root: out/hispark_taurus/ipcamera_hispark_taurus_linux/rootfs
    relative:
      bin: bin
      so: usr/lib
      etc: etc
      hap: system/internal
    rest: True
  query_order:
    so: 
      - shared_library
      - ohos_shared_library
      - ohos_prebuilt_shared_library
      - lite_library
      - lite_component
      - target
      - unittest
    hap: 
      - hap_pack
    bin:
      - executable
      - ohos_executable
      - lite_component
      - unittest


hispark_taurus_mini_system:
  product_infofile: hispark_taurus_mini_system_product.json
  output_name: hispark_taurus_mini_system_result.json
  product_dir:
    root: out/hispark_taurus/hispark_taurus_mini_system/rootfs
    relative:
      bin: bin
      so: usr/lib
      etc: etc
    rest: True
  query_order:
    so: 
      - shared_library
      - ohos_shared_library
      - ohos_prebuilt_shared_library
      - lite_library
      - lite_component
      - target
      - unittest
    bin:
      - executable
      - ohos_executable
      - lite_component
      - unittest

wifiiot_hispark_pegasus:
  product_infofile: wifiiot_hispark_pegasus_product.json
  output_name: wifiiot_hispark_pegasus_result.json
  product_dir:
    root: out/hispark_pegasus/wifiiot_hispark_pegasus
    relative:
      a: libs
      etc: etc
    rest: False 
  query_order:
    a: 
      - static_library
      - ohos_static_library
      - lite_library
      - target

hispark_pegasus_mini_system:
  product_infofile: hispark_pegasus_mini_system_product.json
  output_name: hispark_pegasus_mini_system_result.json
  product_dir:
    root: out/hispark_pegasus/hispark_pegasus_mini_system
    relative:
      a: libs
      etc: etc
    rest: False
  query_order:
    a:
      - static_library
      - ohos_static_library
      - lite_library
      - target

rk3568: # rk的目前从packages/phone/system_module_info.json中分析准确度更高,因为rk基本都使用的是ohos_xxx,而lite/small的更多的是使用的gn原生target template
  product_infofile: rk3568_mini_system_product.json
  output_name: rk3568_mini_system_result.json
  product_dir:
    root: out/rk3568/packages/phone/system
    relative:
      so: lib
      bin: bin
      hap: app
      etc: etc
    rest: True 
  query_order:
    so: 
      - ohos_shared_library
      - shared_library
      - ohos_prebuilt_shared_library
      - lite_library
      - lite_component
      - target
      - unittest
    bin: 
      - ohos_executable
      - executable
      - lite_component
      - unittest
    hap: 
      - ohos_hap
      - hap_pack