blob: b3edb0ec2fdd6c278c89f3ed1ef32fe3aa5d4d89 [file] [log] [blame]
// Copyright 2020 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package main
import (
"context"
"os"
"tnull/cmd"
"github.com/maruel/subcommands"
"go.chromium.org/luci/auth/client/authcli"
"go.chromium.org/luci/common/cli"
"go.chromium.org/luci/common/logging/gologger"
"go.chromium.org/luci/hardcoded/chromeinfra"
)
func main() {
application := &cli.Application{
Name: "TNull",
Title: "A minimal Remote Test Driver for testing API and faking out aspects of the RTD for meta-testing purposes.",
Context: func(ctx context.Context) context.Context {
return gologger.StdConfig.Use(ctx)
},
Commands: []*subcommands.Command{
subcommands.CmdHelp,
authcli.SubcommandInfo(chromeinfra.DefaultAuthOptions(), "whoami", false),
authcli.SubcommandLogin(chromeinfra.DefaultAuthOptions(), "login", false),
authcli.SubcommandLogout(chromeinfra.DefaultAuthOptions(), "logout", false),
cmd.RunSteps(),
cmd.GenerateFullRequest(),
},
}
os.Exit(subcommands.Run(application, nil))
}