Merge ~sylvain-pineau/checkbox-ng:nofake-tp-export into checkbox-ng:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 3c1b472e45a0040d2aa808f6f163386f54b2eb4c
Merged at revision: 3c1b472e45a0040d2aa808f6f163386f54b2eb4c
Proposed branch: ~sylvain-pineau/checkbox-ng:nofake-tp-export
Merge into: checkbox-ng:master
Diff against target: 26 lines (+8/-3)
1 file modified
checkbox_ng/launcher/subcommands.py (+8/-3)
Reviewer Review Type Date Requested Status
Checkbox Developers Pending
Review via email: mp+361821@code.launchpad.net

Description of the change

new option to run tp export on device to get templated jobs nased on hw resources not fake resource

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

tested with and without the option.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/checkbox_ng/launcher/subcommands.py b/checkbox_ng/launcher/subcommands.py
index b5a15d0..cc4d441 100644
--- a/checkbox_ng/launcher/subcommands.py
+++ b/checkbox_ng/launcher/subcommands.py
@@ -990,13 +990,18 @@ class TestPlanExport(Command):
990 parser.add_argument(990 parser.add_argument(
991 'TEST_PLAN',991 'TEST_PLAN',
992 help=_("test-plan id to bootstrap"))992 help=_("test-plan id to bootstrap"))
993 parser.add_argument(
994 '-n', '--nofake', action='store_true')
993995
994 def invoked(self, ctx):996 def invoked(self, ctx):
995 self.ctx = ctx997 self.ctx = ctx
996 try_selecting_providers(self.sa, '*')998 try_selecting_providers(self.sa, '*')
997 from plainbox.impl.runner import FakeJobRunner999 if ctx.args.nofake:
998 self.sa.start_new_session('tp-export-ephemeral', FakeJobRunner)1000 self.sa.start_new_session('tp-export-ephemeral')
999 self.sa._context.state._fake_resources = True1001 else:
1002 from plainbox.impl.runner import FakeJobRunner
1003 self.sa.start_new_session('tp-export-ephemeral', FakeJobRunner)
1004 self.sa._context.state._fake_resources = True
1000 tps = self.sa.get_test_plans()1005 tps = self.sa.get_test_plans()
1001 if ctx.args.TEST_PLAN not in tps:1006 if ctx.args.TEST_PLAN not in tps:
1002 raise SystemExit('Test plan not found')1007 raise SystemExit('Test plan not found')

Subscribers

People subscribed via source and target branches