aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/test_generator/run_test.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/tests/test_generator/run_test.cmake')
-rw-r--r--sources/shiboken6/tests/test_generator/run_test.cmake14
1 files changed, 14 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/test_generator/run_test.cmake b/sources/shiboken6/tests/test_generator/run_test.cmake
new file mode 100644
index 000000000..37e40b993
--- /dev/null
+++ b/sources/shiboken6/tests/test_generator/run_test.cmake
@@ -0,0 +1,14 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+# The tests are run through this script due to a limitation
+# on versions of CMake lesser than 2.8, that prevent setting
+# environment variables for tests from working.
+
+set(ENV{PATH} "${ENV_PATH}")
+set(ENV{QT_PLUGIN_PATH} "${ENV_QT_PLUGIN_PATH}")
+execute_process(COMMAND ${TEST} WORKING_DIRECTORY "${WORKDIR}" RESULT_VARIABLE OK)
+
+if(NOT OK EQUAL 0)
+ message(SEND_ERROR "${TEST} failed!")
+endif()