annotate tests/test-check-sdist.t @ 6935:954d7ea5cd67 stable tip

stack: when stack base is obsolete, pick any successor, even if at random There are situations when s0 is obsolete and we also cannot pick just one successor for it to use in stack. In such a case, let's pick the "latest" successor from the first set. We're assuming that obsutil.successorssets() returns data in the same order (it should, since it makes sure to sort data internally). Keeping that in mind, while the successor picked for s0 by this code is not based on any sort of sophisticated logic, it should nonetheless be the same every time. This patch is probably not going to completely break anything that was previously working fine, because the previous behavior was to just abort with an exception.
author Anton Shestakov <av6@dwimlabs.net>
date Sat, 16 Nov 2024 17:01:02 +0400
parents dd518437d4e0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5772
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
1 Enable obsolescence to avoid the warning issue when obsmarkers are found
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
2
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
3 $ cat << EOF >> "$HGRCPATH"
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
4 > [experimental]
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
5 > evolution = all
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
6 > EOF
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
7
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
8 $ cd "$TESTDIR"/..
5799
fe9f9e528a42 tests: make test-check-sdist.t less flaky by first archiving the repo
Anton Shestakov <av6@dwimlabs.net>
parents: 5784
diff changeset
9
fe9f9e528a42 tests: make test-check-sdist.t less flaky by first archiving the repo
Anton Shestakov <av6@dwimlabs.net>
parents: 5784
diff changeset
10 Archiving to a separate location to avoid hardlink mess when the repo is shared
fe9f9e528a42 tests: make test-check-sdist.t less flaky by first archiving the repo
Anton Shestakov <av6@dwimlabs.net>
parents: 5784
diff changeset
11
fe9f9e528a42 tests: make test-check-sdist.t less flaky by first archiving the repo
Anton Shestakov <av6@dwimlabs.net>
parents: 5784
diff changeset
12 #if test-repo
fe9f9e528a42 tests: make test-check-sdist.t less flaky by first archiving the repo
Anton Shestakov <av6@dwimlabs.net>
parents: 5784
diff changeset
13
6852
374f1c5995dd tests: use testrepohg in test-check-sdist.t
Anton Shestakov <av6@dwimlabs.net>
parents: 6558
diff changeset
14 $ . "$RUNTESTDIR/helpers-testrepo.sh"
374f1c5995dd tests: use testrepohg in test-check-sdist.t
Anton Shestakov <av6@dwimlabs.net>
parents: 6558
diff changeset
15 $ testrepohg archive "$TESTTMP"/hg-evolve
5799
fe9f9e528a42 tests: make test-check-sdist.t less flaky by first archiving the repo
Anton Shestakov <av6@dwimlabs.net>
parents: 5784
diff changeset
16 $ cd "$TESTTMP"/hg-evolve
fe9f9e528a42 tests: make test-check-sdist.t less flaky by first archiving the repo
Anton Shestakov <av6@dwimlabs.net>
parents: 5784
diff changeset
17
fe9f9e528a42 tests: make test-check-sdist.t less flaky by first archiving the repo
Anton Shestakov <av6@dwimlabs.net>
parents: 5784
diff changeset
18 #endif
fe9f9e528a42 tests: make test-check-sdist.t less flaky by first archiving the repo
Anton Shestakov <av6@dwimlabs.net>
parents: 5784
diff changeset
19
6860
416adeb7d418 tests: check metadata and long description using `setup.py check`
Anton Shestakov <av6@dwimlabs.net>
parents: 6859
diff changeset
20 $ "$PYTHON" setup.py check --metadata --restructuredtext
416adeb7d418 tests: check metadata and long description using `setup.py check`
Anton Shestakov <av6@dwimlabs.net>
parents: 6859
diff changeset
21
5772
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
22 $ "$PYTHON" setup.py sdist --dist-dir "$TESTTMP"/dist > /dev/null
6859
e57c9da94b25 tests: make UserWarning about python_requires in test-check-sdist.t optional
Anton Shestakov <av6@dwimlabs.net>
parents: 6858
diff changeset
23 */dist.py:*: UserWarning: Unknown distribution option: 'python_requires' (glob) (?)
e57c9da94b25 tests: make UserWarning about python_requires in test-check-sdist.t optional
Anton Shestakov <av6@dwimlabs.net>
parents: 6858
diff changeset
24 warnings.warn(msg) (?)
5772
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
25 warning: no previously-included files found matching 'docs/tutorial/.netlify'
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
26 warning: no previously-included files found matching '.gitlab-ci.yml'
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
27 warning: no previously-included files found matching '.hg-format-source'
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
28 warning: no previously-included files found matching 'Makefile'
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
29 no previously-included directories found matching 'contrib'
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
30 no previously-included directories found matching 'debian'
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
31 no previously-included directories found matching '.gitlab'
6934
dd518437d4e0 tests: introduce a compat-branches blacklist file
Anton Shestakov <av6@dwimlabs.net>
parents: 6892
diff changeset
32 no previously-included directories found matching 'tests/blacklists'
5772
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
33 $ cd "$TESTTMP"/dist
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
34
6858
37844623df8c tests: accommodate both "hg-evolve" and "hg_evolve" in tarballs
Anton Shestakov <av6@dwimlabs.net>
parents: 6857
diff changeset
35 $ find hg?evolve-*.tar.gz -size +800000c
37844623df8c tests: accommodate both "hg-evolve" and "hg_evolve" in tarballs
Anton Shestakov <av6@dwimlabs.net>
parents: 6857
diff changeset
36 hg?evolve-*.tar.gz (glob)
5772
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
37
6891
2cb062b8050c tests: don't put file lists inside dist/ directory
Anton Shestakov <av6@dwimlabs.net>
parents: 6868
diff changeset
38 $ tar -tzf hg?evolve-*.tar.gz | sed 's|^hg.evolve-[^/]*/||' | sort > ../files
2cb062b8050c tests: don't put file lists inside dist/ directory
Anton Shestakov <av6@dwimlabs.net>
parents: 6868
diff changeset
39 $ grep -E '^tests/test-.*\.(t|py)$' ../files > ../test-files
2cb062b8050c tests: don't put file lists inside dist/ directory
Anton Shestakov <av6@dwimlabs.net>
parents: 6868
diff changeset
40 $ grep -E -v '^tests/test-.*\.(t|py)$' ../files > ../other-files
2cb062b8050c tests: don't put file lists inside dist/ directory
Anton Shestakov <av6@dwimlabs.net>
parents: 6868
diff changeset
41 $ wc -l ../other-files
2cb062b8050c tests: don't put file lists inside dist/ directory
Anton Shestakov <av6@dwimlabs.net>
parents: 6868
diff changeset
42 ??? ../other-files (glob)
2cb062b8050c tests: don't put file lists inside dist/ directory
Anton Shestakov <av6@dwimlabs.net>
parents: 6868
diff changeset
43 $ wc -l ../test-files
2cb062b8050c tests: don't put file lists inside dist/ directory
Anton Shestakov <av6@dwimlabs.net>
parents: 6868
diff changeset
44 ??? ../test-files (glob)
2cb062b8050c tests: don't put file lists inside dist/ directory
Anton Shestakov <av6@dwimlabs.net>
parents: 6868
diff changeset
45 $ grep -F debian ../files
5772
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
46 tests/test-check-debian.t
6891
2cb062b8050c tests: don't put file lists inside dist/ directory
Anton Shestakov <av6@dwimlabs.net>
parents: 6868
diff changeset
47 $ grep -F __init__.py ../files
5772
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
48 hgext3rd/__init__.py
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
49 hgext3rd/evolve/__init__.py
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
50 hgext3rd/evolve/thirdparty/__init__.py
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
51 hgext3rd/topic/__init__.py
6891
2cb062b8050c tests: don't put file lists inside dist/ directory
Anton Shestakov <av6@dwimlabs.net>
parents: 6868
diff changeset
52 $ grep -F common.sh ../files
5772
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
53 docs/tutorial/testlib/common.sh
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
54 tests/testlib/common.sh
6891
2cb062b8050c tests: don't put file lists inside dist/ directory
Anton Shestakov <av6@dwimlabs.net>
parents: 6868
diff changeset
55 $ grep -F README ../files
5772
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
56 README.rst
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
57 docs/README
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
58 docs/tutorial/README.rst
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
59 hgext3rd/topic/README
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
60
6891
2cb062b8050c tests: don't put file lists inside dist/ directory
Anton Shestakov <av6@dwimlabs.net>
parents: 6868
diff changeset
61 $ grep -E '(gitlab|contrib|hack|format-source)' ../files
5772
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
62 [1]
6891
2cb062b8050c tests: don't put file lists inside dist/ directory
Anton Shestakov <av6@dwimlabs.net>
parents: 6868
diff changeset
63 $ grep -F legacy.py ../files
5772
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
64 [1]
6891
2cb062b8050c tests: don't put file lists inside dist/ directory
Anton Shestakov <av6@dwimlabs.net>
parents: 6868
diff changeset
65 $ grep -F netlify ../files
5772
da01b9062cfb tests: add test-check-sdist.t to check setup.py sdist results
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
66 [1]
6892
090834ff8209 tests: add `twine check` to test-check-sdist.t
Anton Shestakov <av6@dwimlabs.net>
parents: 6891
diff changeset
67
090834ff8209 tests: add `twine check` to test-check-sdist.t
Anton Shestakov <av6@dwimlabs.net>
parents: 6891
diff changeset
68 #if twine
090834ff8209 tests: add `twine check` to test-check-sdist.t
Anton Shestakov <av6@dwimlabs.net>
parents: 6891
diff changeset
69 $ twine --no-color check *
090834ff8209 tests: add `twine check` to test-check-sdist.t
Anton Shestakov <av6@dwimlabs.net>
parents: 6891
diff changeset
70 Checking hg?evolve-*.tar.gz: PASSED (glob)
090834ff8209 tests: add `twine check` to test-check-sdist.t
Anton Shestakov <av6@dwimlabs.net>
parents: 6891
diff changeset
71 #endif