Skip to content

Commit 8a6d284

Browse files
author
Ma Shimiao
authored
Merge pull request #507 from q384566678/validate-platform-runtimetest
runtimetest: add host platform validation
2 parents bdbdb90 + 39f3f74 commit 8a6d284

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

cmd/runtimetest/main.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -778,14 +778,17 @@ func run(context *cli.Context) error {
778778
}
779779
logrus.SetLevel(logLevel)
780780

781+
platform := runtime.GOOS
782+
if platform != "linux" && platform != "solaris" && platform != "windows" {
783+
return fmt.Errorf("runtime-tools has not implemented testing for your platform %q, because the spec has nothing to say about it", platform)
784+
}
785+
781786
inputPath := context.String("path")
782787
spec, err := loadSpecConfig(inputPath)
783788
if err != nil {
784789
return err
785790
}
786791

787-
platform := runtime.GOOS
788-
789792
defaultValidations := []validation{
790793
{
791794
test: validateRootFS,

0 commit comments

Comments
 (0)