Simplest way to just run std.socket unittest?
kinke
kinke at libero.it
Wed Nov 29 11:02:43 UTC 2017
On Wednesday, 29 November 2017 at 07:17:49 UTC, Thomas Mader
wrote:
> 1) What is the simplest way to just run the std.socket unittest?
Running `<build dir>/runtime/phobos2-test-runner[-debug]
std.socket` IIRC; that's what the 2 CTest tests boil down to.
> 2) I am also having the problem that on Mac OSX High Sierra the
> build of the second test isn't working because
> libdruntime-ldc.a has no architecture set. (also checked with
> lipo -info libdruntime-ldc.a)
We use LLVM for archiving. Since you're using an older LLVM
(4.0.1; LDC 1.4 btw is 'old' too, current version is 1.6), that
may have been fixed in LLVM 5.0.
You can also opt to use the Xcode archiver by including
`-DRT_ARCHIVE_WITH_LDC=OFF` in the CMake command line.
> 3) The other thing is that I don't know how to disable the
> build and tests for debug.
Don't know what you mean by `build for debug`; I guess you mean
the debug builds of druntime/Phobos. Those libs should be
included in each LDC package IMO, otherwise the `-link-debuglib`
switch doesn't work as expected.
If you only want to run the release tests, you can skip
dmd-testsuite-debug and the debug druntime/Phobos unittests via
`ctest -E "-debug"`, as they all have the `-debug` suffix.
For the make/ninja build command line, I recommend `make -j<N>
all druntime-test-runner phobos2-test-runner` in that case.
Similar and further tweaks can be found in our CI scripts, e.g.,
https://github.com/ldc-developers/ldc/blob/master/.travis.yml#L104-L116.
To get the CMake command line right, be sure to have a look at
the script we use for the official release packages:
https://github.com/ldc-developers/ldc-scripts/blob/master/ldc2-packaging/2-build-ldc.sh (LDC_INSTALL_LTOPLUGIN etc.).
More information about the digitalmars-d-ldc
mailing list