feat: add MCP config support to hrp run command with priority handling

This commit is contained in:
lilong.129
2025-05-28 23:11:52 +08:00
parent 4ea08b0198
commit 08a8b06578
3 changed files with 24 additions and 5 deletions

View File

@@ -35,6 +35,7 @@ var (
saveTests bool
genHTMLReport bool
caseTimeout float32
runMCPConfigPath string // MCP config path for run command
)
func init() {
@@ -46,6 +47,7 @@ func init() {
CmdRun.Flags().BoolVarP(&saveTests, "save-tests", "s", false, "save tests summary")
CmdRun.Flags().BoolVarP(&genHTMLReport, "gen-html-report", "g", false, "generate html report")
CmdRun.Flags().Float32Var(&caseTimeout, "case-timeout", 3600, "set testcase timeout (seconds)")
CmdRun.Flags().StringVar(&runMCPConfigPath, "mcp-config", "", "path to the MCP config file")
}
func makeHRPRunner() *hrp.HRPRunner {
@@ -71,5 +73,8 @@ func makeHRPRunner() *hrp.HRPRunner {
if proxyUrl != "" {
runner.SetProxyUrl(proxyUrl)
}
if runMCPConfigPath != "" {
runner.SetMCPConfigPath(runMCPConfigPath)
}
return runner
}