The analysis is pretty brain dead.
https://github.com/dlang/dub/blob/master/source/dub/internal/utils.d#L611
Is it just me, or does this happen for someone else, too?
Init a fresh DUB project and create a file (e.g. `lib.d`) with
the following content:
```d
unittest {
string x = "module oh.dear.dub.what.are.you.doing;";
}
```
Then run `dub test`:
```
.dub/code/foo-test-librar
build test` or `dub build --test` for it.
What do you think?
As far as I remember someone else also requested the feature:
building a test build without executing it.
About the actual command I am not sure, maybe also `dub test
--build` could be an option.
Actually I add the configurations
On Saturday, 12 December 2020 at 12:18:47 UTC, Andre Pany wrote:
In any case you should have configurations in your dub json.
Thank you for your detailed reply and I am sure I can make it
work in the way you described.
But I don't think my use case is invalid and dub should improve
its
"dub" or "dub build", here you set
targetType library. The second configuration you name unittest,
you set targetType executable and you also have to set
attribute mainSourceFile. This configuration is used
automatically by command "dub test".
Kind regards
A
On Saturday, 12 December 2020 at 11:13:45 UTC, Tobias Pankrath
wrote:
Whenever I come back to some D, I seem to be stumbling over
dub. Somehow dub and I don't align:
$ dub init dubtest && cd dubtest
$ dub test
-> creates executable `dubtest` (saying Falling back to "
Whenever I come back to some D, I seem to be stumbling over dub.
Somehow dub and I don't align:
$ dub init dubtest && cd dubtest
$ dub test
-> creates executable `dubtest` (saying Falling back to "dub -b
unittest".)
$ touch source/lib.d
dub test
-> creates executa
On Wednesday, 17 June 2020 at 12:12:24 UTC, Per Nordlöw wrote:
On Tuesday, 16 June 2020 at 12:21:26 UTC, Per Nordlöw wrote:
when
dub test
doesn't?
I'm trying to reduce it through
dustmite phobos-next "dub test 2>&1 | grep -F
'_D6object10_xopEqualsFMxPvMxQeZb'"
On Tuesday, 16 June 2020 at 12:21:26 UTC, Per Nordlöw wrote:
when
dub test
doesn't?
I'm trying to reduce it through
dustmite phobos-next "dub test 2>&1 | grep -F
'_D6object10_xopEqualsFMxPvMxQeZb'"
Is this the best way to use dustmite in this case?
On Tuesday, 16 June 2020 at 12:21:26 UTC, Per Nordlöw wrote:
All the linker errors originate from zio.d but zio.d has its
unittests disabled so how come this fails to link?
zio.d is not the source of the problem. Something else is.
The common denominator seems to be that the builtins
Inside
https://github.com/nordlow/phobos-next/
doing
dub build --compiler=dmd --build=unittest
works but
dub test --compiler=dmd
fails as
Generating test runner configuration 'phobos-next-test-library'
for 'library' (library).
Performing "unittest" build using /u
On Thursday, 8 November 2018 at 15:01:04 UTC, duge wrote:
WTF, why i got a this modal messagebox when i trying `dub test
--build=unittest` ??
i just captured messagebox and using OCR, and that's it. here:
core.exceptionAssertError@source\dub\internal
WTF, why i got a this modal messagebox when i trying `dub test
--build=unittest` ??
i just captured messagebox and using OCR, and that's it. here:
core.exceptionAssertError@source\dub\internal\vibecompat\core\log.d(85):
Enforcement failed (No error
On Friday, 2 February 2018 at 09:00:38 UTC, carblue wrote:
On Friday, 2 February 2018 at 07:23:54 UTC, Joel wrote:
[snip]
Import module base from file ... source/jmisc/base.d by: import
jmisc.base;
and recommended read:
https://code.dlang.org/package-format?lang=json
Thanks carblue. I had
On Friday, 2 February 2018 at 07:23:54 UTC, Joel wrote:
When I try 'dub test' I get errors like 'Source file
'/Users/joelchristensen/jpro/dpro2/JMiscLib/source/jmisc/base.d' not found in any import path.'
Here's the dub.json file I'm using:
```
{
"name": "timelog&qu
When I try 'dub test' I get errors like 'Source file
'/Users/joelchristensen/jpro/dpro2/JMiscLib/source/jmisc/base.d'
not found in any import path.'
Here's the dub.json file I'm using:
```
{
"name": "timelog",
"targetType": "executable",
Hi,
I have some issues to find out how I can pass --DRT-covopt to dub
test.
I am pretty sure this should work, but dub doesn't like it:
dub test --coverage -- --DRT-covopt "dstpath:./cov"
...
Running .\cov-sample.exe dstpath:./cov
...
Is there s.th. I miss?
Kind regards
André
On 2017-08-31 08:41, Nicholas Wilson wrote:
My project is a library, but I also need to test it and unit tests won't
cut it (external hardware).
How do you set up the dub.json to build the library normally but when it
is invoked with `dub test` it runs a separate configuration that also
My project is a library, but I also need to test it and unit
tests won't cut it (external hardware).
How do you set up the dub.json to build the library normally but
when it is invoked with `dub test` it runs a separate
configuration that also includes files in the `source/test`
folder
On 2017-03-20 10:07, Russel Winder via Digitalmars-d-learn wrote:
And different behaviour with different build options, at least when
using dmd, but I think the same is true for ldc2:
|> dub test
No source files found in configuration 'library'. Falling back to "dub -b
unittest"
ifferent build options, at least when
using dmd, but I think the same is true for ldc2:
|> dub test
No source files found in configuration 'library'. Falling back to "dub -b
unittest".
Performing "unittest" build using dmd for x86_64.
approxgc ~master: building configuration &q
On Mon, 2017-03-20 at 00:58 -0700, Jonathan M Davis via Digitalmars-d-
learn wrote:
>
[…]
> I haven't spent the time to dig in and report it properly, but based
> on some
> of what I saw recently on a project I have, the module with main in
> it
> didn't have its tests run, as if dub's didn't
inimal Dub file for this project. Using Dub the program
> runs as expected. However when I run "dub test" it claims to be running
> "dub -b unittest" and then proceeds to run the program not the tests.
>
> In main.d I have:
>
> ... some most excellent D code …
&
I have a Meson build for a D program project with a single main.d file
that has some unit tests. Both executable and test executable are
created and work as expected.
I created a minimal Dub file for this project. Using Dub the program
runs as expected. However when I run "dub test"
(), and no unit tests.
When I run 'dub test', dub builds and runs the executable.
This is not really desirable. Is there a way to set up the
dub configuration file to disable running the test?
configuration "unittest" {
excludedSourceFiles "path/to/main.d"
}
Very nice, thank
On Monday, 18 April 2016 at 11:47:42 UTC, Dicebot wrote:
On Monday, 18 April 2016 at 04:25:25 UTC, Jon D wrote:
I have an dub config file specifying a targetType of
'executable'. There is only one file, the file containing
main(), and no unit tests.
When I run 'dub test', dub builds and runs
On Monday, 18 April 2016 at 04:25:25 UTC, Jon D wrote:
I have an dub config file specifying a targetType of
'executable'. There is only one file, the file containing
main(), and no unit tests.
When I run 'dub test', dub builds and runs the executable. This
is not really desirable
You can write it in code:
version(unittest)
static assert(false,"unit tests not supported");
test', dub builds and runs the executable.
This is not really desirable. Is there a way to set up the dub
configuration file to disable running the test?
Note: What I'd really like to do is run a custom shell command
when 'dub test' is done, I haven't seen anything suggesting
that's an option
On Monday, April 18, 2016 04:25:25 Jon D via Digitalmars-d-learn wrote:
> I have an dub config file specifying a targetType of
> 'executable'. There is only one file, the file containing main(),
> and no unit tests.
>
> When I run 'dub test', dub builds and runs
I have an dub config file specifying a targetType of
'executable'. There is only one file, the file containing main(),
and no unit tests.
When I run 'dub test', dub builds and runs the executable. This
is not really desirable. Is there a way to set up the dub
configuration file to disable
31 matches
Mail list logo