Skip to content

Commit 36c6e30

Browse files
committed
Run tests on Vibe sockets, too.
1 parent dfdcd64 commit 36c6e30

File tree

5 files changed

+40
-8
lines changed

5 files changed

+40
-8
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*.dll
55
*.exe
66
.dub
7-
/dub.selections.json
87
/bin
98
/testConnectionStr.txt
109

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ before_script:
77
- echo 'host=127.0.0.1;port=3306;user=root;pwd=;db=mysqln_testdb' > testConnectionStr.txt
88

99
install: ./travis-install-deps.sh
10-
script: ./run-phobos-tests
1110

1211
matrix:
1312
include:

dub.sdl

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ license "BSL-1.0"
44
copyright "Copyright (c) 2011 Steve Teale"
55
authors "Steve Teale" "James W. Oliphant" "simendsjo" "Sönke Ludwig" "sshamov" "Nick Sabalausky"
66

7-
dependency "vibe-d:core" version="~>0.7.28" optional=true
7+
dependency "vibe-d:core" version="~>0.7.29" optional=true
88

99
sourcePaths "source/"
1010
importPaths "source/"
@@ -18,3 +18,25 @@ configuration "library" {
1818
targetType "library"
1919
excludedSourceFiles "source/app.d"
2020
}
21+
22+
configuration "unittest" {
23+
targetType "executable"
24+
targetPath "bin/"
25+
targetName "mysqln-tests-vibe"
26+
excludedSourceFiles "source/app.d"
27+
28+
preBuildCommands \
29+
"run-phobos-tests" \
30+
"echo Performing Vibe-socket tests..." \
31+
platform="windows"
32+
33+
preBuildCommands \
34+
"./run-phobos-tests" \
35+
"echo Performing Vibe-socket tests..." \
36+
platform="posix"
37+
38+
dependency "vibe-d:core" version="~>0.7.29" optional=false
39+
40+
mainSourceFile "source/mysql/connection.d"
41+
debugVersions "MYSQL_INTEGRATION_TESTS"
42+
}

dub.selections.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"fileVersion": 1,
3+
"versions": {
4+
"libasync": "0.7.9",
5+
"libev": "5.0.0+4.04",
6+
"libevent": "2.0.1+2.0.16",
7+
"memutils": "0.4.7",
8+
"openssl": "1.1.4+1.0.1g",
9+
"vibe-d": "0.7.29"
10+
}
11+
}

source/mysql/package.d

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@
6161
*
6262
* Developers - How to run the test suite:
6363
*
64-
* This package contains various unittests and integration tests. To run them
65-
* using phobos sockets, run 'run-phobos-tests'.
64+
* This package contains various unittests and integration tests. To run them,
65+
* run 'dub test'.
6666
*
67-
* The first time you run 'run-phobos-tests', it will automatically create a
67+
* The first time you run 'dub test', it will automatically create a
6868
* file 'testConnectionStr.txt' in project's base diretory and then exit.
6969
* This file is deliberately not contained in the source repository
7070
* because it's specific to your system.
@@ -77,8 +77,9 @@
7777
* but they will ONLY modify that one db schema. No other schema will be
7878
* modified in any way.
7979
*
80-
* After you've configured the connection string, run 'run-phobos-tests' again
81-
* and their tests will be run.
80+
* After you've configured the connection string, run 'dub test' again
81+
* and their tests will be compiled and run, first using Phobos sockets,
82+
* then using Vibe sockets.
8283
*
8384
* Copyright: Copyright 2011
8485
* License: $(LINK www.boost.org/LICENSE_1_0.txt, Boost License 1.0).

0 commit comments

Comments
 (0)