| # 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/package.gni") |
| import("//build/testing/environments.gni") |
| import("//src/ledger/bin/testing/sync_params.gni") |
| |
| # Public targets |
| group("ledger") { |
| testonly = true |
| deps = [ |
| ":ledger_tests", |
| ":tests", |
| "bin", |
| "cloud_provider_firestore", |
| "cloud_provider_in_memory", |
| "lib", |
| "third_party", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| data_deps = [ |
| ":ledger_tests", |
| ] |
| } |
| |
| # Private targets |
| visibility = [ "//src/ledger/*" ] |
| |
| config("ledger_config") { |
| asmflags = [] |
| |
| cflags = [ |
| # Remove when enabled globally by TO-99. |
| "-Wunused-lambda-capture", |
| |
| # Remove when enabled globally by TO-100. |
| "-Wuser-defined-warnings", |
| |
| # Warn about unreachable code. |
| "-Wunreachable-code", |
| ] |
| |
| ldflags = [ |
| # Use a 1M stack. |
| "-Wl,-z,stack-size=0x100000", |
| ] |
| } |
| |
| package("ledger_tests") { |
| testonly = true |
| |
| deps = [ |
| "//src/ledger/bin:ledger_unittests", |
| "//src/ledger/bin/tests/cloud_provider", |
| "//src/ledger/bin/tests/e2e_local", |
| "//src/ledger/bin/tests/e2e_sync", |
| "//src/ledger/bin/tests/integration", |
| "//src/ledger/cloud_provider_firestore/bin:tests", |
| |
| # "//src/ledger/cloud_provider_in_memory/bin", |
| "//src/ledger/cloud_provider_in_memory/bin:tests", |
| "//src/ledger/lib:ledger_lib_unittests", |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("//src/ledger/bin/tests/ledger_unittests.cmx") |
| dest = "ledger_unittests.cmx" |
| }, |
| { |
| path = rebase_path( |
| "//src/ledger/bin/tests/integration/ledger_integration_tests.cmx") |
| dest = "ledger_integration_tests.cmx" |
| }, |
| { |
| path = |
| rebase_path("//src/ledger/bin/tests/e2e_local/ledger_e2e_local.cmx") |
| dest = "ledger_e2e_local.cmx" |
| }, |
| { |
| path = rebase_path("//src/ledger/bin/tests/e2e_sync/ledger_e2e_sync.cmx") |
| dest = "ledger_e2e_sync.cmx" |
| }, |
| { |
| path = rebase_path("//src/ledger/lib/ledger_lib_unittests.cmx") |
| dest = "ledger_lib_unittests.cmx" |
| }, |
| { |
| path = rebase_path( |
| "//src/ledger/cloud_provider_firestore/bin/cloud_provider_firestore_unittests.cmx") |
| dest = "cloud_provider_firestore_unittests.cmx" |
| }, |
| { |
| path = rebase_path( |
| "//src/ledger/cloud_provider_firestore/bin/validation/validation_firestore.cmx") |
| dest = "validation_firestore.cmx" |
| }, |
| { |
| path = rebase_path( |
| "//src/ledger/cloud_provider_in_memory/bin/validation/validation_in_memory.cmx") |
| dest = "validation_in_memory.cmx" |
| }, |
| { |
| # This test must be started by validation_firestore or |
| # validation_in_memory and will fail if started on its own. |
| path = rebase_path( |
| "//src/ledger/bin/tests/cloud_provider/cloud_provider_validation_tests.cmx") |
| dest = "cloud_provider_validation_tests.cmx" |
| }, |
| ] |
| |
| tests = [ |
| { |
| name = "ledger_unittests" |
| environments = basic_envs |
| }, |
| { |
| name = "ledger_integration_tests" |
| environments = basic_envs |
| }, |
| { |
| name = "ledger_e2e_local" |
| environments = basic_envs |
| }, |
| { |
| name = "ledger_lib_unittests" |
| environments = basic_envs |
| }, |
| { |
| name = "cloud_provider_firestore_unittests" |
| environments = basic_envs |
| }, |
| { |
| name = "launch_validation_tests_in_memory" |
| environments = basic_envs |
| }, |
| { |
| name = "ledger_e2e_sync" |
| |
| # This test needs additional configuration and should not run by default. |
| # Marking it as disabled puts the binary in `test/disabled/` under the |
| # package directory. |
| disabled = true |
| environments = basic_envs |
| }, |
| { |
| name = "launch_validation_tests_firestore" |
| |
| # This test needs additional configuration and should not run by default. |
| # Marking it as disabled puts the binary in `test/disabled/` under the |
| # package directory. |
| disabled = true |
| environments = basic_envs |
| }, |
| { |
| name = "cloud_provider_validation_tests" |
| |
| # This test must be started by validation_firestore and will fail if started on its own. |
| # Marking it as disabled puts the binary in `test/disabled/` under the |
| # package directory. |
| disabled = true |
| environments = basic_envs |
| }, |
| ] |
| |
| resources = [] |
| if (ledger_sync_credentials_file != "") { |
| resources += [ |
| { |
| path = ledger_sync_credentials_file |
| dest = "sync_credentials.json" |
| }, |
| ] |
| } |
| } |