diff --git a/tests/SConscript b/tests/SConscript index bdaad04768..59ca904f95 100644 --- a/tests/SConscript +++ b/tests/SConscript @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright (c) 2017-2025 Arm Limited. +# Copyright (c) 2017-2026 Arm Limited. # # SPDX-License-Identifier: MIT # @@ -65,8 +65,9 @@ if not build_test_framework: else: SConscript('./framework/SConscript', duplicate=0) -Import("arm_compute_test_framework") -test_env.Append(LIBS = arm_compute_test_framework) +if test_env['validation_tests'] or test_env['benchmark_tests'] or test_env['benchmark_examples'] or test_env['profile']: + Import("arm_compute_test_framework") + test_env.Append(LIBS = arm_compute_test_framework) # Disable floating-point expression contraction (e.g. fused multiply-add operations) if not 'windows' in env['os']: diff --git a/tests/framework/SConscript b/tests/framework/SConscript index cca5169099..13a125247f 100644 --- a/tests/framework/SConscript +++ b/tests/framework/SConscript @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright (c) 2017-2022, 2024 Arm Limited. +# Copyright (c) 2017-2022, 2024, 2026 Arm Limited. # # SPDX-License-Identifier: MIT # @@ -95,7 +95,8 @@ if framework_env['HOST_OS'] == 'posix': #Set up directory for temp files. To prevent permission issue, the temp files are in the same directory with output files framework_env['TEMPFILEDIR'] = framework_env['build_dir'] -arm_compute_test_framework = framework_env.StaticLibrary('arm_compute_test_framework', files) +if framework_env['validation_tests'] or framework_env['benchmark_tests'] or framework_env['benchmark_examples'] or framework_env['profile']: + arm_compute_test_framework = framework_env.StaticLibrary('arm_compute_test_framework', files) -Default(arm_compute_test_framework) -Export('arm_compute_test_framework') + Default(arm_compute_test_framework) + Export('arm_compute_test_framework')