blob: 1d6a492c0922b6ab9f067be19bc4c179e52d25a2 [file] [log] [blame]
Viet-Trung Luucb678492015-10-28 12:46:54 -07001# Copyright 2015 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
5import("../../mojo_edk.gni")
6
Viet-Trung Luub7cd10b2015-10-30 09:47:47 -07007# Utilties for use by EDK internal (unit and perf) tests.
Viet-Trung Luucb678492015-10-28 12:46:54 -07008mojo_edk_source_set("test") {
9 testonly = true
Viet-Trung Luub7cd10b2015-10-30 09:47:47 -070010 mojo_edk_visibility = [ "mojo/edk/*" ]
Viet-Trung Luucb678492015-10-28 12:46:54 -070011
12 sources = [
13 "random.cc",
14 "random.h",
Viet-Trung Luud892e472015-10-29 09:16:40 -070015 "scoped_test_dir.cc",
16 "scoped_test_dir.h",
Viet-Trung Luu7b392e02015-10-28 16:52:55 -070017 "simple_test_thread.cc",
18 "simple_test_thread.h",
Viet-Trung Luud91741a2015-11-05 14:36:01 -080019 "test_command_line.cc",
20 "test_command_line.h",
Viet-Trung Luud892e472015-10-29 09:16:40 -070021 "test_io_thread.cc",
22 "test_io_thread.h",
Viet-Trung Luucb678492015-10-28 12:46:54 -070023 "timeouts.cc",
24 "timeouts.h",
25 ]
26
27 mojo_sdk_public_deps = [
28 "mojo/public/c/system",
29 "mojo/public/cpp/system",
30 ]
31
32 deps = [
33 "//base",
34 "//base/test:test_support",
Viet-Trung Luub7cd10b2015-10-30 09:47:47 -070035 "//testing/gtest",
Viet-Trung Luucb678492015-10-28 12:46:54 -070036 ]
37
Viet-Trung Luud892e472015-10-29 09:16:40 -070038 mojo_edk_deps = [
Viet-Trung Luu1da183c2015-11-18 15:41:35 -080039 "mojo/edk/base_edk",
Viet-Trung Luud892e472015-10-29 09:16:40 -070040 "mojo/edk/util",
41 ]
Viet-Trung Luucb678492015-10-28 12:46:54 -070042}
43
Viet-Trung Luub7cd10b2015-10-30 09:47:47 -070044# Utilities for use by EDK internal perf tests (for use with
45# :run_all_perftests).
46mojo_edk_source_set("perf") {
47 testonly = true
48 mojo_edk_visibility = [ "mojo/edk/*" ]
49
50 sources = [
51 "perf_log.cc",
52 "perf_log.h",
53 ]
54
55 deps = [
56 "//base/test:test_support",
57 ]
58}
59
60mojo_edk_source_set("run_all_unittests") {
61 testonly = true
62 mojo_edk_visibility = [ "mojo/edk/*" ]
63
64 sources = [
65 "run_all_unittests.cc",
66 ]
67
68 deps = [
Viet-Trung Luud91741a2015-11-05 14:36:01 -080069 ":test",
Viet-Trung Luub7cd10b2015-10-30 09:47:47 -070070 "//base",
71 "//base/test:test_support",
72 "//testing/gtest",
73 ]
74}
75
76mojo_edk_source_set("run_all_perftests") {
77 testonly = true
78 mojo_edk_visibility = [ "mojo/edk/*" ]
79
80 sources = [
81 "run_all_perftests.cc",
82 ]
83
84 deps = [
Viet-Trung Luud91741a2015-11-05 14:36:01 -080085 ":test",
Viet-Trung Luub7cd10b2015-10-30 09:47:47 -070086 "//base/test:test_support",
87 ]
88}
89
Viet-Trung Luuc2ad3092015-11-09 13:43:00 -080090mojo_edk_unittests("mojo_edk_system_test_unittests") {
Viet-Trung Luucb678492015-10-28 12:46:54 -070091 sources = [
92 "random_unittest.cc",
Viet-Trung Luucb678492015-10-28 12:46:54 -070093 ]
94
95 deps = [
96 ":test",
97 "//testing/gtest",
98 ]
99}