-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-tests
executable file
·106 lines (66 loc) · 2.3 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#!/bin/bash
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
# https://github.com/dart-lang/dart_style
echo dart pub global activate dart_style
time dart pub global activate dart_style
print_ruler
# https://github.com/dart-lang/linter
echo Running: dart analyze ./lib
time dart analyze ./lib
print_ruler
echo Running: dart analyze ./test
time dart analyze ./test
print_ruler
echo rm -rf ./coverage
time rm -rf ./coverage
print_ruler
# https://github.com/dart-lang/test
echo Running: dart test --run-skipped --no-color .
time dart test --run-skipped --no-color .
print_ruler
echo dart pub global activate coverage
time dart pub global activate coverage
print_ruler
# https://github.com/dart-lang/coverage
# dart pub global activate coverage
# note: can't find a way to run skipped tests when testing coverage
echo Running: dart pub global run coverage:test_with_coverage
time dart pub global run coverage:test_with_coverage
print_ruler
echo dart run test --run-skipped --no-color --coverage=./coverage
time dart run test --run-skipped --no-color --coverage=./coverage
print_ruler
# https://pub.dev/packages/test
echo dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov -o ./coverage/lcov.info -i ./coverage
time dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov -o ./coverage/lcov.info -i ./coverage
print_ruler
# https://github.com/linux-test-project/lcov
echo Running: lcov --summary ./coverage/lcov.info
time lcov --summary ./coverage/lcov.info
print_ruler
echo genhtml -o ./coverage/report ./coverage/lcov.info
time genhtml -o ./coverage/report ./coverage/lcov.info
print_ruler
# go install github.com/client9/misspell/cmd/misspell@latest
echo Running: misspell .
time misspell .
print_ruler
# https://github.com/dart-lang/pana
# dart pub global activate pana
#echo Running: dart pub global run pana --no-warning .
#time dart pub global run pana --no-warning .
#print_ruler
# https://github.com/dart-lang/dartdoc
echo Running: dart doc .
time dart doc .
print_ruler
} # main()
time main "$@" |& tee ./run-tests-dart.txt