tests/thirdparty: use Suite type for configuration (#285)

This commit is contained in:
Michael McLoughlin
2022-05-08 16:55:51 -07:00
committed by GitHub
parent 5e6971cc7a
commit 62c71109a4
13 changed files with 927 additions and 911 deletions

View File

@@ -30,10 +30,10 @@ func main() {
}
var (
typ = flag.String("type", "", "documentation type")
tmpl = flag.String("tmpl", "", "explicit template file (overrides -type)")
output = flag.String("output", "", "path to output file (default stdout)")
prjsfilename = flag.String("prjs", "", "projects configuration")
typ = flag.String("type", "", "documentation type")
tmpl = flag.String("tmpl", "", "explicit template file (overrides -type)")
output = flag.String("output", "", "path to output file (default stdout)")
suitefilename = flag.String("suite", "", "third-party test suite configuration")
)
func mainerr() (err error) {
@@ -60,18 +60,18 @@ func mainerr() (err error) {
}
// Load third-party projects.
if *prjsfilename == "" {
return errors.New("missing projects configuration")
if *suitefilename == "" {
return errors.New("missing test suite configuration")
}
prjs, err := thirdparty.LoadProjectsFile(*prjsfilename)
suite, err := thirdparty.LoadSuiteFile(*suitefilename)
if err != nil {
return err
}
// Execute.
data := map[string]interface{}{
"Projects": prjs,
"Suite": suite,
}
var buf bytes.Buffer