dist: Add --no-tests option

It is not always needed to test generated tarballs, for example when
they are generated by CI that already does its own testing.
pull/6868/head
Xavier Claessens 5 years ago committed by Jussi Pakkanen
parent 7195c0ee9c
commit 8603c3b445
  1. 5
      docs/markdown/snippets/dist_not_tests.md
  2. 8
      mesonbuild/mdist.py

@ -0,0 +1,5 @@
## meson dist --no-tests
`meson dist` has a new option `--no-tests` to skip build and tests of generated
packages. It can be used to not waste time for example when done in CI that
already does its own testing.

@ -39,6 +39,8 @@ def add_arguments(parser):
help='Comma separated list of archive types to create.')
parser.add_argument('--include-subprojects', action='store_true',
help='Include source code of subprojects that have been used for the build.')
parser.add_argument('--no-tests', action='store_true',
help='Do not build and test generated packages.')
def create_hash(fname):
@ -272,8 +274,10 @@ def run(options):
return 1
if names is None:
return 1
# Check only one.
rc = check_dist(names[0], meson_command, extra_meson_args, bld_root, priv_dir)
rc = 0
if not options.no_tests:
# Check only one.
rc = check_dist(names[0], meson_command, extra_meson_args, bld_root, priv_dir)
if rc == 0:
for name in names:
create_hash(name)

Loading…
Cancel
Save