mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-24 15:16:41 +00:00
make check_magicfolder_smoke easier to run, cross-platform
This commit is contained in:
parent
1b72683741
commit
db40417886
@ -44,18 +44,15 @@ is_windows = (sys.platform == 'win32')
|
|||||||
tahoe_base = abspath(curdir)
|
tahoe_base = abspath(curdir)
|
||||||
data_base = join(tahoe_base, 'smoke_magicfolder')
|
data_base = join(tahoe_base, 'smoke_magicfolder')
|
||||||
if is_windows:
|
if is_windows:
|
||||||
tahoe_bin = join(tahoe_base, 'venv', 'Scripts', 'tahoe.exe')
|
tahoe_bin = 'tahoe.exe'
|
||||||
else:
|
else:
|
||||||
tahoe_bin = join(tahoe_base, 'bin', 'tahoe')
|
tahoe_bin = 'tahoe'
|
||||||
python = sys.executable
|
python = sys.executable
|
||||||
|
|
||||||
if not exists(data_base):
|
if not exists(data_base):
|
||||||
print("Creating", data_base)
|
print("Creating", data_base)
|
||||||
mkdir(data_base)
|
mkdir(data_base)
|
||||||
|
|
||||||
if not exists(tahoe_bin):
|
|
||||||
raise RuntimeError("Can't find 'tahoe' binary at %r" % (tahoe_bin,))
|
|
||||||
|
|
||||||
if 'kill' in sys.argv:
|
if 'kill' in sys.argv:
|
||||||
print("Killing the grid")
|
print("Killing the grid")
|
||||||
for d in listdir(data_base):
|
for d in listdir(data_base):
|
||||||
@ -260,8 +257,11 @@ if do_invites:
|
|||||||
|
|
||||||
if True:
|
if True:
|
||||||
for name in ['alice', 'bob']:
|
for name in ['alice', 'bob']:
|
||||||
|
try:
|
||||||
with open(join(data_base, name, 'private', 'magic_folder_dircap'), 'r') as f:
|
with open(join(data_base, name, 'private', 'magic_folder_dircap'), 'r') as f:
|
||||||
print("dircap %s: %s" % (name, f.read().strip()))
|
print("dircap %s: %s" % (name, f.read().strip()))
|
||||||
|
except Exception:
|
||||||
|
print("can't find/open %s" % (name,))
|
||||||
|
|
||||||
# give storage nodes a chance to connect properly? I'm not entirely
|
# give storage nodes a chance to connect properly? I'm not entirely
|
||||||
# sure what's up here, but I get "UnrecoverableFileError" on the
|
# sure what's up here, but I get "UnrecoverableFileError" on the
|
||||||
|
Loading…
Reference in New Issue
Block a user