mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-03-22 18:48:38 +00:00
Merge pull request #339 from marcbonnici/revent_fix
Revent fix / improvments
This commit is contained in:
commit
da7a3276ed
Binary file not shown.
Binary file not shown.
5
wlauto/external/revent/revent.c
vendored
5
wlauto/external/revent/revent.c
vendored
@ -711,7 +711,7 @@ int init_general_input_devices(input_devices_t *devices)
|
||||
uint32_t num, i, path_len;
|
||||
char paths[INPDEV_MAX_DEVICES][INPDEV_MAX_PATH];
|
||||
int fds[INPDEV_MAX_DEVICES];
|
||||
int max_fd;
|
||||
int max_fd = 0;
|
||||
|
||||
num = 0;
|
||||
for(i = 0; i < INPDEV_MAX_DEVICES; ++i) {
|
||||
@ -1099,8 +1099,7 @@ void record(const char *filepath, int delay, recording_mode_t mode)
|
||||
while(1)
|
||||
{
|
||||
FD_ZERO(&readfds);
|
||||
if (wait_for_stdin)
|
||||
FD_SET(STDIN_FILENO, &readfds);
|
||||
FD_SET(STDIN_FILENO, &readfds);
|
||||
for (i=0; i < devices.num; i++)
|
||||
FD_SET(devices.fds[i], &readfds);
|
||||
|
||||
|
@ -136,9 +136,6 @@ def verify_state(screenshot_file, state_defs_path, workload_phase):
|
||||
with open(statedefs_file) as fh:
|
||||
state_definitions = yaml.load(fh)
|
||||
|
||||
# run a match on the screenshot
|
||||
matched_state = match_state(screenshot_file, state_defs_path, state_definitions)
|
||||
|
||||
# find what the expected state is for the given workload phase
|
||||
expected_state = None
|
||||
for phase in state_definitions["workload_phases"]:
|
||||
@ -148,4 +145,7 @@ def verify_state(screenshot_file, state_defs_path, workload_phase):
|
||||
if expected_state is None:
|
||||
raise StateDefinitionError("Phase not defined")
|
||||
|
||||
# run a match on the screenshot
|
||||
matched_state = match_state(screenshot_file, state_defs_path, state_definitions)
|
||||
|
||||
return expected_state == matched_state
|
||||
|
Loading…
x
Reference in New Issue
Block a user