on xenial help sign in
mkdir and touch the xml files
f5df20dMichael Terry
cmake/modules/QmlTest.cmake+9−2
@@ -300,6 +300,8 @@ function(install_test_script TARGET_NAME)
300 set(script "${script}XML_ARGS=\n")
300 set(script "${script}XML_ARGS=\n")
301 set(script "${script}if [ -n \"\$ARTIFACTS_DIR\" ]; then\n")
301 set(script "${script}if [ -n \"\$ARTIFACTS_DIR\" ]; then\n")
302 set(script "${script} XML_ARGS=\"@XML_ARGS@\"\n")
302 set(script "${script} XML_ARGS=\"@XML_ARGS@\"\n")
303+ set(script "${script} mkdir -p \"@XML_DIR@\"\n")
304+ set(script "${script} touch \"@XML_FILE@\"\n")
303 set(script "${script}fi\n")
305 set(script "${script}fi\n")
304 set(script "${script}\n")
306 set(script "${script}\n")
305 foreach(ONE_CMD ${TEST_COMMAND})
307 foreach(ONE_CMD ${TEST_COMMAND})
@@ -326,10 +328,15 @@ function(install_test_script TARGET_NAME)
326
328
327 # Now some replacements...
329 # Now some replacements...
328 # tests like to write xml output to our builddir; we don't need that, but we do want them in ARTIFACTS_DIR
330 # tests like to write xml output to our builddir; we don't need that, but we do want them in ARTIFACTS_DIR
329− string(REGEX MATCH \"( '--parameter')? '-o'( '--parameter')? '[^ ]*,xunitxml' \" xmlargs \"\${replacestr}\")
331+ string(REGEX MATCH \"( '--parameter')? '-o'( '--parameter')? '[^']*,xunitxml' \" xmlargs \"\${replacestr}\")
330− string(REGEX REPLACE \"( '--parameter')? '-o'( '--parameter')? '[^ ]*,xunitxml' \" \" \\\$XML_ARGS \" replacestr \"\${replacestr}\")
332+ string(REGEX REPLACE \"( '--parameter')? '-o'( '--parameter')? '[^']*,xunitxml' \" \" \\\$XML_ARGS \" replacestr \"\${replacestr}\")
331 string(REGEX REPLACE \"${CMAKE_BINARY_DIR}\" \"\\\$ARTIFACTS_DIR\" xmlargs \"\${xmlargs}\")
333 string(REGEX REPLACE \"${CMAKE_BINARY_DIR}\" \"\\\$ARTIFACTS_DIR\" xmlargs \"\${xmlargs}\")
334+ string(REGEX REPLACE \".*'([^']*),xunitxml'.*\" \"\\\\1\" xmlfile \"\${xmlargs}\")
335+ string(REGEX REPLACE \"(.*)/[^/]*\" \"\\\\1\" xmldir \"\${xmlfile}\")
336+ string(REGEX REPLACE \"'\" \"\" xmlargs \"\${xmlargs}\") # strip single quotes
332 string(REGEX REPLACE \"@XML_ARGS@\" \"\${xmlargs}\" replacestr \"\${replacestr}\")
337 string(REGEX REPLACE \"@XML_ARGS@\" \"\${xmlargs}\" replacestr \"\${replacestr}\")
338+ string(REGEX REPLACE \"@XML_DIR@\" \"\${xmldir}\" replacestr \"\${replacestr}\")
339+ string(REGEX REPLACE \"@XML_FILE@\" \"\${xmlfile}\" replacestr \"\${replacestr}\")
333 # replace build/source roots with their install paths
340 # replace build/source roots with their install paths
334 string(REPLACE \"${CMAKE_BINARY_DIR}/libs\" \"${CMAKE_INSTALL_PREFIX}/${SHELL_PRIVATE_LIBDIR}\" replacestr \"\${replacestr}\")
341 string(REPLACE \"${CMAKE_BINARY_DIR}/libs\" \"${CMAKE_INSTALL_PREFIX}/${SHELL_PRIVATE_LIBDIR}\" replacestr \"\${replacestr}\")
335 string(REPLACE \"${CMAKE_BINARY_DIR}/plugins\" \"${CMAKE_INSTALL_PREFIX}/${SHELL_INSTALL_QML}\" replacestr \"\${replacestr}\")
342 string(REPLACE \"${CMAKE_BINARY_DIR}/plugins\" \"${CMAKE_INSTALL_PREFIX}/${SHELL_INSTALL_QML}\" replacestr \"\${replacestr}\")