Lines Matching refs:opt
21 func FlashAndTest(ctx context.Context, opt *FlashAndTestOptions) error {
23 if err := opt.M.Flash(opt.Device, opt.Version, ctx); err != nil {
24 logrus.Errorf("Failed to flash version %s to device %s, error: %s", opt.Version, opt.Device, err.Error())
29 if err := opt.T.Prepare(opt.M.PkgDir(opt.Version), opt.Device, ctx); err != nil {
34 if opt.TestCase == "" {
36 results, err := opt.T.DoTestTask(opt.Device, ctx)
38 logrus.Errorf("Failed to run all test cases on device %s, error: %s", opt.Device, err.Error())
55 result, err := opt.T.DoTestCase(opt.Device, opt.TestCase, ctx)
57 logrus.Errorf("Failed to run test case %s on device %s, error: %s", opt.TestCase, opt.Device, err.Error())
61 logrus.Infof("Flash and test for test case %s done, result: %s", opt.TestCase, result)