mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-31 00:24:13 +00:00
Respond to review
- Use the subunitv2-file reporter to allow for nicer error handling - Undo the depgraph.sh change, see if it really matters - Rename passing -> ratchet-passing to distinguish from ported modules tracker - Misc. documentation and ratchet.sh improvements
This commit is contained in:
parent
e2d6b353e8
commit
3f887f9279
1
.gitignore
vendored
1
.gitignore
vendored
@ -46,6 +46,7 @@ zope.interface-*.egg
|
||||
/.hypothesis/
|
||||
/eliot.log
|
||||
/misc/python3/results.xml
|
||||
/misc/python3/results.subunit2
|
||||
|
||||
# This is the plaintext of the private environment needed for some CircleCI
|
||||
# operations. It's never supposed to be checked in.
|
||||
|
@ -10,7 +10,7 @@ cd tahoe-depgraph
|
||||
# Generate the maybe-changed data.
|
||||
python "${TAHOE}"/misc/python3/tahoe-depgraph.py "${TAHOE}"
|
||||
|
||||
if git diff-index --quiet HEAD tahoe-deps.json tahoe-ported.json; then
|
||||
if git diff-index --quiet HEAD; then
|
||||
echo "Declining to commit without any changes."
|
||||
exit 0
|
||||
fi
|
||||
|
@ -26,9 +26,6 @@ The exit codes are:
|
||||
1 - changes observed, whether welcome or unwelcome
|
||||
2 - invocation error
|
||||
|
||||
Be sure to call as `./ratchet.py` and not `python ratchet.py` if you want to
|
||||
see our exit code instead of Python's.
|
||||
|
||||
If <junitxml file path> does not exist, you'll get a FileNotFoundError:
|
||||
|
||||
>>> _test('up', None, None) # doctest: +ELLIPSIS
|
||||
@ -231,6 +228,7 @@ def main(direction, junitxml_path, tracking_path):
|
||||
results = JUnitXMLFile(junitxml_path).parse()
|
||||
|
||||
if tracking_path == '...':
|
||||
# Shortcut to aid in debugging XML parsing issues.
|
||||
results.report()
|
||||
return
|
||||
|
||||
|
@ -1,10 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
base="$(dirname $0)"
|
||||
tracking="passing"
|
||||
set -euxo pipefail
|
||||
tracking_filename="ratchet-passing"
|
||||
|
||||
# trial outputs some things that are only git-ignored in the root, so don't cd quite yet ...
|
||||
# Start somewhere predictable.
|
||||
cd "$(dirname $0)"
|
||||
base=$(pwd)
|
||||
|
||||
# Actually, though, trial outputs some things that are only gitignored in the project root.
|
||||
cd "../.."
|
||||
|
||||
# Since both of the next calls are expected to exit non-0, relax our guard.
|
||||
set +e
|
||||
trial --reporter subunitv2 allmydata | subunit2junitxml > "$base/results.xml"
|
||||
SUBUNITREPORTER_OUTPUT_PATH="$base/results.subunit2" trial --reporter subunitv2-file allmydata
|
||||
subunit2junitxml < "$base/results.subunit2" > "$base/results.xml"
|
||||
set -e
|
||||
|
||||
# Okay, now we're clear.
|
||||
@ -13,11 +21,9 @@ cd "$base"
|
||||
# Make sure ratchet.py itself is clean.
|
||||
python3 -m doctest ratchet.py
|
||||
|
||||
# Now see about Tahoe-LAFS ...
|
||||
# Now see about Tahoe-LAFS (also expected to fail) ...
|
||||
set +e
|
||||
# P.S. Don't invoke as `python ratchet.py ...` because then Python swallows the
|
||||
# exit code.
|
||||
./ratchet.py up results.xml "$tracking"
|
||||
python3 ratchet.py up results.xml "$tracking_filename"
|
||||
code=$?
|
||||
set -e
|
||||
|
||||
@ -26,6 +32,6 @@ set -e
|
||||
if [ $TERM = 'dumb' ]; then
|
||||
export TERM=ansi
|
||||
fi
|
||||
git diff "$tracking"
|
||||
git diff "$tracking_filename"
|
||||
|
||||
exit $code
|
||||
|
1
setup.py
1
setup.py
@ -142,6 +142,7 @@ tor_requires = [
|
||||
|
||||
i2p_requires = [
|
||||
# txi2p has Python 3 support, but it's unreleased: https://github.com/str4d/txi2p/issues/10.
|
||||
# URL lookups are in PEP-508 (via https://stackoverflow.com/a/54794506).
|
||||
# Also see the comment in tor_requires.
|
||||
"txi2p @ git+https://github.com/str4d/txi2p@0611b9a86172cb70d2f5e415a88eee9f230590b3#egg=txi2p",
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user