mirror of
https://github.com/LTTLabsOSS/markbench-tests.git
synced 2026-01-09 22:18:00 -05:00
Cyberpunk 2077 navigation and start/end time marking update (#33)
- Update menu navigation and start/end time marking strategies for Cyberpunk 2077 test harness
This commit is contained in:
@@ -8,6 +8,7 @@ Changes are grouped by the date they are merged to the main branch of the reposi
|
|||||||
|
|
||||||
- Update menu navigation and start/end time marking for Rocket League harness
|
- Update menu navigation and start/end time marking for Rocket League harness
|
||||||
- Update Returnal harness to not fail if end time prompt not found
|
- Update Returnal harness to not fail if end time prompt not found
|
||||||
|
- Update menu navigation and start/end time marking strategies for Cyberpunk 2077 test harness
|
||||||
|
|
||||||
## 2023-12-13
|
## 2023-12-13
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ def navigate_main_menu() -> None:
|
|||||||
user.press("3")
|
user.press("3")
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
user.press("b")
|
user.press("b")
|
||||||
|
time.sleep(0.5)
|
||||||
|
user.press("enter")
|
||||||
else:
|
else:
|
||||||
user.press("left")
|
user.press("left")
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
@@ -62,6 +64,8 @@ def navigate_main_menu() -> None:
|
|||||||
user.press("3")
|
user.press("3")
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
user.press("b")
|
user.press("b")
|
||||||
|
time.sleep(0.5)
|
||||||
|
user.press("enter")
|
||||||
|
|
||||||
|
|
||||||
def run_benchmark():
|
def run_benchmark():
|
||||||
@@ -86,24 +90,26 @@ def run_benchmark():
|
|||||||
elapsed_setup_time = round(setup_end_time - setup_start_time, 2)
|
elapsed_setup_time = round(setup_end_time - setup_start_time, 2)
|
||||||
logging.info("Harness setup took %f seconds", elapsed_setup_time)
|
logging.info("Harness setup took %f seconds", elapsed_setup_time)
|
||||||
|
|
||||||
test_start_time = time.time()
|
result = kerasService.wait_for_word("fps", timeout=60, interval=0.2)
|
||||||
|
|
||||||
result = kerasService.wait_for_word("fps", timeout=60, interval=1)
|
|
||||||
if not result:
|
if not result:
|
||||||
logging.info("Benchmark didn't start.")
|
logging.info("Benchmark didn't start.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
test_start_time = time.time() - 5
|
||||||
|
|
||||||
logging.info("Benchmark started. Waiting for benchmark to complete.")
|
logging.info("Benchmark started. Waiting for benchmark to complete.")
|
||||||
time.sleep(70)
|
time.sleep(60)
|
||||||
result = kerasService.wait_for_word("results", timeout=240, interval=3)
|
result = kerasService.wait_for_word("results", timeout=240, interval=0.5)
|
||||||
if not result:
|
if not result:
|
||||||
logging.info("Did not see results screen. Mark as DNF.")
|
logging.info("Did not see results screen. Mark as DNF.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
test_end_time = time.time()
|
test_end_time = time.time() - 2
|
||||||
|
time.sleep(2)
|
||||||
elapsed_test_time = round((test_end_time - test_start_time), 2)
|
elapsed_test_time = round((test_end_time - test_start_time), 2)
|
||||||
logging.info("Benchmark took %f seconds", elapsed_test_time)
|
logging.info("Benchmark took %f seconds", elapsed_test_time)
|
||||||
gui.screenshot(os.path.join(LOG_DIRECTORY, "results.png"))
|
gui.screenshot(os.path.join(LOG_DIRECTORY, "results.png"))
|
||||||
|
time.sleep(3)
|
||||||
terminate_processes(PROCESS_NAME)
|
terminate_processes(PROCESS_NAME)
|
||||||
return test_start_time, test_end_time
|
return test_start_time, test_end_time
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user