mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-28 09:08:56 -05:00
23 lines
420 B
Bash
Executable File
23 lines
420 B
Bash
Executable File
#!/bin/bash
|
|
|
|
printf "\033[0;32mRunning tests...\033[0m\n"
|
|
|
|
# Pass lint and mocha tests
|
|
CHECK_OUTPUT=`make check`
|
|
if [ $? -ne 0 ]
|
|
then
|
|
printf "%s\n" "${CHECK_OUTPUT}"
|
|
printf "\033[0;31mAborting commit\033[0m\n"
|
|
exit 1
|
|
fi
|
|
|
|
# Have normalized whitespaces
|
|
git diff-index --check --cached 'HEAD' --
|
|
if [ $? -ne 0 ]
|
|
then
|
|
printf "\033[0;31mAborting commit\033[0m\n"
|
|
exit 1
|
|
fi
|
|
|
|
printf "\033[0;32mTests pass!\033[0m\n"
|