change: get plugin path from funplugin

This commit is contained in:
debugtalk
2022-05-29 10:00:07 +08:00
parent cc96a3225e
commit f4ea0e8e06
2 changed files with 6 additions and 7 deletions
+3 -2
View File
@@ -5,6 +5,7 @@ import (
"net"
"net/http"
"net/url"
"path/filepath"
"testing"
"time"
@@ -231,12 +232,12 @@ func (r *HRPRunner) newCaseRunner(testcase *TestCase) (*testCaseRunner, error) {
}
// init parser plugin
plugin, pluginDir, err := initPlugin(testcase.Config.Path, r.pluginLogOn)
plugin, err := initPlugin(testcase.Config.Path, r.pluginLogOn)
if err != nil {
return nil, errors.Wrap(err, "init plugin failed")
}
runner.parser.plugin = plugin
runner.rootDir = pluginDir
runner.rootDir = filepath.Dir(plugin.Path())
// parse testcase config
if err := runner.parseConfig(); err != nil {