Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
*.a
*.o
.dub/
test/*/.dub/
test/integration/*/.dub/
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
run: |
dub build --compiler=${{ env.DC }}
if [[ ${{ matrix.do_test }} == 'true' ]]; then
dub run --compiler=${{ env.DC }} --single test/issue2051_running_unittests_from_dub_single_file_packages_fails.d
dub run --compiler=${{ env.DC }} --single test/integration/issue2051_running_unittests_from_dub_single_file_packages_fails.d
./scripts/ci/ci.sh
fi

Expand All @@ -127,19 +127,19 @@ jobs:
dub build --compiler=${{ env.DC }}
if [[ ${{ matrix.do_test }} == 'true' ]]; then
dub test --compiler=${{ env.DC }}
dub run --compiler=${{ env.DC }} --single test/issue2051_running_unittests_from_dub_single_file_packages_fails.d
dub --single test/run-unittest.d
dub run --compiler=${{ env.DC }} --single test/integration/issue2051_running_unittests_from_dub_single_file_packages_fails.d
dub --single test/integration/run-test.d

# FIXME: DMD fails a few tests on Windows; remove them for now
if [[ '${{ matrix.dc }}' = dmd* ]]; then
# DLL support is lacking
rm -rf test/{1-dynLib-simple,2-dynLib-dep,2-dynLib-with-staticLib-dep}
rm -rf test/integration/{1-dynLib-simple,2-dynLib-dep,2-dynLib-with-staticLib-dep}
# Unicode in paths too
rm -rf test/issue130-unicode-СНА*
rm -rf test/integration/issue130-unicode-СНА*
# ImportC probably requires set-up MSVC environment variables
rm -rf test/use-c-sources
rm -rf test/integration/use-c-sources
fi
test/run-unittest.sh
test/integration/run-test.sh
fi
shell: bash

Expand Down
28 changes: 14 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ __dummy.html
*.exe
*.lib
*.log
/test/*/*
/test/*.*
!/test/*.d
!/test/*.d.min_frontend
!/test/*.sh
!/test/*.sh.min_frontend
!/test/*/.no_*
!/test/*/.min_frontend
!/test/*/.fail_build
!/test/*/dub.json
!/test/*/dub.sdl
!/test/*/dub.settings.json
!/test/*/source/
!/test/*/src/
/test/integration/*/*
/test/integration/*.*
!/test/integration/*.d
!/test/integration/*.d.min_frontend
!/test/integration/*.sh
!/test/integration/*.sh.min_frontend
!/test/integration/*/.no_*
!/test/integration/*/.min_frontend
!/test/integration/*/.fail_build
!/test/integration/*/dub.json
!/test/integration/*/dub.sdl
!/test/integration/*/dub.settings.json
!/test/integration/*/source/
!/test/integration/*/src/

# Ignore coverage files
cov/
Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ RUN dub test --compiler=$DCBIN && dub build --compiler=$DCBIN
# Remove dub to avoid the risk of using the wrong binary
RUN apk del dub

# Used by the `run-unittest.sh` script
# Used by the `run-test.sh` script
ENV DUB=/root/build/bin/dub
ENV DC=$DCBIN

# Finally, just run the test-suite
WORKDIR /root/build/test/
ENTRYPOINT [ "/root/build/test/run-unittest.sh" ]
WORKDIR /root/build/test/integration/
ENTRYPOINT [ "/root/build/test/integration/run-test.sh" ]
5 changes: 5 additions & 0 deletions dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ configuration "application" {
//dflags "-fpreview=in" platform="gdc"
}

configuration "unittest" {
versions "DubUseCurl"
sourcePaths "source" "test/unit/"
}

configuration "library" {
targetType "library"
excludedSourceFiles "source/app.d"
Expand Down
4 changes: 2 additions & 2 deletions scripts/ci/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ else
dub test --compiler=${DC} -b unittest-cov
./build.d
fi
DUB=`pwd`/bin/dub DC=${DC} dub --single ./test/run-unittest.d
DUB=`pwd`/bin/dub DC=${DC} test/run-unittest.sh
DUB=`pwd`/bin/dub DC=${DC} dub --single ./test/integration/run-test.d
DUB=`pwd`/bin/dub DC=${DC} test/integration/run-test.sh
12 changes: 0 additions & 12 deletions test/dub-custom-root-2/source/app.d

This file was deleted.

10 changes: 0 additions & 10 deletions test/dub-custom-root/source/app.d

This file was deleted.

2 changes: 1 addition & 1 deletion test/.gitignore → test/integration/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ version-spec/**/foo

/test_registry
/issue_2051_running_unittests_from_dub_single_file_packages_fails
/run-unittest
/run-test

test.log
custom-source-main-bug487/custom-source-main-bug487
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"workingDirectory": ".",
"dependencies": {
"dub": {
"path": "../.."
"path": "../../../"
}
}
}
12 changes: 12 additions & 0 deletions test/integration/dub-custom-root-2/source/app.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import std.file;
import std.path;
import std.stdio;
import std.string;

void main()
{
// run me from test/integration/ with dub --root=dub-custom-root
string cwd = getcwd.chomp("/");
assert(cwd.endsWith("test/integration/dub-custom-root-2/source"), cwd);
writeln("ok");
}
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions test/integration/dub-custom-root/source/app.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import std.file;
import std.path;
import std.stdio;

void main()
{
// run me from test/integration/ with dub --root=test/integration/dub-custom-root
assert(getcwd.baseName == "integration", getcwd);
writeln("ok");
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!../bin/dub
#!../../bin/dub
/+ dub.sdl:
name "single-file-test"
+/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!../bin/dub
#!../../bin/dub
/+ dub.sdl:
name "single-file-test"
+/
Expand Down
Loading
Loading