Skip to content

Commit f14f0df

Browse files
committed
test travis code coverage
1 parent 8dbad58 commit f14f0df

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

.travis.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,35 @@ sudo: false
22
os: linux
33
language: d
44
d: dmd-2.071.0
5+
git:
6+
depth: 1
57
install:
6-
- wget "https://raw.githubusercontent.com/dlang/dmd/master/src/checkwhitespace.d" -O ../checkwhitespace.d
8+
- mkdir phobos
9+
- ls -1 | grep -v ^phobos | xargs -I{} mv {} phobos
10+
- git clone --depth=1 https://github.com/dlang/dmd
11+
- git clone --depth=1 https://github.com/dlang/druntime
12+
# whitespace check
13+
- wget "https://raw.githubusercontent.com/dlang/dmd/master/src/checkwhitespace.d" -O checkwhitespace.d
14+
# dscanner
715
- git clone https://github.com/Hackerpilot/Dscanner
816
- (cd Dscanner && git checkout tags/v0.4.0-alpha6)
917
- (cd Dscanner && git submodule update --init --recursive)
1018
# debug build is faster, but disable 'missing import' messages (missing core from druntime)
1119
- (cd Dscanner && sed 's/dparse_verbose/StdLoggerDisableWarning/' -i makefile && make githash debug)
1220
# avoid checking it's dscanner's directory
13-
- mv Dscanner/dsc .
14-
- rm -rf Dscanner
1521
script:
16-
- (cd .. && rdmd ./checkwhitespace.d $(find phobos -name '*.d'))
22+
- rdmd ./checkwhitespace.d $(find phobos -name '*.d')
1723
# enforce whitespace between statements
18-
- grep -nE "(for|foreach|foreach_reverse|if|while|switch|catch)\(" $(find . -name '*.d'); test $? -eq 1
24+
- (cd phobos && grep -nE "(for|foreach|foreach_reverse|if|while|switch|catch)\(" $(find . -name '*.d'); test $? -eq 1)
1925
# enforce whitespace between colon(:) for import statements (doesn't catch everything)
20-
- grep -n 'import [^/,=]*:.*;' $(find . -name '*.d') | grep -vE "import ([^ ]+) :\s"; test $? -eq 1
26+
- (cd phobos && grep -n 'import [^/,=]*:.*;' $(find . -name '*.d') | grep -vE "import ([^ ]+) :\s"; test $? -eq 1)
2127
# enforce all-man style
22-
- grep -nE '(if|for|foreach|foreach_reverse|while|unittest|switch|else|version) .*{$' $(find . -name '*.d'); test $? -eq 1
28+
- (cd phobos && grep -nE '(if|for|foreach|foreach_reverse|while|unittest|switch|else|version) .*{$' $(find . -name '*.d'); test $? -eq 1)
2329
# at the moment libdparse has problems to parse some modules (->excludes)
24-
- ./dsc --config .dscanner.ini --styleCheck $(find etc std -type f -name '*.d' | grep -vE 'std/traits.d|std/typecons.d|std/conv.d') -I.
30+
- (cd phobos && ../Dscanner/dsc --config ../.dscanner.ini --styleCheck $(find etc std -type f -name '*.d' | grep -vE 'std/traits.d|std/typecons.d|std/conv.d') -I.)
31+
# test code coverage
32+
- (cd dmd && make -f posix.mak)
33+
- (cd druntime && make -f posix.mak)
34+
- (cd phobos && make -f posix.mak $(find std etc -name "*.d" | sed "s/[.]d$/.test/" | grep -vE '(std.encoding|net.curl)' ))
35+
after_success:
36+
- (cd phobos && bash <(curl -s https://codecov.io/bash))

0 commit comments

Comments
 (0)