OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("../mojo_edk.gni") | 5 import("../mojo_edk.gni") |
6 | 6 |
7 # Declares/defines platform-dependent things. Some things are left | 7 # Declares/defines platform-dependent things. Some things are left |
8 # unimplemented, and the final binary must include a separate implementation | 8 # unimplemented, and the final binary must include a separate implementation |
9 # (e.g., //mojo/edk/base_edk, which implements these platform-dependent things | 9 # (e.g., //mojo/edk/base_edk, which implements these platform-dependent things |
10 # using //base). | 10 # using //base). |
11 mojo_edk_source_set("platform") { | 11 mojo_edk_source_set("platform") { |
12 sources = [ | 12 sources = [ |
13 "io_thread.h", | 13 "io_thread.h", |
14 "message_loop.h", | 14 "message_loop.h", |
15 "platform_handle.cc", | 15 "platform_handle.cc", |
16 "platform_handle.h", | 16 "platform_handle.h", |
17 "platform_handle_watcher.h", | 17 "platform_handle_watcher.h", |
18 "scoped_platform_handle.h", | 18 "scoped_platform_handle.h", |
19 "task_runner.h", | 19 "task_runner.h", |
20 "thread.h", | 20 "thread.h", |
| 21 "thread_utils.h", |
21 ] | 22 ] |
22 | 23 |
23 mojo_sdk_public_deps = [ "mojo/public/cpp/system" ] | 24 mojo_sdk_public_deps = [ "mojo/public/cpp/system" ] |
24 | 25 |
25 mojo_edk_public_deps = [ "mojo/edk/util" ] | 26 mojo_edk_public_deps = [ "mojo/edk/util" ] |
26 } | 27 } |
27 | 28 |
28 # Functionality to be used by tests (both those merely using :platform as well | 29 # Functionality to be used by tests (both those merely using :platform as well |
29 # as those implementing the unimplemented parts of :platform). | 30 # as those implementing the unimplemented parts of :platform). |
30 mojo_edk_source_set("test_platform") { | 31 mojo_edk_source_set("test_platform") { |
(...skipping 21 matching lines...) Expand all Loading... |
52 # Tests for both :platform and :test_platform. Actually linking these tests into | 53 # Tests for both :platform and :test_platform. Actually linking these tests into |
53 # a test binary will require an implementation of :platform and :test_platform | 54 # a test binary will require an implementation of :platform and :test_platform |
54 # (e.g., this is done by //mojo/edk/base_edk:mojo_edk_platform_unittests). | 55 # (e.g., this is done by //mojo/edk/base_edk:mojo_edk_platform_unittests). |
55 mojo_edk_source_set("unittests") { | 56 mojo_edk_source_set("unittests") { |
56 testonly = true | 57 testonly = true |
57 | 58 |
58 sources = [ | 59 sources = [ |
59 "aligned_alloc_unittest.cc", | 60 "aligned_alloc_unittest.cc", |
60 "io_thread_unittest.cc", | 61 "io_thread_unittest.cc", |
61 "test_message_loops_unittest.cc", | 62 "test_message_loops_unittest.cc", |
| 63 "thread_utils_unittest.cc", |
62 ] | 64 ] |
63 | 65 |
64 deps = [ | 66 deps = [ |
65 ":platform", | 67 ":platform", |
66 ":test_platform", | 68 ":test_platform", |
67 "//testing/gtest", | 69 "//testing/gtest", |
68 ] | 70 ] |
69 | 71 |
| 72 # TODO(vtl): This is a suboptimal dependency. Probably "Stopwatch" should be |
| 73 # moved to :test_platform (which we can do after we add a clock/time function |
| 74 # to :platform). |
| 75 mojo_edk_deps = [ "mojo/edk/system/test" ] |
| 76 |
70 mojo_sdk_deps = [ "mojo/public/cpp/system" ] | 77 mojo_sdk_deps = [ "mojo/public/cpp/system" ] |
71 } | 78 } |
OLD | NEW |