Skip to content
Snippets Groups Projects
Commit 9fa3e4084371 authored by Boris Feld's avatar Boris Feld
Browse files

Add more info when the scheduler see an unknown task type

parent 1cb8bba7dfe9
No related merge requests found
......@@ -95,6 +95,9 @@
run(task_arguments)
elif task_type == "EXIT":
return
else:
msg = "Unknown task %s"
print(msg % task_type)
finally:
LOGGER.info("Ending %r %r", task_type, task_arguments)
print("\n" * 2)
......
......@@ -63,3 +63,31 @@
* Ending 'RUN' 'tip' (glob)
* Starting 'EXIT' None (glob)
* Ending 'EXIT' None (glob)
Test scheduler bisect task
$ cat << EOF >> TASKS
> BISECT tip..tip~2 track_startup
> EXIT
> EOF
$ python $TESTDIR/../scheduler.py TASKS
================================================================================
Got task 'BISECT' 'tip..tip~2 track_startup'
Unknown task BISECT
Removed task 'BISECT tip..tip~2 track_startup'
================================================================================
================================================================================
Got task 'EXIT' None
Removed task 'EXIT'
================================================================================
Scheduler should exit and the TASKS file should be now empty
$ cat TASKS
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment