Make wine-access more generic, not specifically cthulhu pathed.
This commit is contained in:
1 parent
417ee40dda
commit
ed8c8e2467
11 files changed
+58
-50
No files matched your search
@@ -83,7 +83,7 @@ with tempfile.TemporaryDirectory(prefix="wine-access-controller-") as temporary:
|
||||
str(source / "tests/controller_fixture.c"), "-lrpcrt4"], check=True)
|
||||
helper = None
|
||||
client = None
|
||||
helperCommand = [str(build / "cthulhu-wine-access.exe"), "--no-dialog-reader",
|
||||
helperCommand = [str(build / "wine-access.exe"), "--no-dialog-reader",
|
||||
*endpointArguments,
|
||||
*(["--reader", args.reader] if args.reader else [])]
|
||||
try:
|
||||
@@ -98,7 +98,7 @@ with tempfile.TemporaryDirectory(prefix="wine-access-controller-") as temporary:
|
||||
["--reader-interface"], ["--reader-interface", ""],
|
||||
["--reader-interface", "WineAccess"],
|
||||
["--reader-interface", "org.example.Bad-Interface"]):
|
||||
result = subprocess.run([str(build / "cthulhu-wine-access.exe"), *readerArgs],
|
||||
result = subprocess.run([str(build / "wine-access.exe"), *readerArgs],
|
||||
env=env, timeout=5)
|
||||
assert result.returncode == 1, "invalid endpoint argument was accepted"
|
||||
assert name_call("RequestName", busName) == 1
|
||||
|
||||
@@ -78,7 +78,7 @@ with tempfile.TemporaryDirectory(prefix="wine-event-stall-") as temporary:
|
||||
children = []
|
||||
try:
|
||||
subprocess.run(["wineboot", "-u"], env=env, check=True, timeout=45)
|
||||
helper = subprocess.Popen([str(build / "cthulhu-wine-access.exe"), "--no-controller",
|
||||
helper = subprocess.Popen([str(build / "wine-access.exe"), "--no-controller",
|
||||
"--reader", args.reader], env=env)
|
||||
children.append(helper)
|
||||
time.sleep(1)
|
||||
|
||||
@@ -115,7 +115,7 @@ with tempfile.TemporaryDirectory(prefix="wine-access-menus-") as temporary:
|
||||
while not ready.exists() and app.poll() is None and time.monotonic() < deadline:
|
||||
time.sleep(0.01)
|
||||
assert ready.exists(), "editor did not become ready before helper attachment"
|
||||
helper = subprocess.Popen([str(build / "cthulhu-wine-access.exe"), "--no-controller", *readerArguments], env=env)
|
||||
helper = subprocess.Popen([str(build / "wine-access.exe"), "--no-controller", *readerArguments], env=env)
|
||||
# Allow the helper to register its bridge before opening the fixture.
|
||||
deadline = time.monotonic() + 1
|
||||
while time.monotonic() < deadline:
|
||||
@@ -133,7 +133,7 @@ with tempfile.TemporaryDirectory(prefix="wine-access-menus-") as temporary:
|
||||
if args.restart_helper and not restarted and any(e[0].endswith(":text") for e in events):
|
||||
helper.terminate()
|
||||
helper.wait(timeout=5)
|
||||
helper = subprocess.Popen([str(build / "cthulhu-wine-access.exe"), "--no-controller", *readerArguments], env=env)
|
||||
helper = subprocess.Popen([str(build / "wine-access.exe"), "--no-controller", *readerArguments], env=env)
|
||||
restarted = True
|
||||
time.sleep(0.01)
|
||||
assert app.poll() == 0, "fixture failed or timed out"
|
||||
@@ -337,7 +337,7 @@ with tempfile.TemporaryDirectory(prefix="wine-access-menus-") as temporary:
|
||||
assert any(e[2] == "Return to control" and e[3] == "button" for e in events), "control focus missing"
|
||||
assert any(e[2] == "Application-owned accessibility" and e[3] == "client"
|
||||
for e in events), "marshaled application MSAA object unavailable"
|
||||
subprocess.run([str(build / "cthulhu-wine-access.exe"),
|
||||
subprocess.run([str(build / "wine-access.exe"),
|
||||
"--no-dialog-reader", "--no-controller"],
|
||||
env=env, check=True, timeout=5)
|
||||
print("PASS: native and nested menus, context menus, shortcuts, states, "
|
||||
|
||||
@@ -67,7 +67,7 @@ with tempfile.TemporaryDirectory(prefix="wine-access-notifications-") as tempora
|
||||
helper = app = None
|
||||
try:
|
||||
subprocess.run(["wineboot", "-u"], env=env, check=True, timeout=45)
|
||||
helper = subprocess.Popen([str(build / "cthulhu-wine-access.exe"), "--no-controller",
|
||||
helper = subprocess.Popen([str(build / "wine-access.exe"), "--no-controller",
|
||||
"--reader", args.reader], env=env)
|
||||
time.sleep(.5)
|
||||
app = subprocess.Popen(["wine", str(fixture),
|
||||
|
||||
@@ -83,7 +83,7 @@ with tempfile.TemporaryDirectory(prefix="wine-reader-stall-") as temporary:
|
||||
children = []
|
||||
try:
|
||||
subprocess.run(["wineboot", "-u"], env=env, check=True, timeout=45)
|
||||
helper = subprocess.Popen([str(build / "cthulhu-wine-access.exe"), "--no-controller"], env=env)
|
||||
helper = subprocess.Popen([str(build / "wine-access.exe"), "--no-controller"], env=env)
|
||||
children.append(helper)
|
||||
time.sleep(1)
|
||||
app = subprocess.Popen(["wine", str(fixture)], env=env)
|
||||
|
||||
@@ -94,7 +94,7 @@ with tempfile.TemporaryDirectory(prefix='wine-review-wire-') as temporary:
|
||||
return result[0]
|
||||
try:
|
||||
subprocess.run(['wineboot','-u'],env=env,check=True,timeout=45)
|
||||
helper = subprocess.Popen([str(build/'cthulhu-wine-access.exe'),'--no-controller',*readerArguments],env=env)
|
||||
helper = subprocess.Popen([str(build/'wine-access.exe'),'--no-controller',*readerArguments],env=env)
|
||||
app = subprocess.Popen(['wine',str(fixture)],env=env)
|
||||
pump_until(lambda: any(f[4]=='Wine review fixture' for f in focuses.values()),8)
|
||||
reply, elapsed = capture()
|
||||
@@ -187,7 +187,7 @@ with tempfile.TemporaryDirectory(prefix='wine-review-wire-') as temporary:
|
||||
helper.terminate(); helper.wait(timeout=3)
|
||||
subprocess.run(['wine',str(fixture),'--check-remote'],env=env,check=True,timeout=5)
|
||||
print('PASS: test_native_buffer_lifetime_after_helper_stop')
|
||||
helper=subprocess.Popen([str(build/'cthulhu-wine-access.exe'),'--no-controller',*readerArguments],env=env)
|
||||
helper=subprocess.Popen([str(build/'wine-access.exe'),'--no-controller',*readerArguments],env=env)
|
||||
pump_until(lambda:any(s != sender and f[4]=='Wine review fixture' for s,f in focuses.items()),5)
|
||||
focuses.pop(sender,None)
|
||||
configure(7)
|
||||
@@ -215,7 +215,7 @@ with tempfile.TemporaryDirectory(prefix='wine-review-wire-') as temporary:
|
||||
connection.unregister_object(registration)
|
||||
registration = connection.register_object(path,Gio.DBusNodeInfo.new_for_xml(interface_xml(False)).interfaces[0],record,None,None)
|
||||
events.clear()
|
||||
helper = subprocess.Popen([str(build/'cthulhu-wine-access.exe'),'--no-controller',*readerArguments],env=env)
|
||||
helper = subprocess.Popen([str(build/'wine-access.exe'),'--no-controller',*readerArguments],env=env)
|
||||
end=time.monotonic()+1
|
||||
while time.monotonic()<end:
|
||||
while GLib.MainContext.default().iteration(False): pass
|
||||
|
||||
Reference in new issue
Block a user