summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CPack/PreTestError.cmake
diff options
context:
space:
mode:
authorDomen Vrankar <domen.vrankar@gmail.com>2015-06-05 19:03:26 (GMT)
committerBrad King <brad.king@kitware.com>2015-06-15 19:09:07 (GMT)
commite726fc025a3543c0be8a4eb217b0a80f9c16051c (patch)
tree2ed4f4114caff68ff16d06fc2e0e518ff6f5a771 /Tests/RunCMake/CPack/PreTestError.cmake
parent092f1539af99e031c99a74d5a0f24731f58bf10a (diff)
downloadCMake-e726fc025a3543c0be8a4eb217b0a80f9c16051c.zip
CMake-e726fc025a3543c0be8a4eb217b0a80f9c16051c.tar.gz
CMake-e726fc025a3543c0be8a4eb217b0a80f9c16051c.tar.bz2
Tests: Add RunCMake tests for CPack{Deb,RPM}
Add script structure for easier addition of new CPack related tests.
Diffstat (limited to 'Tests/RunCMake/CPack/PreTestError.cmake')
-rw-r--r--Tests/RunCMake/CPack/PreTestError.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPack/PreTestError.cmake b/Tests/RunCMake/CPack/PreTestError.cmake
new file mode 100644
index 0000000..f88f2e8
--- /dev/null
+++ b/Tests/RunCMake/CPack/PreTestError.cmake
@@ -0,0 +1,7 @@
+file(READ "${bin_dir}/test_output.txt" output)
+file(READ "${bin_dir}/test_error.txt" error)
+
+message(FATAL_ERROR "Error in pre-test phase '${RunCMake_TEST_STEP}'!\n"
+ "Return code: '${return_code}'\n"
+ "Info output: '${output}'\n"
+ "Error output: '${error}'")