From 72ac96b23a16ab713a02116f81c18db335b6d140 Mon Sep 17 00:00:00 2001 From: Steven Koo Date: Wed, 10 Feb 2021 19:20:12 -0600 Subject: devtest: reapply allow extra device arguments when running devtests This change is substantially the same as 7b86a47, but implemented in a ninja supported way. ninja doesn't allow for arguments, so this uses an environment variable. This is compatible with both make and ninja. The only change from the calling point of view is you must set the environment variable before calling "make test_[devicetype]" instead of after as an arg. This allows running devtests for a single device instead of all connected devices or selecting a specific network interface. Set the additional device arguments with the EXTRA_DEV_ARGS variable. This can be set as an environment variable or on the command line. For example: EXTRA_DEV_ARGS=addr=192.168.30.2 make test_x3x0 Also-by: Matthew Crymble Signed-off-by: Steven Koo --- host/tests/devtest/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host/tests/devtest/CMakeLists.txt') diff --git a/host/tests/devtest/CMakeLists.txt b/host/tests/devtest/CMakeLists.txt index 429d1a731..e6cef17fe 100644 --- a/host/tests/devtest/CMakeLists.txt +++ b/host/tests/devtest/CMakeLists.txt @@ -26,7 +26,7 @@ macro(ADD_DEVTEST pattern filter devtype) ${RUNTIME_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/run_testsuite.py "--src-dir" "${CMAKE_CURRENT_SOURCE_DIR}" "--devtest-pattern" "${pattern}" - "--args" "type=${filter}" + "--args" "$$EXTRA_DEV_ARGS,type=${filter}" "--build-type" "${CMAKE_BUILD_TYPE}" "--build-dir" "${CMAKE_BINARY_DIR}" "--python-interp" "${RUNTIME_PYTHON_EXECUTABLE}" -- cgit v1.2.3