-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathrun.sh
More file actions
25 lines (21 loc) · 722 Bytes
/
run.sh
File metadata and controls
25 lines (21 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
rm -f result.txt
git restore testing/main.c
for config in testing/pre-commit-config.yaml testing/pre-commit-config-version.yaml testing/pre-commit-config-verbose.yaml; do
pre-commit clean
pre-commit run -c $config --files testing/main.c | tee -a result.txt || true
git restore testing/main.c
done
failed_cases=`grep -c "Failed" result.txt`
echo $failed_cases " cases failed."
if [ $failed_cases -eq 9 ]; then
echo "=============================="
echo "Test cpp-linter-hooks success."
echo "=============================="
exit 0
rm result.txt
else
echo "============================="
echo "Test cpp-linter-hooks failed."
echo "============================="
exit 1
fi