Skip to content

Commit

Permalink
QNX: Generate empty string for WORKING_DIRECTORY test wrapper
Browse files Browse the repository at this point in the history
Tests for QNX are run in qemu over ssh and setting WORKING_DIRECTORY
will cause created test wrapper to try change specified directory
which will fail (expects local directory) when test is invoked over
ssh.

Task-number: QTBUG-87628
Pick-to: 6.2
Change-Id: If991002398811cc9cb9cbac54da5d2cb0d8c3589
Reviewed-by: Alexandru Croitor <[email protected]>
  • Loading branch information
Passeli committed Oct 27, 2021
1 parent 6de3691 commit c91b5da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmake/QtTestHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ function(qt_internal_add_test name)
if (ANDROID)
qt_internal_android_test_arguments("${name}" test_executable extra_test_args)
set(test_working_dir "${CMAKE_CURRENT_BINARY_DIR}")
elseif(QNX)
set(test_working_dir "")
set(test_executable "${name}")
else()
if(arg_QMLTEST AND NOT arg_SOURCES)
set(test_working_dir "${CMAKE_CURRENT_SOURCE_DIR}")
Expand Down Expand Up @@ -508,7 +511,7 @@ function(qt_internal_create_command_script)
is not specified")
endif()

if(NOT arg_WORKING_DIRECTORY)
if(NOT arg_WORKING_DIRECTORY AND NOT QNX)
set(arg_WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
endif()

Expand Down

0 comments on commit c91b5da

Please sign in to comment.