Bob Badour | 77886fa | 2021-02-12 21:16:26 -0800 | [diff] [blame] | 1 | package { |
| 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 |
| 19 | license { |
| 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 Callanan | c0ddd35 | 2019-11-21 17:43:42 -0800 | [diff] [blame] | 35 | cc_defaults { |
| 36 | name: "igt-gpu-tools-defaults", |
Alistair Strachan | 57eb94f | 2019-05-21 15:36:07 -0700 | [diff] [blame] | 37 | 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 Callanan | 2db11e1 | 2019-11-04 18:14:48 -0800 | [diff] [blame] | 47 | static_libs: ["libelf", "libkmod", "libion", "liblog"], |
Peter Collingbourne | e6d6e3c | 2019-11-26 11:38:38 -0800 | [diff] [blame] | 48 | shared_libs: ["libdrm"], |
Kevin DuBois | 939ebe5 | 2020-03-25 08:51:39 -0700 | [diff] [blame] | 49 | compile_multilib: "both", |
| 50 | multilib: { |
| 51 | lib32: { |
| 52 | suffix: "32", |
| 53 | }, |
| 54 | lib64: { |
| 55 | suffix: "64" |
| 56 | }, |
| 57 | }, |
Sean Callanan | c0ddd35 | 2019-11-21 17:43:42 -0800 | [diff] [blame] | 58 | } |
| 59 | |
| 60 | cc_library_static { |
| 61 | name: "igt-gpu-tools", |
| 62 | defaults: ["igt-gpu-tools-defaults"], |
| 63 | srcs: [ |
| 64 | "lib/drmtest.c", |
Sean Callanan | 2db11e1 | 2019-11-04 18:14:48 -0800 | [diff] [blame] | 65 | "lib/gem.c", |
| 66 | "lib/gem_msm.c", |
Sean Callanan | c0ddd35 | 2019-11-21 17:43:42 -0800 | [diff] [blame] | 67 | "lib/igt_aux.c", |
Sean Callanan | 684dc92 | 2019-12-05 18:05:14 -0800 | [diff] [blame] | 68 | "lib/igt_color_encoding.c", |
Sean Callanan | c0ddd35 | 2019-11-21 17:43:42 -0800 | [diff] [blame] | 69 | "lib/igt_core.c", |
| 70 | "lib/igt_debugfs.c", |
Sean Callanan | 13d8927 | 2019-11-26 16:23:16 -0800 | [diff] [blame] | 71 | "lib/igt_device.c", |
Kevin DuBois | d711f57 | 2020-02-12 15:32:07 -0800 | [diff] [blame] | 72 | "lib/igt_dummy.c", |
Sean Callanan | c0ddd35 | 2019-11-21 17:43:42 -0800 | [diff] [blame] | 73 | "lib/igt_dummyload.c", |
Sean Callanan | 13d8927 | 2019-11-26 16:23:16 -0800 | [diff] [blame] | 74 | "lib/igt_fb.c", |
Sean Callanan | c0ddd35 | 2019-11-21 17:43:42 -0800 | [diff] [blame] | 75 | "lib/igt_kmod.c", |
Sean Callanan | 13d8927 | 2019-11-26 16:23:16 -0800 | [diff] [blame] | 76 | "lib/igt_kms.c", |
Kevin DuBois | d711f57 | 2020-02-12 15:32:07 -0800 | [diff] [blame] | 77 | "lib/igt_pm.c", |
Sean Callanan | 13d8927 | 2019-11-26 16:23:16 -0800 | [diff] [blame] | 78 | "lib/igt_stats.c", |
Sean Callanan | c0ddd35 | 2019-11-21 17:43:42 -0800 | [diff] [blame] | 79 | "lib/igt_sysfs.c", |
Sean Callanan | 2db11e1 | 2019-11-04 18:14:48 -0800 | [diff] [blame] | 80 | "lib/ion.c", |
Sean Callanan | c0ddd35 | 2019-11-21 17:43:42 -0800 | [diff] [blame] | 81 | "lib/ioctl_wrappers.c", |
Sean Callanan | 684dc92 | 2019-12-05 18:05:14 -0800 | [diff] [blame] | 82 | "lib/sw_sync.c", |
Sean Callanan | c0ddd35 | 2019-11-21 17:43:42 -0800 | [diff] [blame] | 83 | "lib/i915/gem_mman.c", |
Sean Callanan | 2db11e1 | 2019-11-04 18:14:48 -0800 | [diff] [blame] | 84 | "lib/uwildmat/uwildmat.c", |
Sean Callanan | c0ddd35 | 2019-11-21 17:43:42 -0800 | [diff] [blame] | 85 | ], |
| 86 | export_include_dirs: [ |
Sean Callanan | 2db11e1 | 2019-11-04 18:14:48 -0800 | [diff] [blame] | 87 | "include", |
Alistair Strachan | 57eb94f | 2019-05-21 15:36:07 -0700 | [diff] [blame] | 88 | "lib", |
| 89 | "lib/stubs/drm", |
| 90 | "prebuilt-intermediates", |
| 91 | ], |
Sean Callanan | c0ddd35 | 2019-11-21 17:43:42 -0800 | [diff] [blame] | 92 | } |
| 93 | |
| 94 | cc_defaults { |
| 95 | name: "igt-gpu-tools-test-defaults", |
| 96 | defaults: ["igt-gpu-tools-defaults"], |
| 97 | static_libs: ["igt-gpu-tools"], |
| 98 | } |
| 99 | |
| 100 | cc_test { |
| 101 | name: "gem_blt", |
| 102 | defaults: ["igt-gpu-tools-test-defaults"], |
| 103 | srcs: ["benchmarks/gem_blt.c"], |
Kevin DuBois | 939ebe5 | 2020-03-25 08:51:39 -0700 | [diff] [blame] | 104 | gtest: false, |
Alistair Strachan | 57eb94f | 2019-05-21 15:36:07 -0700 | [diff] [blame] | 105 | } |
Sean Callanan | 13d8927 | 2019-11-26 16:23:16 -0800 | [diff] [blame] | 106 | |
| 107 | cc_test { |
| 108 | name: "kms_flip", |
| 109 | defaults: ["igt-gpu-tools-test-defaults"], |
| 110 | srcs: ["tests/kms_flip.c"], |
Kevin DuBois | 939ebe5 | 2020-03-25 08:51:39 -0700 | [diff] [blame] | 111 | gtest: false, |
Sean Callanan | 13d8927 | 2019-11-26 16:23:16 -0800 | [diff] [blame] | 112 | } |
| 113 | |
Sean Callanan | 2db11e1 | 2019-11-04 18:14:48 -0800 | [diff] [blame] | 114 | cc_test { |
Sean Callanan | 684dc92 | 2019-12-05 18:05:14 -0800 | [diff] [blame] | 115 | name: "kms_atomic", |
| 116 | defaults: ["igt-gpu-tools-test-defaults"], |
| 117 | srcs: ["tests/kms_atomic.c"], |
Kevin DuBois | 939ebe5 | 2020-03-25 08:51:39 -0700 | [diff] [blame] | 118 | gtest: false, |
Sean Callanan | 684dc92 | 2019-12-05 18:05:14 -0800 | [diff] [blame] | 119 | } |
| 120 | |
| 121 | cc_test { |
Sean Callanan | 2db11e1 | 2019-11-04 18:14:48 -0800 | [diff] [blame] | 122 | name: "ion_fb", |
| 123 | defaults: ["igt-gpu-tools-test-defaults"], |
| 124 | srcs: ["tests/ion_fb.c"], |
Kevin DuBois | 939ebe5 | 2020-03-25 08:51:39 -0700 | [diff] [blame] | 125 | gtest: false, |
Sean Callanan | 2db11e1 | 2019-11-04 18:14:48 -0800 | [diff] [blame] | 126 | } |
Kevin DuBois | d711f57 | 2020-02-12 15:32:07 -0800 | [diff] [blame] | 127 | |
| 128 | cc_test { |
| 129 | name: "kms_vblank", |
| 130 | defaults: ["igt-gpu-tools-test-defaults"], |
| 131 | srcs: ["tests/kms_vblank.c"], |
Kevin DuBois | 939ebe5 | 2020-03-25 08:51:39 -0700 | [diff] [blame] | 132 | gtest: false, |
| 133 | } |
| 134 | |
| 135 | python_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 Desprez | 076cdca | 2021-03-30 23:01:28 +0000 | [diff] [blame] | 149 | test_options: { |
| 150 | unit_test: false, |
| 151 | }, |
Kevin DuBois | d711f57 | 2020-02-12 15:32:07 -0800 | [diff] [blame] | 152 | } |
Sean Callanan | 3783c9c | 2020-01-16 11:00:23 -0800 | [diff] [blame] | 153 | |
| 154 | cc_test { |
| 155 | name: "kms_throughput", |
| 156 | defaults: ["igt-gpu-tools-test-defaults"], |
| 157 | srcs: ["benchmarks/kms_throughput.c"], |
| 158 | } |