-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-tests
executable file
·72 lines (44 loc) · 1.38 KB
/
run-tests
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
shopt -s nullglob
print_ruler() {
printf "\n"
printf "=%.0s" {1..79}
printf "\n"
printf "\n"
} # print_ruler()
main() {
printf "Running automated test file(s):\n\n"
print_ruler
echo Running: make clean
time make clean
print_ruler
# https://jasoncarloscox.com/blog/cpp-testing-with-coverage/
# https://gcovr.com/en/master/guide/compiling.html
echo export LDFLAGS=\"-lgcov --coverage\" CXXFLAGS=\"--coverage\"
export LDFLAGS="-lgcov --coverage" CXXFLAGS="--coverage"
print_ruler
echo Running: make coverage '|' ansifilter
time make coverage | ansifilter
print_ruler
# cmake-format
echo cmake-format --in-place CMakeLists.txt
time cmake-format --in-place CMakeLists.txt
print_ruler
# cmake-lint
echo cmake-lint CMakeLists.txt
time cmake-lint CMakeLists.txt
print_ruler
# https://clang.llvm.org/docs/ClangFormat.html
echo Running: clang-format-16 -style=file -i ./*.cpp ./*.hpp ./*.h
time clang-format-16 -style=file -i ./*.cpp ./*.hpp ./*.h
print_ruler
# https://clang.llvm.org/docs/ClangCheck.html
echo Running: ../../.github/citools/cpp/clang-check
time ../../.github/citools/cpp/clang-check
print_ruler
# https://clang.llvm.org/extra/clang-tidy/
echo Running: ../../.github/citools/cpp/clang-tidy '|' head -n 100
time ../../.github/citools/cpp/clang-tidy | head -n 100
print_ruler
} # main()
time main "$@" |& tee ./run-tests-cpp.txt