on xenial help sign in
Allow passing arguments and collapse stdout and stderr so they show up like we expect
commit8277c02b296943cc3b7ee271a315b17279246258 authorMichael Terry <mike@mterry.name> dateTue 10 Jan 2017, 14:52 (10 years ago) parentfa68d4d
1 file changed+2−1
cmake/modules/QmlTest.cmake+2−1
cmake/modules/QmlTest.cmake+2−1
@@ -307,6 +307,7 @@ function(install_test_script TARGET_NAME)
307307 foreach(ONE_CMD ${TEST_COMMAND})
308308 set(script "${script}'${ONE_CMD}' ")
309309 endforeach()
310+ set(script "${script}\"\$@\"") # Allow passing arguments if desired
310311
311312 set(filename "${CMAKE_BINARY_DIR}/tests/scripts/${TARGET_NAME}.sh")
312313
@@ -370,7 +371,7 @@ function(add_meta_dependencies UPSTREAM_TARGET)
370371 # add depend to the meta test script that we will install on system
371372 set(filename "${CMAKE_BINARY_DIR}/tests/scripts/${UPSTREAM_TARGET}.sh")
372373 if (EXISTS "${filename}")
373− file(APPEND "${filename}" "${CMAKE_INSTALL_PREFIX}/${SHELL_PRIVATE_LIBDIR}/tests/scripts/${depend}.sh\n")
374+ file(APPEND "${filename}" "${CMAKE_INSTALL_PREFIX}/${SHELL_PRIVATE_LIBDIR}/tests/scripts/${depend}.sh \"\$@\" 2>&1\n")
374375 endif()
375376 endforeach()
376377endfunction()