aboutsummaryrefslogtreecommitdiff
path: root/tests/SConscript
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2018-04-03 13:44:29 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:49:16 +0000
commitd9eb27597eabe5b7c17520f4f9b3f8a282d72573 (patch)
tree9b2b7d74b0ef83623b18d6d4279a564e5b63d641 /tests/SConscript
parenta8ca2b0cfe052c9a28b691317a674f28f495c139 (diff)
downloadComputeLibrary-d9eb27597eabe5b7c17520f4f9b3f8a282d72573.tar.gz
COMPMID-797: Switch to new graph.
- Cleaned up build system Change-Id: If2faa27ee5b31fa8b972836960ab3ef671059c8d Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/126435 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Diffstat (limited to 'tests/SConscript')
-rw-r--r--tests/SConscript87
1 files changed, 27 insertions, 60 deletions
diff --git a/tests/SConscript b/tests/SConscript
index 4a4f1bf5dc..20095e56fb 100644
--- a/tests/SConscript
+++ b/tests/SConscript
@@ -74,7 +74,6 @@ if env['internal_only']:
test_env.Append(CPPPATH = ["#3rdparty/include"])
test_env.Append(LIBPATH = ["#3rdparty/%s/%s" % (env['os'], env['arch'])])
test_env.Append(LIBPATH = ["#build/%s" % env['build_dir']])
-test_env.Append(LIBPATH = ["#build/%s/opencl-1.2-stubs" % env['build_dir']])
common_files = Glob('*.cpp')
common_objects = [test_env.StaticObject(f) for f in common_files]
@@ -94,11 +93,9 @@ filter_pattern = test_env['test_filter']
files_validation += Glob('validation/CPP/' + filter_pattern)
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/*/' + filter_pattern)
files_benchmark += Glob('benchmark/CL/' + filter_pattern)
@@ -115,17 +112,6 @@ if env['neon']:
files_validation += Glob('validation/NEON/' + filter_pattern)
if env['gles_compute']:
- if env['os'] != 'android':
- Import('egl')
- Import('glesv2')
-
- test_env.Append(LIBS = ["EGL", "GLESv2"])
- else:
- if env['arch'] != 'armv7a':
- test_env.Append(LIBS = ["EGL", "GLESv3"])
- else:
- test_env.Append(LIBS = ["EGL", "GLESv2"])
-
test_env.Append(CPPDEFINES=['ARM_COMPUTE_GC'])
files_benchmark += Glob('benchmark/GLES_COMPUTE/*/*.cpp')
@@ -143,13 +129,6 @@ if test_env['benchmark_tests']:
arm_compute_benchmark = test_env.Program('arm_compute_benchmark', files_benchmark + common_objects)
Depends(arm_compute_benchmark, arm_compute_test_framework)
Depends(arm_compute_benchmark, arm_compute_lib)
-
- if env['opencl']:
- Depends(arm_compute_benchmark, opencl)
- if env['gles_compute'] and env['os'] != 'android':
- Depends(arm_compute_benchmark, egl)
- Depends(arm_compute_benchmark, glesv2)
-
Default(arm_compute_benchmark)
Export('arm_compute_benchmark')
@@ -158,12 +137,6 @@ if test_env['validation_tests']:
Depends(arm_compute_validation, arm_compute_test_framework)
Depends(arm_compute_validation, arm_compute_lib)
- if env['opencl']:
- Depends(arm_compute_validation, opencl)
- if env['gles_compute'] and env['os'] != 'android':
- Depends(arm_compute_validation, egl)
- Depends(arm_compute_validation, glesv2)
-
Default(arm_compute_validation)
Export('arm_compute_validation')
@@ -182,29 +155,26 @@ if test_env['validation_tests']:
files += Glob("validate_examples/neoncl_*.cpp")
for file in files:
example = "validate_" + os.path.basename(os.path.splitext(str(file))[0])
- cl_examples += [ test_env.Program(example, [ test_env.Object(source=file, target=example) ] + files_validate_examples, CPPDEFINES=['ARM_COMPUTE_CL'], LIBS = test_env["LIBS"] + ["OpenCL"]) ]
- Depends(cl_examples, opencl)
+ cl_examples += [ test_env.Program(example, [ test_env.Object(source=file, target=example) ] + files_validate_examples, LIBS = test_env["LIBS"]) ]
arm_compute_validate_examples += cl_examples
if test_env['opencl'] and test_env['neon']:
if env['os'] == 'android':
Import('arm_compute_graph_a')
- Import("arm_compute_graph2_a")
- graph_dependency = [ arm_compute_graph_a, arm_compute_graph2_a]
+ graph_dependency = [ arm_compute_graph_a]
else:
Import('arm_compute_graph_so')
- Import("arm_compute_graph2_so")
- graph_dependency = [ arm_compute_graph_so, arm_compute_graph2_so]
+ graph_dependency = [ arm_compute_graph_so]
graph_utils = test_env.Object(source="../utils/GraphUtils.cpp", target="GraphUtils")
for file in Glob("validate_examples/graph_*.cpp"):
example = "validate_" + os.path.basename(os.path.splitext(str(file))[0])
if env['os'] == 'android':
- prog = test_env.Program(example, [ test_env.Object(source=file, target=example), graph_utils]+ files_validate_examples, LIBS = test_env["LIBS"] + ["OpenCL"], LINKFLAGS=test_env["LINKFLAGS"]+['-Wl,--whole-archive',graph_dependency,'-Wl,--no-whole-archive'])
- Depends(prog, [graph_dependency, opencl])
+ prog = test_env.Program(example, [ test_env.Object(source=file, target=example), graph_utils]+ files_validate_examples, LIBS = test_env["LIBS"], LINKFLAGS=test_env["LINKFLAGS"]+['-Wl,--whole-archive',graph_dependency,'-Wl,--no-whole-archive'])
+ Depends(prog, graph_dependency)
arm_compute_validate_examples += [ prog ]
else:
#-Wl,--allow-shlib-undefined: Ignore dependencies of dependencies
- prog = test_env.Program(example, [ test_env.Object(source=file, target=example), graph_utils]+ files_validate_examples, LIBS = test_env["LIBS"] + ["arm_compute_graph", "arm_compute_graph2"], LINKFLAGS=test_env["LINKFLAGS"]+['-Wl,--allow-shlib-undefined'] )
+ prog = test_env.Program(example, [ test_env.Object(source=file, target=example), graph_utils]+ files_validate_examples, LIBS = test_env["LIBS"] + ["arm_compute_graph"], LINKFLAGS=test_env["LINKFLAGS"]+['-Wl,--allow-shlib-undefined'] )
Depends(prog, graph_dependency)
arm_compute_validate_examples += [ prog ]
Depends(arm_compute_validate_examples, arm_compute_test_framework)
@@ -227,31 +197,28 @@ if test_env['benchmark_examples']:
files += Glob("../examples/neoncl_*.cpp")
for file in files:
example = "benchmark_" + os.path.basename(os.path.splitext(str(file))[0])
- cl_examples += [ test_env.Program(example, [ test_env.Object(source=file, target=example) ] + files_benchmark_examples, CPPDEFINES=['ARM_COMPUTE_CL'], LIBS = test_env["LIBS"] + ["OpenCL"]) ]
- Depends(cl_examples, opencl)
+ cl_examples += [ test_env.Program(example, [ test_env.Object(source=file, target=example) ] + files_benchmark_examples, LIBS = test_env["LIBS"]) ]
arm_compute_benchmark_examples += cl_examples
- if test_env['opencl'] and test_env['neon']:
- if env['os'] == 'android':
- Import('arm_compute_graph_a')
- Import("arm_compute_graph2_a")
- graph_dependency = [arm_compute_graph_a, arm_compute_graph2_a]
- else:
- Import('arm_compute_graph_so')
- Import('arm_compute_graph2_so')
- graph_dependency = [arm_compute_graph_so, arm_compute_graph2_so]
-
- graph_utils = test_env.Object(source="../utils/GraphUtils.cpp", target="GraphUtils")
- for file in Glob("../examples/graph_*.cpp"):
- example = "benchmark_" + os.path.basename(os.path.splitext(str(file))[0])
- if env['os'] == 'android':
- prog = test_env.Program(example, [ test_env.Object(source=file, target=example), graph_utils]+ files_benchmark_examples, LIBS = test_env["LIBS"] + ["OpenCL"], LINKFLAGS=test_env["LINKFLAGS"]+['-Wl,--whole-archive',graph_dependency,'-Wl,--no-whole-archive'])
- Depends(prog, [graph_dependency, opencl])
- arm_compute_benchmark_examples += [ prog ]
- else:
- #-Wl,--allow-shlib-undefined: Ignore dependencies of dependencies
- prog = test_env.Program(example, [ test_env.Object(source=file, target=example), graph_utils]+ files_benchmark_examples, LIBS = test_env["LIBS"] + ["arm_compute_graph", "arm_compute_graph2"], LINKFLAGS=test_env["LINKFLAGS"]+['-Wl,--allow-shlib-undefined'] )
- Depends(prog, graph_dependency)
- arm_compute_benchmark_examples += [ prog ]
+
+ # Graph examples
+ if env['os'] == 'android':
+ Import('arm_compute_graph_a')
+ graph_dependency = [arm_compute_graph_a]
+ else:
+ Import('arm_compute_graph_so')
+ graph_dependency = [arm_compute_graph_so]
+ graph_utils = test_env.Object(source="../utils/GraphUtils.cpp", target="GraphUtils")
+ for file in Glob("../examples/graph_*.cpp"):
+ example = "benchmark_" + os.path.basename(os.path.splitext(str(file))[0])
+ if env['os'] == 'android':
+ prog = test_env.Program(example, [ test_env.Object(source=file, target=example), graph_utils]+ files_benchmark_examples, LIBS = test_env["LIBS"], LINKFLAGS=test_env["LINKFLAGS"]+['-Wl,--whole-archive',graph_dependency,'-Wl,--no-whole-archive'])
+ Depends(prog, [graph_dependency])
+ arm_compute_benchmark_examples += [ prog ]
+ else:
+ #-Wl,--allow-shlib-undefined: Ignore dependencies of dependencies
+ prog = test_env.Program(example, [ test_env.Object(source=file, target=example), graph_utils]+ files_benchmark_examples, LIBS = test_env["LIBS"] + ["arm_compute_graph"], LINKFLAGS=test_env["LINKFLAGS"]+['-Wl,--allow-shlib-undefined'] )
+ Depends(prog, graph_dependency)
+ arm_compute_benchmark_examples += [ prog ]
Depends(arm_compute_benchmark_examples, arm_compute_test_framework)
Depends(arm_compute_benchmark_examples, arm_compute_lib)
Default(arm_compute_benchmark_examples)