diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2011-02-04 19:56:28 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2011-02-04 20:11:26 -0300 |
commit | c306628bd2b06ec5a9a734e33a8d948be1811649 (patch) | |
tree | 4d2ffed47ccb72cc966072f00358125ba91dbb69 /tests/test_generator/run_test.cmake | |
parent | 2456d853d7aa4254ca0ad63b48f667796fc51fe1 (diff) |
Added a CMake script that sets some environment variables before calling the tests.
This is used as a workaround to a CMake 2.6 limitation that prevents
environment variables to be set for tests.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Lauro Neto <lauro.neto@openbossa.org>
Diffstat (limited to 'tests/test_generator/run_test.cmake')
-rw-r--r-- | tests/test_generator/run_test.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_generator/run_test.cmake b/tests/test_generator/run_test.cmake new file mode 100644 index 000000000..34a821d80 --- /dev/null +++ b/tests/test_generator/run_test.cmake @@ -0,0 +1,11 @@ +# 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() |