Skip to content

Commit 48b0193

Browse files
committed
run library tests in integration test applications. Update README to
reflect how the tests can be run.
1 parent a148f58 commit 48b0193

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ Developers - How to run the test suite
139139
--------------------------------------
140140

141141
Unittests that do not require an actual server are located in the library
142-
codebase. At the moment, there is no mechanism for running just these tests
143-
(this will likely change in the future).
142+
codebase. You can run just these tests using `dub test`.
144143

145144
Unittests that require a working server are all located in the
146145
[integration-tests](integration-tests) subpackage. Due to a [dub
@@ -155,6 +154,7 @@ issuing the commands:
155154
dub run :integration-tests-phobos
156155
dub run :integration-tests-vibe
157156
```
157+
This will also run the library tests as well as the integration tests.
158158

159159
The first time you run an integration test, the file `testConnectionStr.txt`
160160
will be created in your current directory

dub.sdl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,10 @@ subPackage "./integration-tests"
1212
subPackage "./integration-tests-vibe"
1313
subPackage "./integration-tests-phobos"
1414
subPackage "./testconn"
15+
16+
configuration "library" {
17+
}
18+
configuration "unittest" {
19+
buildOptions "unittests" "debugInfo" "debugMode"
20+
debugVersions "MYSQLN_TESTS"
21+
}

integration-tests/dub.sdl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ copyright "Copyright (c) 2011-2021 Steve Teale, James W. Oliphant, Simen Endsj
55
authors "Steve Teale" "James W. Oliphant" "Simen Endsjø" "Sönke Ludwig" "Sergey Shamov" "Nick Sabalausky" "Steven Schveighoffer"
66

77
dependency "mysql-native" path="../"
8+
subConfiguration "mysql-native" "unittest"
89
dependency "unit-threaded" version="~>1.0.15"
910
debugVersions "MYSQLN_TESTS"
1011
versions "unitUnthreaded"

integration-tests/source/app.d

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import mysql.test.common;
22
import mysql.test.integration;
33
import mysql.test.regression;
44
import mysql.maintests;
5+
import mysql.protocol.packet_helpers;
6+
import mysql.connection;
7+
import mysql.escape;
58

69
import unit_threaded;
710

@@ -12,6 +15,9 @@ int main(string[] args)
1215
"mysql.maintests",
1316
"mysql.test.common",
1417
"mysql.test.integration",
15-
"mysql.test.regression"
18+
"mysql.test.regression",
19+
"mysql.protocol.packet_helpers",
20+
"mysql.connection",
21+
"mysql.escape"
1622
);
1723
}

0 commit comments

Comments
 (0)