allow running Tahoe correctly via other commands such as coverage #1303
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#1303
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Normally, the command to use coverage to obtain coverage information for another program such as Tahoe would be:
For example, with the fix to #1296, you could get branch coverage for the Tahoe test suite with
However, this does not work, for three reasons:
sys.argv
performed by coverage before it runsbin/tahoe
. This causes Tahoe to act as though the command line werebin/tahoe run --branch bin/tahoe debug trial
.bin/tahoe
, but coverage will only obtain coverage information for thebin/tahoe
script itself.coverage run --branch support/bin/tahoe debug trial
, we wouldn't be setting PYTHONPATH correctly.The attached patch makes, for example:
do the right thing. ("
@tahoe
" will be replaced by the full path to the support script.)It is more general than just running coverage; you can specify an arbitrary command. For example, to specify the python -3 option (warning about Python 3 incompatibilities):
(Again,
python -3 bin/tahoe <command>
would not work because it would run only thebin/tahoe
script with -3.)Between source:bin/tahoe-script.template and source:src/allmydata/windows/fixups.py, we actually end up having less code with this patch, because it uses a simpler way of deciding which suffix of the arguments to retain.
Attachment bin-tahoe-runner-support.darcs.patch (18501 bytes) added
Add support to bin/tahoe for invoking a runner command prefixed with @, with the Tahoe libraries on the PYTHONPATH. This is documented in 'tahoe debug --help'.
In changeset:93c1909847e9dc44:
Attachment bin-tahoe-runner-support.darcs.2.patch (21206 bytes) added
Add support to bin/tahoe for invoking a runner command prefixed with @, with the Tahoe libraries on the PYTHONPATH. This is documented in 'tahoe debug --help'.
I reviewed changeset:93c1909847e9dc44 and it looks good to me.
Oh whoops, I reviewed changeset:93c1909847e9dc44 but didn't realize I needed to review bin-tahoe-runner-support.darcs.2.patch as well before setting this from
review-needed
toreviewed
.Okay, bin-tahoe-runner-support.darcs.2.patch looks good to me!
David-Sarah is going to merge and push into trunk.
Applied in changeset:3798d9946e1f62cc.