aboutsummaryrefslogtreecommitdiff
path: root/tests/SConscript
diff options
context:
space:
mode:
Diffstat (limited to 'tests/SConscript')
-rw-r--r--tests/SConscript40
1 files changed, 21 insertions, 19 deletions
diff --git a/tests/SConscript b/tests/SConscript
index aa5a85a923..fe9d6878e4 100644
--- a/tests/SConscript
+++ b/tests/SConscript
@@ -188,25 +188,27 @@ if env['fixed_format_kernels'] and test_env['validation_tests']:
test_env.Append(CPPDEFINES = ['ARM_COMPUTE_ENABLE_FIXED_FORMAT_KERNELS'])
if test_env['validation_tests']:
- #Set up to use temp file for long command when building and linking libraries
- test_env['TEMPFILE'] = SCons.Platform.TempFileMunge
-
- #To use temp file for any command, the following pattern should be used:
- # env['COMMAND'] = "{$TEMPFILE('$COMMANDSTRING')}"
- #See: https://github.com/SCons/scons/blob/05f2992377844bbfec9bcd4a9c7f5479c634b91b/SCons/Platform/__init__.py#L147
- #The commands' string are taken from https://github.com/SCons/scons
- #The commands' explanations are taken from Scons userguide
-
- #The command line used to compile C++ source file to an object files
- test_env['CXXCOM'] = "${TEMPFILE('"+ test_env['CXXCOM'] + "')}"
- #The command line used to generate a static library from object files
- test_env['ARCOM'] = "${TEMPFILE('"+ test_env['ARCOM'] + "')}"
- #The command line used to index a static library archive
- test_env['RANLIBCOM'] = "${TEMPFILE('"+ test_env['RANLIBCOM'] + "')}"
- #The command line used to link object files into an executable
- test_env['LINKCOM'] = "${TEMPFILE('"+ test_env['LINKCOM'] + "')}"
- #Set up directory for temp files. To prevent permission issue, the temp files are in the same directory with output files
- test_env['TEMPFILEDIR'] = test_env['build_dir']
+ #The following set up only works for posix system, RANLIBCOM env variable isn't available on win32 HOST_OS
+ if test_env['HOST_OS'] == 'posix':
+ #Set up to use temp file for long command when building and linking libraries
+ test_env['TEMPFILE'] = SCons.Platform.TempFileMunge
+
+ #To use temp file for any command, the following pattern should be used:
+ # env['COMMAND'] = "{$TEMPFILE('$COMMANDSTRING')}"
+ #See: https://github.com/SCons/scons/blob/05f2992377844bbfec9bcd4a9c7f5479c634b91b/SCons/Platform/__init__.py#L147
+ #The commands' string are taken from https://github.com/SCons/scons
+ #The commands' explanations are taken from Scons userguide
+
+ #The command line used to compile C++ source file to an object files
+ test_env['CXXCOM'] = "${TEMPFILE('"+ test_env['CXXCOM'] + "')}"
+ #The command line used to generate a static library from object files
+ test_env['ARCOM'] = "${TEMPFILE('"+ test_env['ARCOM'] + "')}"
+ #The command line used to index a static library archive
+ test_env['RANLIBCOM'] = "${TEMPFILE('"+ test_env['RANLIBCOM'] + "')}"
+ #The command line used to link object files into an executable
+ test_env['LINKCOM'] = "${TEMPFILE('"+ test_env['LINKCOM'] + "')}"
+ #Set up directory for temp files. To prevent permission issue, the temp files are in the same directory with output files
+ test_env['TEMPFILEDIR'] = test_env['build_dir']
arm_compute_validation_framework = test_env.StaticLibrary('arm_compute_validation_framework', Glob('validation/reference/*.cpp') + Glob('validation/*.cpp'), LINKFLAGS=test_env['LINKFLAGS'], CXXFLAGS=test_env['CXXFLAGS'], LIBS= [ arm_compute_test_framework ])
Depends(arm_compute_validation_framework , arm_compute_test_framework)