mirror of
				https://github.com/YosysHQ/sby.git
				synced 2025-10-30 12:32:28 +00:00 
			
		
		
		
	Add --statuscancels option
The statusdb is only used to check for task completions if this option is used, requiring the user to explicitly request the feature.
This commit is contained in:
		
							parent
							
								
									5fc8df43f8
								
							
						
					
					
						commit
						67212a20e5
					
				
					 3 changed files with 7 additions and 3 deletions
				
			
		|  | @ -62,6 +62,7 @@ jobcount = args.jobcount | |||
| init_config_file = args.init_config_file | ||||
| status_show = args.status | ||||
| status_reset = args.status_reset | ||||
| status_cancels = args.status_cancels | ||||
| status_live_csv = args.livecsv | ||||
| status_show_csv = args.statuscsv | ||||
| status_latest = args.status_latest | ||||
|  | @ -491,7 +492,7 @@ def start_task(taskloop, taskname): | |||
|     else: | ||||
|         junit_filename = "junit" | ||||
| 
 | ||||
|     task = SbyTask(sbyconfig, my_workdir, early_logmsgs, reusedir, taskloop, name=taskname, live_csv=status_live_csv) | ||||
|     task = SbyTask(sbyconfig, my_workdir, early_logmsgs, reusedir, status_cancels, taskloop, name=taskname, live_csv=status_live_csv) | ||||
| 
 | ||||
|     for k, v in exe_paths.items(): | ||||
|         task.exe_paths[k] = v | ||||
|  |  | |||
|  | @ -83,6 +83,8 @@ def parser_func(release_version='unknown SBY version'): | |||
|             help="only check statuses from the most recent run of a task") | ||||
|     parser.add_argument("--statusreset", action="store_true", dest="status_reset", | ||||
|             help="reset the contents of the status database") | ||||
|     parser.add_argument("--statuscancels", action="store_true", dest="status_cancels", | ||||
|             help="intertask cancellations can be triggered by the status database") | ||||
| 
 | ||||
|     parser.add_argument("--init-config-file", dest="init_config_file", | ||||
|             help="create a default .sby config file") | ||||
|  |  | |||
|  | @ -185,7 +185,7 @@ class SbyProc: | |||
|                 self.task.cancel() | ||||
|                 return | ||||
| 
 | ||||
|         if time.time() >= self.next_db: | ||||
|         if self.task.status_cancels and time.time() >= self.next_db: | ||||
|             tasks_status = self.task.status_db.all_tasks_status() | ||||
|             for task_status in tasks_status.values(): | ||||
|                 if (task_status["status"] in ["PASS", "FAIL", "CANCELLED"] and | ||||
|  | @ -913,12 +913,13 @@ class SbySummary: | |||
| 
 | ||||
| 
 | ||||
| class SbyTask(SbyConfig): | ||||
|     def __init__(self, sbyconfig, workdir, early_logs, reusedir, taskloop=None, logfile=None, name=None, live_csv=False): | ||||
|     def __init__(self, sbyconfig, workdir, early_logs, reusedir, status_cancels, taskloop=None, logfile=None, name=None, live_csv=False): | ||||
|         super().__init__() | ||||
|         self.used_options = set() | ||||
|         self.models = dict() | ||||
|         self.workdir = workdir | ||||
|         self.reusedir = reusedir | ||||
|         self.status_cancels = status_cancels | ||||
|         self.name = name | ||||
|         self.live_csv = live_csv | ||||
|         self.status = "UNKNOWN" | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue