blob: 7ee78cb9d14517fa7b8bccae69a0ffde34315eeb [file] [log] [blame]
# Copyright 2016 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/go/go_test.gni")
import("//packages/package.gni")
if (current_toolchain == target_toolchain) {
action("go_toolchain") {
outputs = [
"$root_gen_dir/goroot.done",
]
depfile = "$root_gen_dir/goroot.d"
visibility = [ ":*" ]
script = rebase_path("//buildtools/go")
args = [
"run",
rebase_path("makefuchsia.go", root_build_dir),
"-fuchsia-goroot",
rebase_path("."),
"-depfile",
rebase_path(depfile),
"-root-out-dir",
rebase_path("$root_out_dir"),
"-root-gen-dir",
rebase_path("$root_gen_dir"),
"--out-goroot",
rebase_path("$root_out_dir/goroot"),
"-target-cpu",
target_cpu,
]
}
}
group("go_runtime") {
public_deps = [
":go_toolchain(${target_toolchain})",
]
}
go_test("go_os_test") {
gopackage = "os"
}
package("go_stdlib_tests") {
testonly = true
system_image = true
deps = [
":go_os_test",
]
tests = [ {
name = "go_os_test"
} ]
}