summaryrefslogtreecommitdiff
path: root/mali_kbase/tests
diff options
context:
space:
mode:
authorSidath Senanayake <sidaths@google.com>2018-04-27 13:23:04 +0200
committerSidath Senanayake <sidaths@google.com>2018-04-27 13:23:04 +0200
commit3fe808a3e4ba33fa6fc47255b6ec14611e8ef8de (patch)
tree8a23baaae16dae4ca0431e002cb736a1034039c2 /mali_kbase/tests
parent8946bcdee4c36dbc82b8c2a2abcf9c2f5eab5ae0 (diff)
downloadgpu-3fe808a3e4ba33fa6fc47255b6ec14611e8ef8de.tar.gz
Mali Bifrost DDK r12p0 KMD
Provenance: 875d9aa9b (collaborate/EAC/b_r12p0) BX304L01B-BU-00000-r12p0-01rel0 BX304L06A-BU-00000-r12p0-01rel0 BX304X07X-BU-00000-r12p0-01rel0 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: Id91cbb43f407e908f71a977fd139ea1e3a4f6b6f
Diffstat (limited to 'mali_kbase/tests')
-rw-r--r--mali_kbase/tests/Mconfig22
-rw-r--r--mali_kbase/tests/build.bp36
-rw-r--r--mali_kbase/tests/kutf/build.bp31
-rw-r--r--mali_kbase/tests/mali_kutf_irq_test/Makefile7
-rw-r--r--mali_kbase/tests/mali_kutf_irq_test/build.bp27
-rw-r--r--mali_kbase/tests/mali_kutf_irq_test/sconscript4
6 files changed, 119 insertions, 8 deletions
diff --git a/mali_kbase/tests/Mconfig b/mali_kbase/tests/Mconfig
new file mode 100644
index 0000000..f692e34
--- /dev/null
+++ b/mali_kbase/tests/Mconfig
@@ -0,0 +1,22 @@
+#
+# (C) COPYRIGHT 2018 ARM Limited. All rights reserved.
+#
+# This program is free software and is provided to you under the terms of the
+# GNU General Public License version 2 as published by the Free Software
+# Foundation, and any use by you of this program is subject to the terms
+# of such GNU licence.
+#
+# A copy of the licence is included with the program, and can also be obtained
+# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+#
+
+config UNIT_TEST_KERNEL_MODULES
+ bool
+ default y if UNIT_TEST_CODE && BUILD_KERNEL_MODULES
+ default n
+
+config BUILD_IPA_TESTS
+ bool
+ default y if UNIT_TEST_KERNEL_MODULES && MALI_DEVFREQ
+ default n
diff --git a/mali_kbase/tests/build.bp b/mali_kbase/tests/build.bp
new file mode 100644
index 0000000..28a756b
--- /dev/null
+++ b/mali_kbase/tests/build.bp
@@ -0,0 +1,36 @@
+/*
+ * Copyright:
+ * ----------------------------------------------------------------------------
+ * This confidential and proprietary software may be used only as authorized
+ * by a licensing agreement from ARM Limited.
+ * (C) COPYRIGHT 2018 ARM Limited, ALL RIGHTS RESERVED
+ * The entire notice above must be reproduced on all authorized copies and
+ * copies may only be made to the extent permitted by a licensing agreement
+ * from ARM Limited.
+ * ----------------------------------------------------------------------------
+ */
+
+bob_defaults {
+ name: "kernel_test_module_defaults",
+ defaults: ["mali_kbase_shared_config_defaults"],
+ include_dirs: [
+ "kernel/drivers/gpu/arm",
+ "kernel/drivers/gpu/arm/midgard",
+ "kernel/drivers/gpu/arm/midgard/backend/gpu",
+ "kernel/drivers/gpu/arm/midgard/tests/include",
+ ],
+ extra_symbols: ["kutf"],
+}
+
+subdirs = [
+ "kutf",
+ "mali_kutf_irq_test",
+]
+
+optional_subdirs = [
+ "kutf_test",
+ "kutf_test_runner",
+ "mali_kutf_ipa_test",
+ "mali_kutf_ipa_unit_test",
+ "mali_kutf_vinstr_test",
+]
diff --git a/mali_kbase/tests/kutf/build.bp b/mali_kbase/tests/kutf/build.bp
new file mode 100644
index 0000000..f6d4c3f
--- /dev/null
+++ b/mali_kbase/tests/kutf/build.bp
@@ -0,0 +1,31 @@
+/*
+ * Copyright:
+ * ----------------------------------------------------------------------------
+ * This confidential and proprietary software may be used only as authorized
+ * by a licensing agreement from ARM Limited.
+ * (C) COPYRIGHT 2018 ARM Limited, ALL RIGHTS RESERVED
+ * The entire notice above must be reproduced on all authorized copies and
+ * copies may only be made to the extent permitted by a licensing agreement
+ * from ARM Limited.
+ * ----------------------------------------------------------------------------
+ */
+
+bob_kernel_module {
+ name: "kutf",
+ defaults: ["kernel_defaults"],
+ srcs: [
+ "Kbuild",
+ "kutf_helpers.c",
+ "kutf_helpers_user.c",
+ "kutf_mem.c",
+ "kutf_resultset.c",
+ "kutf_suite.c",
+ "kutf_utils.c",
+ ],
+ kbuild_options: ["CONFIG_MALI_KUTF=m"],
+ include_dirs: ["kernel/drivers/gpu/arm/midgard/tests/include"],
+ enabled: false,
+ unit_test_kernel_modules: {
+ enabled: true,
+ },
+}
diff --git a/mali_kbase/tests/mali_kutf_irq_test/Makefile b/mali_kbase/tests/mali_kutf_irq_test/Makefile
index e3dc5eb..40df117 100644
--- a/mali_kbase/tests/mali_kutf_irq_test/Makefile
+++ b/mali_kbase/tests/mali_kutf_irq_test/Makefile
@@ -1,5 +1,5 @@
#
-# (C) COPYRIGHT 2015, 2017 ARM Limited. All rights reserved.
+# (C) COPYRIGHT 2015, 2017-2018 ARM Limited. All rights reserved.
#
# This program is free software and is provided to you under the terms of the
# GNU General Public License version 2 as published by the Free Software
@@ -29,12 +29,7 @@ $(error Must specify KDIR to point to the kernel to target))
endif
TEST_CCFLAGS := \
- -DMALI_DEBUG=$(MALI_DEBUG) \
- -DMALI_BACKEND_KERNEL=$(MALI_BACKEND_KERNEL) \
- -DMALI_NO_MALI=$(MALI_NO_MALI) \
-DMALI_UNIT_TEST=$(MALI_UNIT_TEST) \
- -DMALI_USE_UMP=$(MALI_USE_UMP) \
- -DMALI_ERROR_INJECT_ON=$(MALI_ERROR_INJECT_ON) \
-DMALI_CUSTOMER_RELEASE=$(MALI_CUSTOMER_RELEASE) \
$(SCONS_CFLAGS) \
-I$(CURDIR)/../include \
diff --git a/mali_kbase/tests/mali_kutf_irq_test/build.bp b/mali_kbase/tests/mali_kutf_irq_test/build.bp
new file mode 100644
index 0000000..e1f77b0
--- /dev/null
+++ b/mali_kbase/tests/mali_kutf_irq_test/build.bp
@@ -0,0 +1,27 @@
+/*
+ * Copyright:
+ * ----------------------------------------------------------------------------
+ * This confidential and proprietary software may be used only as authorized
+ * by a licensing agreement from ARM Limited.
+ * (C) COPYRIGHT 2018 ARM Limited, ALL RIGHTS RESERVED
+ * The entire notice above must be reproduced on all authorized copies and
+ * copies may only be made to the extent permitted by a licensing agreement
+ * from ARM Limited.
+ * ----------------------------------------------------------------------------
+ */
+
+bob_kernel_module {
+ name: "mali_kutf_irq_test",
+ defaults: ["kernel_test_module_defaults"],
+ srcs: [
+ "Kbuild",
+ "mali_kutf_irq_test_main.c",
+ ],
+ extra_symbols: ["mali_kbase"],
+ install_group: "IG_tests",
+ enabled: false,
+ unit_test_kernel_modules: {
+ enabled: true,
+ kbuild_options: ["CONFIG_MALI_IRQ_LATENCY=m"],
+ },
+}
diff --git a/mali_kbase/tests/mali_kutf_irq_test/sconscript b/mali_kbase/tests/mali_kutf_irq_test/sconscript
index be69514..0ec5ce7 100644
--- a/mali_kbase/tests/mali_kutf_irq_test/sconscript
+++ b/mali_kbase/tests/mali_kutf_irq_test/sconscript
@@ -1,5 +1,5 @@
#
-# (C) COPYRIGHT 2015, 2017 ARM Limited. All rights reserved.
+# (C) COPYRIGHT 2015-2018 ARM Limited. All rights reserved.
#
# This program is free software and is provided to you under the terms of the
# GNU General Public License version 2 as published by the Free Software
@@ -29,7 +29,7 @@ if env.GetOption('clean') :
cmd = env.Command('$STATIC_LIB_PATH/mali_kutf_irq_test.ko', src, [])
env.KernelObjTarget('mali_kutf_irq_test', cmd)
else:
- makeAction=Action("cd ${SOURCE.dir} && make MALI_DEBUG=${debug} MALI_BACKEND_KERNEL=1 MALI_ERROR_INJECT_ON=${error_inject} MALI_NO_MALI=${no_mali} MALI_UNIT_TEST=${unit} MALI_USE_UMP=${ump} MALI_CUSTOMER_RELEASE=${release} %s && ( ( [ -f mali_kutf_irq_test.ko ] && cp mali_kutf_irq_test.ko $STATIC_LIB_PATH/ ) || touch $STATIC_LIB_PATH/mali_kutf_irq_test.ko)" % env.kernel_get_config_defines(), '$MAKECOMSTR')
+ makeAction=Action("cd ${SOURCE.dir} && make MALI_UNIT_TEST=${unit} MALI_CUSTOMER_RELEASE=${release} %s && ( ( [ -f mali_kutf_irq_test.ko ] && cp mali_kutf_irq_test.ko $STATIC_LIB_PATH/ ) || touch $STATIC_LIB_PATH/mali_kutf_irq_test.ko)" % env.kernel_get_config_defines(), '$MAKECOMSTR')
cmd = env.Command('$STATIC_LIB_PATH/mali_kutf_irq_test.ko', src, [makeAction])
env.Depends('$STATIC_LIB_PATH/mali_kutf_irq_test.ko', '$STATIC_LIB_PATH/kutf.ko')
env.Depends('$STATIC_LIB_PATH/mali_kutf_irq_test.ko', '$STATIC_LIB_PATH/mali_kbase.ko')