diff options
author | Michele Di Giorgio <michele.digiorgio@arm.com> | 2020-11-18 15:29:08 +0000 |
---|---|---|
committer | Michele Di Giorgio <michele.digiorgio@arm.com> | 2020-12-17 08:40:07 +0000 |
commit | 72610dcf2d634c9c2919ad55245c5c91609e87eb (patch) | |
tree | c008e47e360f8e903aa26642c5ab0685d69bb1b5 /tests/SConscript | |
parent | 462e75e217a11b92b8df8c3434f2491ef70487e3 (diff) | |
download | ComputeLibrary-72610dcf2d634c9c2919ad55245c5c91609e87eb.tar.gz |
Remove 3rdparty submodule and internal_only build option
Remove 3rdparty submodule and allow to build external tests, examples
and benchmarks using the Compute Library test framework.
In order to use this option, the external tests directory must have the
following structure:
EXTERNAL_TESTS_DIR:
└── tests
├── benchmark
│ ├── CL
│ ├── datasets
│ ├── fixtures
│ └── NEON
└── validation
├── CL
├── datasets
├── fixtures
└── NEON
Then, the user can build the library with
`external_tests_dir=<PATH_TO_EXTERNAL_TESTS_DIR>`.
Also, remove internal_only build option". Without the 3rdparty
submodule, this build option is no longer needed.
Resolves: COMPMID-3417, COMPMID-3419
Change-Id: Ib7bf8ec7b9b9317fd82012a96bf4a7b0be846c1b
Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4704
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/SConscript')
-rw-r--r-- | tests/SConscript | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/tests/SConscript b/tests/SConscript index 6fc67af747..565aeac4a1 100644 --- a/tests/SConscript +++ b/tests/SConscript @@ -88,20 +88,16 @@ else: if env['os'] in ['bare_metal']: Import("bootcode_o") -#FIXME Delete before release -if env['internal_only']: - test_env.Append(CPPDEFINES=['INTERNAL_ONLY']) - -test_env.Append(CPPPATH = ["#3rdparty/include"]) -test_env.Append(LIBPATH = ["#3rdparty/%s/%s" % (env['os'], env['arch'])]) +if env['external_tests_dir']: + test_env.Append(CPPPATH = [env['external_tests_dir'] + "/include"]) + test_env.Append(LIBPATH = [env['external_tests_dir'] + "/%s/%s" % (env['os'], env['arch'])]) common_files = Glob('*.cpp') common_objects = [test_env.StaticObject(f) for f in common_files] files_benchmark = Glob('benchmark/*.cpp') -#FIXME Delete before release -if env['internal_only']: - files_benchmark += Glob('../3rdparty/tests/benchmark/*.cpp') +if env['external_tests_dir']: + files_benchmark += Glob(env['external_tests_dir'] + '/tests/benchmark/*.cpp') # Add unit tests files_validation = Glob('validation/UNIT/*/*.cpp') @@ -118,23 +114,20 @@ if env['opencl']: files_benchmark += Glob('benchmark/CL/*/' + filter_pattern) files_benchmark += Glob('benchmark/CL/' + filter_pattern) - #FIXME Delete before release - if env['internal_only']: - files_benchmark += Glob('../3rdparty/tests/benchmark/CL/' + filter_pattern) + if env['external_tests_dir']: + files_benchmark += Glob(env['external_tests_dir'] + '/tests/benchmark/CL/' + filter_pattern) files_validation += Glob('validation/CL/*/' + filter_pattern) files_validation += Glob('validation/CL/' + filter_pattern) - #FIXME Delete before release - if env['internal_only']: - files_validation += Glob('../3rdparty/tests/validation/CL/' + filter_pattern) + if env['external_tests_dir']: + files_validation += Glob(env['external_tests_dir'] + '/tests/validation/CL/' + filter_pattern) if env['neon']: filter_pattern = test_env['test_filter'] files_benchmark += Glob('benchmark/NEON/*/' + filter_pattern) files_benchmark += Glob('benchmark/NEON/' + filter_pattern) - #FIXME Delete before release - if env['internal_only']: - files_benchmark += Glob('../3rdparty/tests/benchmark/NEON/' + filter_pattern) + if env['external_tests_dir']: + files_benchmark += Glob(env['external_tests_dir'] + '/tests/benchmark/NEON/' + filter_pattern) files_validation += Glob('validation/NEON/' + filter_pattern) if env['os'] == 'bare_metal': @@ -143,6 +136,8 @@ if env['neon']: files_validation += Glob('validation/NEON/UNIT/TensorAllocator.cpp' + filter_pattern) else: files_validation += Glob('validation/NEON/*/' + filter_pattern) + if env['external_tests_dir']: + files_validation += Glob(env['external_tests_dir'] + '/tests/validation/NEON/' + filter_pattern) if env['gles_compute']: @@ -241,7 +236,10 @@ if test_env['benchmark_examples']: graph_utils = test_env.Object(source="../utils/GraphUtils.cpp", target="GraphUtils") graph_params = test_env.Object(source="../utils/CommonGraphOptions.cpp", target="CommonGraphOptions") arm_compute_benchmark_examples = [] - for examples_folder in [ "../examples", "../3rdparty/examples"]: + all_examples_folders = ["../examples"] + if env['external_tests_dir']: + all_examples_folders.append(env['external_tests_dir'] + "/examples") + for examples_folder in all_examples_folders: if test_env['neon']: for file in Glob("%s/neon_*.cpp" % examples_folder): example = "benchmark_" + os.path.basename(os.path.splitext(str(file))[0]) |