Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
sudo: false
os: linux
language: d
d: dmd-2.071.0
git:
depth: 1
install:
- mkdir druntime
- ls -1 | grep -v ^druntime | xargs -I{} mv {} druntime
- git clone --depth=1 https://github.com/dlang/dmd
# Dscanner should be enabled soon
#- git clone https://github.com/Hackerpilot/Dscanner
#- (cd Dscanner && git checkout tags/v0.4.0-alpha.8)
#- (cd Dscanner && git submodule update --init --recursive)
## debug build is faster, but disable 'missing import' messages (missing core from druntime)
#- (cd Dscanner && sed 's/dparse_verbose/StdLoggerDisableWarning/' -i makefile && make githash debug)
## avoid checking it's dscanner's directory
script:
- echo "Checking for trailing whitespace"
- rdmd ./dmd/src/checkwhitespace.d $(find druntime -name '*.d')
# This should be enabled over time
#- echo "Enforce whitespace between statements"
#- (cd druntime && grep -nE "(for|foreach|foreach_reverse|if|while|switch|catch)\(" $(find src -name '*.d'); test $? -eq 1)
#- echo "Enforce whitespace between colon(:) for import statements (doesn't catch everything)"
#- (cd druntime && grep -n 'import [^/,=]*:.*;' $(find src -name '*.d') | grep -vE "import ([^ ]+) :\s"; test $? -eq 1)
#- echo "Enforce Allman style"
#- (cd druntime && grep -nE '(if|for|foreach|foreach_reverse|while|unittest|switch|else|version) .*{$' $(find src -name '*.d'); test $? -eq 1)
#- echo "Running DScanner"
#- (cd druntime && ../Dscanner/dsc --config ../.dscanner.ini --styleCheck src)
# test code coverage
- (cd dmd && make -f posix.mak)
- (cd druntime && TEST_COVERAGE="1" make -f posix.mak unittest-debug)
# ignore stored coverage reports
- rm -r dmd/test/runnable/extra-files
- rm -r druntime/test/coverage/generated
after_success:
- (cd druntime && bash <(curl -s https://codecov.io/bash))
3 changes: 2 additions & 1 deletion posix.mak
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ DOCDIR=doc
IMPDIR=import

OPTIONAL_PIC:=$(if $(PIC),-fPIC,)
OPTIONAL_COVERAGE:=$(if $(TEST_COVERAGE),-cov,)

ifeq (osx,$(OS))
DOTDLL:=.dylib
Expand All @@ -52,7 +53,7 @@ ifeq (solaris,$(OS))
endif

# Set DFLAGS
UDFLAGS:=-conf= -Isrc -Iimport -w -dip25 $(MODEL_FLAG) $(OPTIONAL_PIC)
UDFLAGS:=-conf= -Isrc -Iimport -w -dip25 $(MODEL_FLAG) $(OPTIONAL_PIC) $(OPTIONAL_COVERAGE)
ifeq ($(BUILD),debug)
UDFLAGS += -g -debug
DFLAGS:=$(UDFLAGS)
Expand Down
5 changes: 5 additions & 0 deletions src/test_runner.d
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,9 @@ shared static this()

void main()
{
version(D_Coverage)
{
import core.runtime : dmd_coverSetMerge;
dmd_coverSetMerge(true);
}
}