Skip to content

Commit 39f3f74

Browse files
author
Zhou Hao
committed
runtimetest: add host platform validation
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
1 parent e2ffaf1 commit 39f3f74

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
@@ -706,14 +706,17 @@ func run(context *cli.Context) error {
706706
}
707707
logrus.SetLevel(logLevel)
708708

709+
platform := runtime.GOOS
710+
if platform != "linux" && platform != "solaris" && platform != "windows" {
711+
return fmt.Errorf("runtime-tools has not implemented testing for your platform %q, because the spec has nothing to say about it", platform)
712+
}
713+
709714
inputPath := context.String("path")
710715
spec, err := loadSpecConfig(inputPath)
711716
if err != nil {
712717
return err
713718
}
714719

715-
platform := runtime.GOOS
716-
717720
defaultValidations := []validation{
718721
{
719722
test: validateRootFS,

0 commit comments

Comments
 (0)