test breaking diff, just for pytest engine testning
Details
Details
Diff Detail
Diff Detail
- Repository
- rLTRN libtaskotron
- Branch
- arcpatch-D454
- Lint
Lint OK - Unit
Unit Test Errors - Build Status
Buildable 21 Build 21: arc lint + arc unit
| kparal |
test breaking diff, just for pytest engine testning
no plan
| Lint OK |
| Unit Test Errors |
| Buildable 21 | |
| Build 21: arc lint + arc unit |
| Path | Packages | |||
|---|---|---|---|---|
| M | .arcconfig (3 lines) | |||
| M | libtaskotron/runner.py (7 lines) |
| Commit | Tree | Parents | Author | Summary | Date |
|---|---|---|---|---|---|
| a64e67d12fbd | 5f0f039c1709 | a815e5bd7d9a | Lukas Brabec | magic code | Jul 21 2015, 7:45 AM |
| a815e5bd7d9a | a96456724b34 | 6d0d0cfa52a4 | Lukas Sparrow | testing arc pytest engine (Show More…) | Jul 21 2015, 7:40 AM |
| 1 | { | 1 | { | ||
|---|---|---|---|---|---|
| 2 | "project_id" : "libtaskotron", | 2 | "project_id" : "libtaskotron", | ||
| 3 | "conduit_uri" : "https://phab.qadevel.cloud.fedoraproject.org", | 3 | "conduit_uri" : "https://phab.qadevel.cloud.fedoraproject.org", | ||
| 4 | "arc.land.onto.default" : "develop", | 4 | "arc.land.onto.default" : "develop", | ||
| 5 | "arc.feature.start.default" : "develop" | 5 | "arc.feature.start.default" : "develop", | ||
| 6 | "unit.engine" : "PytestTestEngine" | ||||
| 6 | } | 7 | } | ||
| Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Line(s) | 108 | def do_single_action(self, action): | |||
|---|---|---|---|---|---|
| 129 | if 'export' in action: | 129 | if 'export' in action: | ||
| 130 | self.working_data[action['export']] = output | 130 | self.working_data[action['export']] = output | ||
| 131 | log.debug("Variable ${%s} was exported with value:\n%s" % | 131 | log.debug("Variable ${%s} was exported with value:\n%s" % | ||
| 132 | (action['export'], output)) | 132 | (action['export'], output)) | ||
| 133 | 133 | | |||
| 134 | # unable to use isinstance() due to dynamically loaded directives | 134 | # unable to use isinstance() due to dynamically loaded directives | ||
| 135 | if directive_classname == exitcode_directive.directive_class: | 135 | if directive_classname == exitcode_directive.directive_class: | ||
| 136 | # set exitcode if was None or overwrite previous SUCCESS with FAILURE (not vice versa) | 136 | # set exitcode if was None or overwrite previous SUCCESS with FAILURE (not vice versa) | ||
| 137 | if not self.exitcode or output != exitcode_directive.SUCCESS: | 137 | if not self.exitcode or output == exitcode_directive.SUCCESS: | ||
| 138 | log.info("Setting exitcode to %s" % output) | 138 | log.info("Setting exitcode to %s" % output) | ||
| 139 | self.exitcode = output | 139 | self.exitcode = output | ||
| 140 | 140 | | |||
| 141 | def do_actions(self): | 141 | def do_actions(self): | ||
| 142 | '''Sequentially run all actions for a task. An 'action' is a single step | 142 | '''Sequentially run all actions for a task. An 'action' is a single step | ||
| 143 | under the ``actions:`` key. An example action looks like:: | 143 | under the ``actions:`` key. An example action looks like:: | ||
| 144 | 144 | | |||
| 145 | - name: download rpms from koji | 145 | - name: download rpms from koji | ||
| Show All 29 Lines | 174 | if not arg in self.envdata: | |||
| 175 | raise TaskotronYamlError("Required input arg '%s' " | 175 | raise TaskotronYamlError("Required input arg '%s' " | ||
| 176 | "was not defined" % arg) | 176 | "was not defined" % arg) | ||
| 177 | 177 | | |||
| 178 | def _validate_env(self): | 178 | def _validate_env(self): | ||
| 179 | # TODO: implement this | 179 | # TODO: implement this | ||
| 180 | raise NotImplementedError("Environment validation is not" | 180 | raise NotImplementedError("Environment validation is not" | ||
| 181 | " yet implemented") | 181 | " yet implemented") | ||
| 182 | 182 | | |||
| 183 | def do_some_magic(self, scroll): | ||||
| 184 | lines = scroll.split() | ||||
| 185 | incantation = map(lambda s: s[::-1], lines) | ||||
| 186 | return incantation | ||||
| 187 | | ||||
| 183 | 188 | | |||
| 184 | def get_argparser(): | 189 | def get_argparser(): | ||
| 185 | parser = argparse.ArgumentParser() | 190 | parser = argparse.ArgumentParser() | ||
| 186 | parser.add_argument("task", nargs=1, help="task to run") | 191 | parser.add_argument("task", nargs=1, help="task to run") | ||
| 187 | parser.add_argument("-a", "--arch", | 192 | parser.add_argument("-a", "--arch", | ||
| 188 | choices=["i386", "x86_64", "armhfp", "noarch"], | 193 | choices=["i386", "x86_64", "armhfp", "noarch"], | ||
| 189 | action='append', | 194 | action='append', | ||
| 190 | help="architecture specifying the item to be checked. If omitted, " | 195 | help="architecture specifying the item to be checked. If omitted, " | ||
| ▲ Show 20 Lines • Show All 91 Lines • Show Last 20 Lines | |||||