view tests/test-check-sdist.t @ 6862:203ca204abbf stable

tests: further relax the number of files check in test-check-sdist.t A previous patch bumped this number due to a different version of setuptools or distutils or some other package that we don't control, which made it pretty obvious that this check is not really practical. We need a better way to check that all needed files are present in the tarball. I have some ideas, but this patch can be applied without further waiting, and it'll already bring the benefit of not annoying developers or contributors while at the same time still keeping the test somewhat useful.
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 16 Sep 2024 17:22:23 +0400
parents a868f00e8915
children cdd1ffb88dd6
line wrap: on
line source

Enable obsolescence to avoid the warning issue when obsmarkers are found

  $ cat << EOF >> "$HGRCPATH"
  > [experimental]
  > evolution = all
  > EOF

  $ cd "$TESTDIR"/..

Archiving to a separate location to avoid hardlink mess when the repo is shared

#if test-repo

  $ . "$RUNTESTDIR/helpers-testrepo.sh"
  $ testrepohg archive "$TESTTMP"/hg-evolve
  $ cd "$TESTTMP"/hg-evolve

#endif

  $ "$PYTHON" setup.py check --metadata --restructuredtext

  $ "$PYTHON" setup.py sdist --dist-dir "$TESTTMP"/dist > /dev/null
  */dist.py:*: UserWarning: Unknown distribution option: 'python_requires' (glob) (?)
    warnings.warn(msg) (?)
  warning: no previously-included files found matching 'docs/tutorial/.netlify'
  warning: no previously-included files found matching '.gitlab-ci.yml'
  warning: no previously-included files found matching '.hg-format-source'
  warning: no previously-included files found matching 'Makefile'
  no previously-included directories found matching 'contrib'
  no previously-included directories found matching 'debian'
  no previously-included directories found matching '.gitlab'
  $ cd "$TESTTMP"/dist

  $ find hg?evolve-*.tar.gz -size +800000c
  hg?evolve-*.tar.gz (glob)

  $ tar -tzf hg?evolve-*.tar.gz | sed 's|^hg.evolve-[^/]*/||' | sort > files
  $ egrep '^tests/test-.*\.(t|py)$' files > test-files
  $ egrep -v '^tests/test-.*\.(t|py)$' files > other-files
  $ wc -l other-files
  ??? other-files (glob)
  $ wc -l test-files
  ??? test-files (glob)
  $ fgrep debian files
  tests/test-check-debian.t
  $ fgrep __init__.py files
  hgext3rd/__init__.py
  hgext3rd/evolve/__init__.py
  hgext3rd/evolve/thirdparty/__init__.py
  hgext3rd/topic/__init__.py
  $ fgrep common.sh files
  docs/tutorial/testlib/common.sh
  tests/testlib/common.sh
  $ fgrep README files
  README.rst
  docs/README
  docs/tutorial/README.rst
  hgext3rd/topic/README

  $ egrep '(gitlab|contrib|hack|format-source)' files
  [1]
  $ fgrep legacy.py files
  [1]
  $ fgrep netlify files
  [1]