INNER CODE UNIT · Go
newSmokeCommand
gameknife/gkNextEngine · tools/gnb/cmd/gnb/main.go:1133
func newSmokeCommand(ctx appContext) *cobra.Command {
opts := packager.SmokeOptions{}
timeoutSeconds := 90
cmd := &cobra.Command{
Use: "smoke <package.7z>",
Short: "Extract a release archive into a clean directory and verify it runs out of the box",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
archive := args[0]
if !filepath.IsAbs(archive) {
archive = filepath.Join(ctx.repoRoot, archive)
}
opts.LaunchTimeout = time.Duration(timeoutSeconds) * time.Second
return packager.Smoke(archive, opts)
},
}
cmd.Flags().BoolVar(&opts.Launch, "launch", false, "also launch each target and wait for the scene-ready log (needs a Vulkan device)")
cmd.Flags().BoolVar(&opts.Keep, "keep", false, "keep the extracted staging directory")