[build2] publishing packages with external tests

Boris Kolpackov boris at codesynthesis.com
Thu Mar 19 14:25:54 UTC 2020

Markus Pawellek <markuspawellek at gmail.com> writes:

> If there will be new dependencies, I will try to add the respective
> stub packages when there is time.

Great, thanks!

> How is the CI environment of build2 currently dealing with
> dependencies which are stub packages?

It currently does not deal with this very well, so for now you
may want to exclude[1] packages with stubbed dependencies from
building (this will still allow those who are interested to build
the tests themselves).

> Is it possible to use more than one external package for tests?
> In this case, I could create another tests package for more
> complicated dependencies.

Sure, you can have as many as you like[2].

> I have pushed the tests package to cppget.org.

Thanks, it's now published: https://cppget.org/pxart

> Currently, my tests package lists the main package as an explicit
> dependency and is not excluded from the builds.
> According to the documentation, will this be a problem?

As described in [2], the canonical setup is for the tests packages
themselves to not have an explicit dependency on the primary package
(in a sense, the primary package has a special dependency on them).
They would also normally be excluded from any builds (since they are
built as part of the main package).

But I can see how this arrangement clashes with the above recommendation
to exclude tests with stubbed dependencies from the build since now the
only place this can be done is the package itself, but that would also
exclude it from the builds, which we don't want. Hm, let me meditate on
this and get back to you.

[1] https://build2.org/bpkg/doc/build2-package-manager-manual.xhtml#manifest-package-builds
[2] https://build2.org/bpkg/doc/build2-package-manager-manual.xhtml#manifest-package-tests-examples-benchmarks

More information about the users mailing list