Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / pigweed / repo / pw_web_ui / src / transport / BUILD
1 # Copyright 2020 The Pigweed Authors
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 # use this file except in compliance with the License. You may obtain a copy of
5 # the License at
6 #
7 #     https://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations under
13 # the License.
14
15 package(default_visibility = ["//visibility:public"])
16
17 load("@npm//@bazel/typescript:index.bzl", "ts_library")
18 load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
19 load("//pw_web_ui:web_bundle.bzl", "web_bundle")
20 load("@npm//@bazel/karma:index.bzl", "karma_web_test")
21
22 ts_library(
23     name = "device_transport_lib",
24     srcs = [
25         "device_transport.ts",
26     ],
27     deps = [
28         "@npm//rxjs",
29     ],
30 )
31
32 ts_library(
33     name = "serial_mock_lib",
34     srcs = [
35         "serial_mock.ts",
36     ],
37     deps = [
38         "//pw_web_ui/types:serial_lib",
39         "@npm//jasmine",
40         "@npm//@types/jasmine",
41         "@npm//rxjs",
42     ],
43 )
44
45 ts_library(
46     name = "web_serial_transport_lib",
47     srcs = [
48         "web_serial_transport.ts",
49     ],
50     deps = [
51         ":device_transport_lib",
52         "//pw_web_ui/types:serial_lib",
53         "@npm//rxjs",
54     ],
55 )
56
57 ts_library(
58     name = "web_serial_transport_lib_test",
59     srcs = [
60         "web_serial_transport_test.ts",
61     ],
62     deps = [
63         ":serial_mock_lib",
64         ":web_serial_transport_lib",
65         "@npm//jasmine",
66         "@npm//@types/jasmine",
67         "@npm//rxjs",
68     ],
69 )
70
71 web_bundle(
72     name = "web_serial_transport_lib_test_bundle",
73     deps = [
74         ":web_serial_transport_lib_test",
75     ],
76     entry_point = "web_serial_transport_test.ts",
77 )
78
79
80 karma_web_test(
81     name = "web_test",
82     srcs = [
83         ":web_serial_transport_lib_test_bundle"
84     ],
85 )