aboutsummaryrefslogtreecommitdiff
path: root/tests/SConscript
diff options
context:
space:
mode:
authorPablo Tello <pablo.tello@arm.com>2017-11-09 11:49:18 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commitea1c95085113d7804a93d3b4995bc114e185063f (patch)
tree7ac6316d87d0d73ab48b55d7d247be0e97a5b2de /tests/SConscript
parent4a4a1649522ae837746d2bd195050621e176f451 (diff)
downloadComputeLibrary-ea1c95085113d7804a93d3b4995bc114e185063f.tar.gz
COMPMID-556: Allow building only specific validation tests using the option variable test_filter.
This is particularly useful when building the tests for running them on Fast models because it reduces considerably the execution time on the MODELS mainly due to the fact that there are fewer test suites in the executable. Usage example: PATH=$PATH:/work/local_tools/gcc-linaro-6.2.1-2016.11-x86_64_aarch64-linux-gnu/bin/ scons arch=arm64-v8a neon=1 opencl=0 openvx=0 opencv=0 Werror=0 validation_tests=1 benchmark_tests=0 debug=0 Werror=0 asserts=1 examples=0 cppthreads=0 openmp=0 standalone=1 test_filter=GEMMLowp.* -j9 Will build only the NEON GEMMLowp tests as a standalone binary. Change-Id: I5cfb242d32276408e42da68c17455ea375902156 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/95052 Reviewed-by: Anthony Barbier <anthony.barbier@arm.com> Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'tests/SConscript')
-rw-r--r--tests/SConscript21
1 files changed, 12 insertions, 9 deletions
diff --git a/tests/SConscript b/tests/SConscript
index 9c9897ea0e..37c96d2f22 100644
--- a/tests/SConscript
+++ b/tests/SConscript
@@ -30,7 +30,8 @@ SConscript('./framework/SConscript', duplicate=0)
# vars is imported from arm_compute:
variables = [
BoolVariable("validation_tests", "Build validation test programs", True),
- BoolVariable("benchmark_tests", "Build benchmark test programs", True)
+ BoolVariable("benchmark_tests", "Build benchmark test programs", True),
+ ("test_filter", "Pattern to specify the tests' filenames to be compiled", "*.cpp")
]
# We need a separate set of Variables for the Help message (Otherwise the global variables will get displayed twice)
@@ -89,22 +90,24 @@ files_validation += Glob('validation/UNIT/*.cpp')
if env['opencl']:
Import('opencl')
+ filter_pattern = test_env['test_filter']
test_env.Append(CPPDEFINES=['ARM_COMPUTE_CL'])
test_env.Append(LIBS = ["OpenCL"])
- files_benchmark += Glob('benchmark/CL/*/*.cpp')
- files_benchmark += Glob('benchmark/CL/*.cpp')
+ files_benchmark += Glob('benchmark/CL/*/' + filter_pattern)
+ files_benchmark += Glob('benchmark/CL/' + filter_pattern)
- files_validation += Glob('validation/CL/*/*.cpp')
- files_validation += Glob('validation/CL/*.cpp')
+ files_validation += Glob('validation/CL/*/' + filter_pattern)
+ files_validation += Glob('validation/CL/' + filter_pattern)
if env['neon']:
- files_benchmark += Glob('benchmark/NEON/*/*.cpp')
- files_benchmark += Glob('benchmark/NEON/*.cpp')
+ filter_pattern = test_env['test_filter']
+ files_benchmark += Glob('benchmark/NEON/*/' + filter_pattern)
+ files_benchmark += Glob('benchmark/NEON/' + filter_pattern)
- files_validation += Glob('validation/NEON/*/*.cpp')
- files_validation += Glob('validation/NEON/*.cpp')
+ files_validation += Glob('validation/NEON/*/' + filter_pattern)
+ files_validation += Glob('validation/NEON/' + filter_pattern)
if env['os'] == 'android':
test_env.Append(LIBS = ["log"])