mirror of
https://github.com/LTTLabsOSS/markbench-tests.git
synced 2026-01-09 22:18:00 -05:00
small fixes
This commit is contained in:
@@ -18,7 +18,7 @@ from harness_utils.output import (
|
||||
DEFAULT_LOGGING_FORMAT,
|
||||
DEFAULT_DATE_FORMAT)
|
||||
from harness_utils.process import terminate_processes
|
||||
from harness_utils.keras_service import KerasService
|
||||
from harness_utils.keras_service import KerasService, ScreenShotDivideMethod, ScreenShotQuadrant, ScreenSplitConfig
|
||||
from harness_utils.steam import exec_steam_game
|
||||
from harness_utils.artifacts import ArtifactManager, ArtifactType
|
||||
|
||||
@@ -48,23 +48,31 @@ def start_game():
|
||||
|
||||
def run_benchmark():
|
||||
"""Start game via Steam and enter fullscreen mode"""
|
||||
setup_start_time = time.time()
|
||||
start_game()
|
||||
|
||||
args = get_args()
|
||||
keras_service = KerasService(args.keras_host, args.keras_port)
|
||||
am = ArtifactManager(LOG_DIR)
|
||||
|
||||
if keras_service.wait_for_word(word="options", timeout=30, interval=1) is None:
|
||||
setup_start_time = time.time()
|
||||
start_game()
|
||||
time.sleep(10)
|
||||
|
||||
ss_config = ScreenSplitConfig(
|
||||
divide_method=ScreenShotDivideMethod.QUADRANT,
|
||||
quadrant=ScreenShotQuadrant.BOTTOM_RIGHT
|
||||
)
|
||||
|
||||
if keras_service.wait_for_word(word="options", timeout=30, interval=1, split_config=ss_config) is None:
|
||||
logging.info("Did not find the options menu. Did the game launch correctly?")
|
||||
sys.exit(1)
|
||||
|
||||
logging.info("found options")
|
||||
|
||||
user.press("up")
|
||||
time.sleep(0.2)
|
||||
time.sleep(0.5)
|
||||
user.press("up")
|
||||
time.sleep(0.2)
|
||||
time.sleep(0.5)
|
||||
user.press("up")
|
||||
time.sleep(0.2)
|
||||
time.sleep(0.5)
|
||||
user.press("enter")
|
||||
time.sleep(1)
|
||||
|
||||
@@ -72,12 +80,14 @@ def run_benchmark():
|
||||
logging.info("Did not find the graphics menu. Did the menu get stuck?")
|
||||
sys.exit(1)
|
||||
|
||||
logging.info("found graphics")
|
||||
|
||||
user.press("down")
|
||||
time.sleep(0.2)
|
||||
time.sleep(0.5)
|
||||
user.press("down")
|
||||
time.sleep(0.2)
|
||||
time.sleep(0.5)
|
||||
user.press("down")
|
||||
time.sleep(0.2)
|
||||
time.sleep(0.5)
|
||||
user.press("enter")
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user