aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorMarco Hinz <mh.codebro@gmail.com>2015-11-17 13:16:33 +0100
committerMarco Hinz <mh.codebro@gmail.com>2015-11-23 13:57:21 +0100
commit818f926eb0ad1cdb3ca60a9f08682b50df4094e3 (patch)
tree6f40448518730054ed5c9c6425ee18ec7c9f18ee /cmake
parent4680b4f3b12f9ff69abbd56202a5590f155cdb65 (diff)
downloadrneovim-818f926eb0ad1cdb3ca60a9f08682b50df4094e3.tar.gz
rneovim-818f926eb0ad1cdb3ca60a9f08682b50df4094e3.tar.bz2
rneovim-818f926eb0ad1cdb3ca60a9f08682b50df4094e3.zip
Tests: add luacheck for linting tests
Source: https://github.com/mpeterv/luacheck Docs: http://luacheck.readthedocs.org/en/0.12.0/index.html Run via "make testlint".
Diffstat (limited to 'cmake')
-rw-r--r--cmake/RunTestsLint.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/cmake/RunTestsLint.cmake b/cmake/RunTestsLint.cmake
new file mode 100644
index 0000000000..cf5465803e
--- /dev/null
+++ b/cmake/RunTestsLint.cmake
@@ -0,0 +1,11 @@
+execute_process(
+ COMMAND ${LUACHECK_PRG} -q ${TEST_DIR}
+ WORKING_DIRECTORY ${TEST_DIR}
+ ERROR_VARIABLE err
+ RESULT_VARIABLE res
+ ${EXTRA_ARGS})
+
+if(NOT res EQUAL 0)
+ message(STATUS "Output to stderr:\n${err}")
+ message(FATAL_ERROR "Linting tests failed with error: ${res}.")
+endif()