blob: cb0fda9c1db24a40e4a659eb30ce3af7f4e249a5 [file] [log] [blame]
Bob Badour77886fa2021-02-12 21:16:26 -08001package {
2 default_applicable_licenses: ["external_igt-gpu-tools_license"],
3}
4
5// Added automatically by a large-scale-change that took the approach of
6// 'apply every license found to every target'. While this makes sure we respect
7// every license restriction, it may not be entirely correct.
8//
9// e.g. GPL in an MIT project might only apply to the contrib/ directory.
10//
11// Please consider splitting the single license below into multiple licenses,
12// taking care not to lose any license_kind information, and overriding the
13// default license using the 'licenses: [...]' property on targets as needed.
14//
15// For unused files, consider creating a 'fileGroup' with "//visibility:private"
16// to attach the license to, and including a comment whether the files may be
17// used in the current project.
18// See: http://go/android-license-faq
19license {
20 name: "external_igt-gpu-tools_license",
21 visibility: [":__subpackages__"],
22 license_kinds: [
23 "SPDX-license-identifier-Apache-2.0",
24 "SPDX-license-identifier-GPL",
25 "SPDX-license-identifier-GPL-2.0",
26 "SPDX-license-identifier-ISC",
27 "SPDX-license-identifier-LGPL",
28 "SPDX-license-identifier-MIT",
29 ],
30 license_text: [
31 "COPYING",
32 ],
33}
34
Sean Callananc0ddd352019-11-21 17:43:42 -080035cc_defaults {
36 name: "igt-gpu-tools-defaults",
Alistair Strachan57eb94f2019-05-21 15:36:07 -070037 cflags: [
38 "-Wall",
39 "-Werror",
40 "-Wno-missing-field-initializers",
41 "-Wno-unused-parameter",
42 "-Wno-unused-variable",
43 "-DHAVE_GETTID",
44 "-DHAVE_LIBGEN_H",
45 "-DHAVE_MEMFD_CREATE",
46 ],
Sean Callanan2db11e12019-11-04 18:14:48 -080047 static_libs: ["libelf", "libkmod", "libion", "liblog"],
Peter Collingbournee6d6e3c2019-11-26 11:38:38 -080048 shared_libs: ["libdrm"],
Kevin DuBois939ebe52020-03-25 08:51:39 -070049 compile_multilib: "both",
50 multilib: {
51 lib32: {
52 suffix: "32",
53 },
54 lib64: {
55 suffix: "64"
56 },
57 },
Sean Callananc0ddd352019-11-21 17:43:42 -080058}
59
60cc_library_static {
61 name: "igt-gpu-tools",
62 defaults: ["igt-gpu-tools-defaults"],
63 srcs: [
64 "lib/drmtest.c",
Sean Callanan2db11e12019-11-04 18:14:48 -080065 "lib/gem.c",
66 "lib/gem_msm.c",
Sean Callananc0ddd352019-11-21 17:43:42 -080067 "lib/igt_aux.c",
Sean Callanan684dc922019-12-05 18:05:14 -080068 "lib/igt_color_encoding.c",
Sean Callananc0ddd352019-11-21 17:43:42 -080069 "lib/igt_core.c",
70 "lib/igt_debugfs.c",
Sean Callanan13d89272019-11-26 16:23:16 -080071 "lib/igt_device.c",
Kevin DuBoisd711f572020-02-12 15:32:07 -080072 "lib/igt_dummy.c",
Sean Callananc0ddd352019-11-21 17:43:42 -080073 "lib/igt_dummyload.c",
Sean Callanan13d89272019-11-26 16:23:16 -080074 "lib/igt_fb.c",
Sean Callananc0ddd352019-11-21 17:43:42 -080075 "lib/igt_kmod.c",
Sean Callanan13d89272019-11-26 16:23:16 -080076 "lib/igt_kms.c",
Kevin DuBoisd711f572020-02-12 15:32:07 -080077 "lib/igt_pm.c",
Sean Callanan13d89272019-11-26 16:23:16 -080078 "lib/igt_stats.c",
Sean Callananc0ddd352019-11-21 17:43:42 -080079 "lib/igt_sysfs.c",
Sean Callanan2db11e12019-11-04 18:14:48 -080080 "lib/ion.c",
Sean Callananc0ddd352019-11-21 17:43:42 -080081 "lib/ioctl_wrappers.c",
Sean Callanan684dc922019-12-05 18:05:14 -080082 "lib/sw_sync.c",
Sean Callananc0ddd352019-11-21 17:43:42 -080083 "lib/i915/gem_mman.c",
Sean Callanan2db11e12019-11-04 18:14:48 -080084 "lib/uwildmat/uwildmat.c",
Sean Callananc0ddd352019-11-21 17:43:42 -080085 ],
86 export_include_dirs: [
Sean Callanan2db11e12019-11-04 18:14:48 -080087 "include",
Alistair Strachan57eb94f2019-05-21 15:36:07 -070088 "lib",
89 "lib/stubs/drm",
90 "prebuilt-intermediates",
91 ],
Sean Callananc0ddd352019-11-21 17:43:42 -080092}
93
94cc_defaults {
95 name: "igt-gpu-tools-test-defaults",
96 defaults: ["igt-gpu-tools-defaults"],
97 static_libs: ["igt-gpu-tools"],
98}
99
100cc_test {
101 name: "gem_blt",
102 defaults: ["igt-gpu-tools-test-defaults"],
103 srcs: ["benchmarks/gem_blt.c"],
Kevin DuBois939ebe52020-03-25 08:51:39 -0700104 gtest: false,
Alistair Strachan57eb94f2019-05-21 15:36:07 -0700105}
Sean Callanan13d89272019-11-26 16:23:16 -0800106
107cc_test {
108 name: "kms_flip",
109 defaults: ["igt-gpu-tools-test-defaults"],
110 srcs: ["tests/kms_flip.c"],
Kevin DuBois939ebe52020-03-25 08:51:39 -0700111 gtest: false,
Sean Callanan13d89272019-11-26 16:23:16 -0800112}
113
Sean Callanan2db11e12019-11-04 18:14:48 -0800114cc_test {
Sean Callanan684dc922019-12-05 18:05:14 -0800115 name: "kms_atomic",
116 defaults: ["igt-gpu-tools-test-defaults"],
117 srcs: ["tests/kms_atomic.c"],
Kevin DuBois939ebe52020-03-25 08:51:39 -0700118 gtest: false,
Sean Callanan684dc922019-12-05 18:05:14 -0800119}
120
121cc_test {
Sean Callanan2db11e12019-11-04 18:14:48 -0800122 name: "ion_fb",
123 defaults: ["igt-gpu-tools-test-defaults"],
124 srcs: ["tests/ion_fb.c"],
Kevin DuBois939ebe52020-03-25 08:51:39 -0700125 gtest: false,
Sean Callanan2db11e12019-11-04 18:14:48 -0800126}
Kevin DuBoisd711f572020-02-12 15:32:07 -0800127
128cc_test {
129 name: "kms_vblank",
130 defaults: ["igt-gpu-tools-test-defaults"],
131 srcs: ["tests/kms_vblank.c"],
Kevin DuBois939ebe52020-03-25 08:51:39 -0700132 gtest: false,
133}
134
135python_test_host {
136 name: "igt_gpu_tools",
137 main: "scripts/test_igt_gpu_tools.py",
138 srcs: [ "scripts/test_igt_gpu_tools.py", ],
139 data: [ "scripts/test_igt_gpu_tools.xml" ],
140 test_config: "scripts/test_igt_gpu_tools.xml",
141 version: {
142 py2: {
143 enabled: false,
144 },
145 py3: {
146 enabled: true,
147 },
148 },
Julien Desprez076cdca2021-03-30 23:01:28 +0000149 test_options: {
150 unit_test: false,
151 },
Kevin DuBoisd711f572020-02-12 15:32:07 -0800152}
Sean Callanan3783c9c2020-01-16 11:00:23 -0800153
154cc_test {
155 name: "kms_throughput",
156 defaults: ["igt-gpu-tools-test-defaults"],
157 srcs: ["benchmarks/kms_throughput.c"],
158}