Home | History | Annotate | Download | only in test
      1 # Copyright 2014 The Chromium Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 import("//testing/test.gni")
      6 
      7 static_library("test_support") {
      8   testonly = true
      9   sources = [
     10     "mojo_test_base.cc",
     11     "mojo_test_base.h",
     12     "scoped_ipc_support.cc",
     13     "scoped_ipc_support.h",
     14     "test_utils.h",
     15     "test_utils_posix.cc",
     16     "test_utils_win.cc",
     17   ]
     18 
     19   if (!is_ios) {
     20     sources += [
     21       "multiprocess_test_helper.cc",
     22       "multiprocess_test_helper.h",
     23     ]
     24   }
     25 
     26   deps = [
     27     "//base",
     28     "//base/test:test_support",
     29     "//mojo/edk/system",
     30     "//mojo/public/cpp/system",
     31     "//testing/gtest",
     32   ]
     33 }
     34 
     35 source_set("run_all_unittests") {
     36   testonly = true
     37   sources = [
     38     "run_all_unittests.cc",
     39   ]
     40 
     41   deps = [
     42     ":test_support",
     43     ":test_support_impl",
     44     "//base",
     45     "//base/test:test_support",
     46     "//mojo/edk/system",
     47     "//mojo/public/c/test_support",
     48     "//testing/gtest",
     49   ]
     50 
     51   if (is_linux && !is_component_build) {
     52     public_configs = [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
     53   }
     54 }
     55 
     56 source_set("run_all_perftests") {
     57   testonly = true
     58   deps = [
     59     ":test_support_impl",
     60     "//base",
     61     "//base/test:test_support",
     62     "//mojo/edk/system",
     63     "//mojo/edk/test:test_support",
     64     "//mojo/public/c/test_support",
     65   ]
     66 
     67   sources = [
     68     "run_all_perftests.cc",
     69   ]
     70 
     71   if (is_linux && !is_component_build) {
     72     public_configs = [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
     73   }
     74 }
     75 
     76 static_library("test_support_impl") {
     77   testonly = true
     78   deps = [
     79     "//base",
     80     "//base/test:test_support",
     81     "//mojo/public/c/test_support",
     82     "//mojo/public/cpp/system",
     83   ]
     84 
     85   sources = [
     86     "test_support_impl.cc",
     87     "test_support_impl.h",
     88   ]
     89 }
     90 
     91 # Public SDK test targets follow. These targets are not defined within the
     92 # public SDK itself as running the unittests requires the EDK.
     93 # TODO(vtl): These don't really belong here. (They should be converted to
     94 # apptests, but even apart from that these targets belong somewhere else.)
     95 
     96 group("public_tests") {
     97   testonly = true
     98   deps = [
     99     ":mojo_public_bindings_unittests",
    100     ":mojo_public_system_perftests",
    101     ":mojo_public_system_unittests",
    102   ]
    103 }
    104 
    105 test("mojo_public_bindings_perftests") {
    106   deps = [
    107     ":run_all_perftests",
    108     "//mojo/edk/test:test_support",
    109     "//mojo/public/cpp/bindings/tests:perftests",
    110   ]
    111 }
    112 
    113 test("mojo_public_bindings_unittests") {
    114   deps = [
    115     ":run_all_unittests",
    116     "//mojo/edk/test:test_support",
    117     "//mojo/public/cpp/bindings/tests",
    118   ]
    119 }
    120 
    121 test("mojo_public_system_perftests") {
    122   deps = [
    123     ":run_all_perftests",
    124     "//mojo/public/c/system/tests:perftests",
    125   ]
    126 }
    127 
    128 test("mojo_public_system_unittests") {
    129   deps = [
    130     ":run_all_unittests",
    131     "//mojo/public/cpp/system/tests",
    132   ]
    133 }
    134