Merge branch 'master' into filecheck/nonasciiMsg
This commit is contained in:
		
						commit
						875aae3fae
					
				|  | @ -5,32 +5,36 @@ import ( | ||||||
| 	"log/slog" | 	"log/slog" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func Run(stages []Stage) ([]StageResult, error) { | func Run(stages []Stage) (stageResults []StageResult, err error) { | ||||||
| 	stageResults := []StageResult{} | 	var executorResults []ExecutorResult | ||||||
|  | 	var parserResults []ParserResult | ||||||
|  | 	var forceQuit bool | ||||||
| 	for _, stage := range stages { | 	for _, stage := range stages { | ||||||
| 		slog.Debug("stage start", "name", stage.Name) | 		slog.Debug("stage start", "name", stage.Name) | ||||||
| 		slog.Debug("executor run start", "cmds", stage.ExecutorCmds) | 		slog.Debug("executor run start", "cmds", stage.ExecutorCmds) | ||||||
| 		executor, ok := executorMap[stage.ExecutorName] | 		executor, ok := executorMap[stage.ExecutorName] | ||||||
| 		if !ok { | 		if !ok { | ||||||
| 			slog.Error("executor not found", "name", stage.ExecutorName) | 			slog.Error("executor not found", "name", stage.ExecutorName) | ||||||
| 			return stageResults, fmt.Errorf("executor not found: %s", stage.ExecutorName) | 			err = fmt.Errorf("executor not found: %s", stage.ExecutorName) | ||||||
|  | 			return | ||||||
| 		} | 		} | ||||||
| 		executorResults, err := executor.Run(stage.ExecutorCmds) | 		executorResults, err = executor.Run(stage.ExecutorCmds) | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
| 			slog.Error("executor run error", "name", stage.ExecutorName, "error", err) | 			slog.Error("executor run error", "name", stage.ExecutorName, "error", err) | ||||||
| 			return stageResults, err | 			return | ||||||
| 		} | 		} | ||||||
| 		slog.Debug("executor run done", "results", executorResults) | 		slog.Debug("executor run done", "results", executorResults) | ||||||
| 		slog.Debug("parser run start", "conf", stage.ParserConf) | 		slog.Debug("parser run start", "conf", stage.ParserConf) | ||||||
| 		parser, ok := parserMap[stage.ParserName] | 		parser, ok := parserMap[stage.ParserName] | ||||||
| 		if !ok { | 		if !ok { | ||||||
| 			slog.Error("parser not found", "name", stage.ParserName) | 			slog.Error("parser not found", "name", stage.ParserName) | ||||||
| 			return stageResults, err | 			err = fmt.Errorf("parser not found: %s", stage.ParserName) | ||||||
|  | 			return | ||||||
| 		} | 		} | ||||||
| 		parserResults, forceQuit, err := parser.Run(executorResults, stage.ParserConf) | 		parserResults, forceQuit, err = parser.Run(executorResults, stage.ParserConf) | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
| 			slog.Error("parser run error", "name", stage.ExecutorName, "error", err) | 			slog.Error("parser run error", "name", stage.ParserName, "error", err) | ||||||
| 			return stageResults, err | 			return | ||||||
| 		} | 		} | ||||||
| 		slog.Debug("parser run done", "results", parserResults) | 		slog.Debug("parser run done", "results", parserResults) | ||||||
| 		stageResults = append(stageResults, StageResult{ | 		stageResults = append(stageResults, StageResult{ | ||||||
|  | @ -39,11 +43,11 @@ func Run(stages []Stage) ([]StageResult, error) { | ||||||
| 			ForceQuit: forceQuit, | 			ForceQuit: forceQuit, | ||||||
| 		}) | 		}) | ||||||
| 		if forceQuit { | 		if forceQuit { | ||||||
| 			slog.Error("parser force quit", "name", stage.ExecutorName) | 			slog.Error("parser force quit", "name", stage.ParserName) | ||||||
| 			break | 			return | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	return stageResults, nil | 	return | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func Cleanup() { | func Cleanup() { | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| #!/usr/bin/env bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| set -ex | set -e | ||||||
| declare -A repo_names | declare -A repo_names | ||||||
| tmp_dir=${1:-./tmp} | tmp_dir=${1:-./tmp} | ||||||
| submodules_dir="$tmp_dir/submodules" | submodules_dir="$tmp_dir/submodules" | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| #!/usr/bin/env bash | #!/usr/bin/env bash | ||||||
| 
 | 
 | ||||||
| set -ex | set -e | ||||||
| tmp_dir=${1:-./tmp} | tmp_dir=${1:-./tmp} | ||||||
| JOJ3=$(git rev-parse --show-toplevel)/build/joj3 | JOJ3=$(git rev-parse --show-toplevel)/build/joj3 | ||||||
| command=${2:-$JOJ3} | command=${2:-$JOJ3} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user