Skip to content

Commit f3717dd

Browse files
committed
unit-threaded for the win
- use --single for now as tests are neither random- nor parallelizable atm.
1 parent c87961b commit f3717dd

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
dlang-bot
22
__test__unittest__
33
dlang-bot-test-unittest
4+
ut.d # unit-threaded
45

56
# Created by https://www.gitignore.io/api/d
67

.travis.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ d:
99
- ldc-beta
1010
- ldc
1111

12+
script:
13+
# Tests are neither random- nor parallelizable atm., so use a --single serial thread.
14+
- dub test --compiler=$DC -- --single --trace
15+
1216
addons:
1317
apt:
1418
packages:
@@ -19,8 +23,9 @@ matrix:
1923
- d: dmd-2.077.1 # the deployment compiler
2024
env: COVERAGE=true
2125
script:
22-
# https://issues.dlang.org/show_bug.cgi?id=13742
23-
- dub test --compiler=$DC --build=unittest-cov --build-mode=singleFile
26+
# Use --build-mode=singleFile to workaround https://issues.dlang.org/show_bug.cgi?id=13742
27+
# Tests are neither random- nor parallelizable atm., so use a --single serial thread.
28+
- dub test --compiler=$DC --build=unittest-cov --build-mode=singleFile -- --single --trace
2429
after_success:
2530
- bash <(curl -s https://codecov.io/bash)
2631
allow_failures:

dub.sdl

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ copyright "Copyright © 2015, Martin Nowak"
44
authors "Martin Nowak"
55
dependency "vibe-d" version="~>0.8.0"
66
subConfiguration "vibe-d:core" "vibe-core"
7-
configuration "default" {
8-
versions "VibeCustomMain"
9-
targetType "executable"
7+
targetType "executable"
8+
9+
configuration "executable" {
1010
}
11+
1112
configuration "unittest" {
12-
versions "VibeCustomMain"
13-
sourcePaths "source" "test"
14-
importPaths "source" "test"
15-
stringImportPaths "views"
13+
dependency "unit-threaded" version="~>0.7.11"
14+
mainSourceFile "ut.d"
15+
preBuildCommands "dub run unit-threaded -c gen_ut_main -- -f ut.d"
16+
sourcePaths "source" "test"
17+
importPaths "source" "test"
1618
}

dub.selections.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"openssl": "1.1.6+1.0.1g",
1212
"stdx-allocator": "2.77.0",
1313
"taggedalgebraic": "0.10.8",
14+
"unit-threaded": "0.7.36",
1415
"vibe-core": "1.4.0-alpha.1",
1516
"vibe-d": "0.8.3-alpha.1"
1617
}

0 commit comments

Comments
 (0)