Improved self-cleaning tests.
This commit is contained in:
1 parent
77db0b83ab
commit
e3de71e594
14 files changed
+487
-39
No files matched your search
@@ -8,11 +8,12 @@ import os
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import time
|
||||
|
||||
from gi.repository import Gio, GLib
|
||||
|
||||
from wine_test_environment import add_test_options, run_wine_test, wine_test_directory
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--build-dir", default="build")
|
||||
parser.add_argument("--32-bit", dest="is32Bit", action="store_true")
|
||||
@@ -21,15 +22,17 @@ parser.add_argument("--session", action="store_true")
|
||||
parser.add_argument("--getter", action="store_true")
|
||||
parser.add_argument("--background", action="store_true")
|
||||
parser.add_argument("--popup", action="store_true")
|
||||
add_test_options(parser)
|
||||
args = parser.parse_args()
|
||||
build = Path(args.build_dir).resolve()
|
||||
if not args.session:
|
||||
sys.exit(subprocess.call(["dbus-run-session", "--", sys.executable, __file__,
|
||||
sys.exit(run_wine_test(["dbus-run-session", "--", sys.executable, __file__,
|
||||
"--session", "--build-dir", str(build), "--reader", args.reader,
|
||||
*(["--32-bit"] if args.is32Bit else []),
|
||||
*(["--getter"] if args.getter else []),
|
||||
*(["--background"] if args.background else []),
|
||||
*(["--popup"] if args.popup else [])]))
|
||||
*(["--popup"] if args.popup else [])], build, "event_stall_integration",
|
||||
keep=args.keep, keepOnFailure=args.keepOnFailure))
|
||||
|
||||
interface = "org.gnome.Orca1.Service" if args.reader == "orca" else "org.stormux.Cthulhu1.Service"
|
||||
objectPath = "/" + interface.replace(".", "/")
|
||||
@@ -67,7 +70,7 @@ def pump_until(predicate, seconds):
|
||||
raise AssertionError(f"condition timed out; events: {events}")
|
||||
|
||||
|
||||
with tempfile.TemporaryDirectory(prefix="wine-event-stall-") as temporary:
|
||||
with wine_test_directory(prefix="wine-event-stall-") as temporary:
|
||||
root = Path(temporary)
|
||||
env = os.environ.copy()
|
||||
env.update(WINEPREFIX=str(root / "prefix"), WINEDEBUG="-all",
|
||||
|
||||
Reference in new issue
Block a user