Skip to content

Commit 88dba54

Browse files
committed
Speed up full Phobos+Vibe testing by skipping redundant tests between both Phobos and Vibe builds. (Fix #184)
1 parent 2e389ac commit 88dba54

File tree

6 files changed

+38
-7
lines changed

6 files changed

+38
-7
lines changed

CHANGELOG.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
v2.3.0 - TBD
22
=====================
33

4-
- **Internal:** Rework travis config and scripts, including cleanup, testing
5-
on more versions of MariaDB server and support for per-job
6-
`dub.selections.json` overrides (needed for testing on DMD 2.079+).
4+
- **Internal:** Rework travis config and scripts, including:
5+
- General cleanup.
6+
- Testing on more versions of MariaDB server.
7+
- [#173](https://github.com/mysql-d/mysql-native/issues/173):
8+
Support for per-job `dub.selections.json` overrides (needed for testing on DMD 2.079+).
9+
- [#184](https://github.com/mysql-d/mysql-native/issues/184):
10+
Speed up full Phobos+Vibe testing by skipping redundant tests between
11+
both Phobos and Vibe builds.
712

813
v2.2.2 - 2018-05-03
914
=====================

run-core-phobos-tests

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
3+
. ./find-rdmd.sh
4+
5+
echo Using:
6+
echo " RDMD=$RDMD"
7+
echo " DMD=$DMD"
8+
9+
# GDC doesn't autocreate the dir (and git doesn't beleive in empty dirs)
10+
mkdir -p bin
11+
12+
echo 'Compiling Phobos-socket tests (core tests only)...'
13+
$RDMD --compiler=$DMD --build-only -g -unittest -debug=MYSQLN_CORE_TESTS -ofbin/mysqln-tests-phobos -Isource source/mysql/package.d && echo 'Running Phobos-socket tests (core tests only)...' && bin/mysqln-tests-phobos

run-tests

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
#!/bin/sh
2-
echo Doing Phobos-socket tests... && ./run-phobos-tests && echo Doing Vibe-socket tests... && ./run-vibe-tests
2+
echo Doing Phobos and Vibe socket tests...
3+
echo 'Doing Phobos-socket tests (core tests only)...' && ./run-core-phobos-tests && echo Doing Vibe-socket tests... && ./run-vibe-tests

source/mysql/package.d

+4-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ public import mysql.protocol.constants : SvrCapFlags;
7676
public import mysql.result;
7777
public import mysql.types;
7878

79-
debug(MYSQLN_TESTS)
79+
debug(MYSQLN_TESTS) version = DoCoreTests;
80+
debug(MYSQLN_CORE_TESTS) version = DoCoreTests;
81+
82+
version(DoCoreTests)
8083
{
8184
public import mysql.protocol.comms;
8285
public import mysql.protocol.constants;

source/mysql/test/common.d

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ To enable these tests, you have to add the MYSQLN_TESTS
3030
debug specifier. The reason it uses debug and not version is because dub
3131
doesn't allow adding version specifiers on the command-line.
3232
+/
33-
debug(MYSQLN_TESTS)
33+
debug(MYSQLN_TESTS) version = DoCoreTests;
34+
debug(MYSQLN_CORE_TESTS) version = DoCoreTests;
35+
36+
version(DoCoreTests)
3437
{
3538
public import std.stdio;
3639
import std.conv;

source/mysql/test/integration.d

+7-1
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,16 @@ import mysql.test.common;
2626

2727
alias indexOf = std.string.indexOf; // Needed on DMD 2.064.2
2828

29+
debug(MYSQLN_TESTS) version = DoCoreTests;
30+
debug(MYSQLN_CORE_TESTS) version = DoCoreTests;
31+
2932
@("connect")
30-
debug(MYSQLN_TESTS)
33+
version(DoCoreTests)
3134
unittest
3235
{
36+
import std.stdio;
37+
writeln("Basic connect test...");
38+
3339
// Test connect/disconnect
3440
mixin(scopedCn);
3541
}

0 commit comments

Comments
 (0)