mirror of
https://github.com/LTTLabsOSS/markbench-tests.git
synced 2026-01-09 14:07:56 -05:00
DOTA 2 start/end time default values (#43)
Provide default values for start and end times to relax requirements of needing to find these values for a test to pass. - Add default/fallback values for test start/end times. - Remove `sys.exit` if prompt for marking start/end times are not found
This commit is contained in:
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
Changes are grouped by the date they are merged to the main branch of the repository and are ordered from newest to oldest. Dates use the ISO 8601 extended calendar date format, i.e. YYYY-MM-DD.
|
||||
|
||||
# 2024-01-04
|
||||
|
||||
- Update DOTA 2 test harness to use fallback values and not fail when unable to mark test start or end times
|
||||
|
||||
## 2024-01-01
|
||||
|
||||
- Update start and end time marking strategies for Atomic Heart test harness
|
||||
|
||||
@@ -87,19 +87,27 @@ def run_benchmark():
|
||||
elapsed_setup_time = round(setup_end_time - setup_start_time, 2)
|
||||
logging.info("Harness setup took %f seconds", elapsed_setup_time)
|
||||
time.sleep(23)
|
||||
# TODO -> Mark benchmark start time using video OCR by looking for a players name
|
||||
if kerasService.wait_for_word(word="121", timeout=30, interval=0.1) is None:
|
||||
logging.error("Didn't see the gold tick up to 121 at beginning of benchmark. Could not mark start time!")
|
||||
sys.exit(1)
|
||||
|
||||
# Default fallback start time
|
||||
test_start_time = time.time()
|
||||
|
||||
result = kerasService.wait_for_word(word="121", timeout=30, interval=0.1)
|
||||
if result is None:
|
||||
logging.error("Unable to find gold count of 121. Using default start time value.")
|
||||
else:
|
||||
test_start_time = time.time()
|
||||
|
||||
time.sleep(73) # sleep duration during gameplay
|
||||
|
||||
if kerasService.wait_for_word(word="430", timeout=30, interval=0.1) is None:
|
||||
logging.error("Didn't see 430 Gold. Unable to mark end time. Check settings and try again.")
|
||||
sys.exit(1)
|
||||
# Default fallback end time
|
||||
test_end_time = time.time()
|
||||
|
||||
result = kerasService.wait_for_word(word="430", timeout=30, interval=0.1)
|
||||
if result is None:
|
||||
logging.error("Unable to find gold count of 430. Using default end time value.")
|
||||
else:
|
||||
test_end_time = time.time()
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
if kerasService.wait_for_word(word="heroes", timeout=25, interval=1) is None:
|
||||
|
||||
Reference in New Issue
Block a user