From 72610dcf2d634c9c2919ad55245c5c91609e87eb Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Wed, 18 Nov 2020 15:29:08 +0000 Subject: Remove 3rdparty submodule and internal_only build option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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=`. 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 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4704 Reviewed-by: Georgios Pinitas Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins --- tests/SConscript | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) (limited to 'tests') 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]) -- cgit v1.2.1