BUILD.gn 2.6 KB
Newer Older
F
FondMemoryVVV 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# Copyright (C) 2021 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.
import("//build/ohos_var.gni")
import("//test/xts/tools/build/suite.gni")

group("toolchain") {
  testonly = true
F
FondMemoryVVV 已提交
18
  deps = [ "//third_party/musl:libctest" ]
F
FondMemoryVVV 已提交
19
  if (is_standard_system) {
F
FondMemoryVVV 已提交
20
    deps += [ ":tar_dllib" ]
F
FondMemoryVVV 已提交
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
  }
}

action("tar_testcases") {
  testonly = true
  deps = [
    "libc-test:ActToolChainTest",
    "//third_party/musl:libctest",
  ]
  project_dir = rebase_path(".")
  print("project_dir-58:", project_dir)
  project_dird = rebase_path("tar_files.py", ".", root_out_dir)
  print("project_dird-60:", project_dird)

  project_dirf = project_dir + "/" + project_dird
  print("project_dirf-64:", project_dirf)

  test_path = string_replace(project_dirf, "/tar_files.py", "")
F
FondMemoryVVV 已提交
39 40
  script = rebase_path(
          "//test/xts/acts/commonlibrary/toolchain/libc-test/tar_files.py")
F
FondMemoryVVV 已提交
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70

  _outputs = [ "$target_out_dir/libc-test.tar" ]
  outputs = _outputs

  input_path = rebase_path("$test_path/tests/unittest/libc-test")
  output_path = rebase_path("$test_path/suites/acts/testcases/libc-test.tar")

  print("root_build_dir-49", root_build_dir)
  args = [
    "--input_path",
    input_path,
    "--output_path",
    output_path,
    "--temp_path",
    "./libc-test",
  ]
}

action("tar_dllib") {
  testonly = true
  deps = [ ":tar_testcases" ]
  project_dir = rebase_path(".")
  print("project_dir-58:", project_dir)
  project_dird = rebase_path("tar_files.py", ".", root_out_dir)
  print("project_dird-60:", project_dird)

  project_dirf = project_dir + "/" + project_dird
  print("project_dirf-64:", project_dirf)

  dllib_path = string_replace(project_dirf, "/tar_files.py", "")
F
FondMemoryVVV 已提交
71 72
  script = rebase_path(
          "//test/xts/acts/commonlibrary/toolchain/libc-test/tar_files.py")
F
FondMemoryVVV 已提交
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90

  _outputs = [ "$target_out_dir/libc-test-lib.tar" ]
  outputs = _outputs

  input_path = rebase_path("$dllib_path/musl/libc-test-lib")
  output_path =
      rebase_path("$dllib_path/suites/acts/testcases/libc-test-lib.tar")

  print("root_build_dir-49", root_build_dir)
  args = [
    "--input_path",
    input_path,
    "--output_path",
    output_path,
    "--temp_path",
    "./libc-test-lib",
  ]
}