Comments (8)
Coincidentally I hit the same problem and it is caused by https://github.com/teemtee/tmt/blame/43ac6e339dc4ee8e41a1c8fdcf8f7b91e1e7d0a8/tmt/steps/prepare/__init__.py#L147
Currently trying to remember why such line was added.
Workaround for now can be to define own in plugins dataclass
@dataclasses.dataclass
class PrepareXData(tmt.steps.prepare.PrepareStepData):
@property
def is_bare(self):
return False
from tmt.
That’s weird. We can see how: tmt
in many, many plans, with no extra options, so I’d say the problem will be something else than “cannot define”. Is there an error message? How does debug log looks like, with —log-topic=cli-invocations
there should be a very detailed description of phase processing. Can you share the plugin code? Might be related to step_data
, but even the default should be good enough.
from tmt.
It is in the current iteration of LecrisUT/tmt-cmake#5 (but also on the main
branch there). No, no errors are introduced, but also nothing is executed. wake
/show
are entered, but the actual execution or display does not occur. I'll probably run with debug later
from tmt.
Here's a log example running:
prepare:
how: cmake
# build_dir: build
execute:
script: /bin/true
(test/integration/prepare
in the plugin repo)
$ tmt run -ra --log-topic=cli-invocations provision --how local
/var/tmp/tmt/run-067
warn: /plan:prepare - {'how': 'cmake'} is not valid under any of the given schemas
/plan
discover
how: shell
summary: 1 test selected
provision
queued provision.provision task #1: default-0
provision.provision task #1: default-0
how: local
primary address: localhost
multihost name: default-0
arch: x86_64
distro: Fedora Linux 40 (KDE Plasma Prerelease)
summary: 1 guest provisioned
prepare
queued push task #1: push to default-0
push task #1: push to default-0
queued prepare task #1: requires on default-0
prepare task #1: requires on default-0
how: install
summary: Install required packages
name: requires
where: default-0
package: /usr/bin/flock
queued pull task #1: pull from default-0
pull task #1: pull from default-0
summary: 1 preparation applied
execute
queued execute task #1: default-0 on default-0
execute task #1: default-0 on default-0
how: tmt
progress:
summary: 1 test executed
report
how: display
summary: 1 test passed
finish
summary: 0 tasks completed
total: 1 test passed
from tmt.
I think the only reasonable usage is in
Lines 1461 to 1468 in 43ac6e3
But over there also I think it should be after the how:
is printed, at least if it's not the default how
from tmt.
I believe the check for empty data is included in order to drop the default empty phase which is created here:
Lines 382 to 384 in 43ac6e3
And that one is created so that there's something which can be overridden from the command line, for example:
tmt run -vvv -a prepare -h install -p tree
When run with the following plan:
provision:
how: container
execute:
script: tree
It would be better to create a new phase object only if the respective command line option is provided.
from tmt.
You mean that there is effectively a pre-existing:
prepare:
how: install
packages: [ ]
In the CLI, doesn't the prepare -h install -p tree
effectively add a prepare step anyway? I think it would be better to have such a behavior as opt-in, something like having a property can_skip
which can be linked to if self.data.packages
. is_bare
seems to be more along the line for checking if something was passed to it or not.
from tmt.
It's more like a how: something tentative
, not really an install
incarnation. It's an empty phase into which the default how
, i.e. shell
, would be injected. The magic is, if it's shell
but without any scripts, there's no point to run it, is it? I'll try to poke it, I already wandered around CLI invocations.
from tmt.
Related Issues (20)
- Ansible package dependency for prepare, finish steps
- Ansible package dependency for prepare, finish steps
- Expose CLI invocation reset HOT 1
- Deprecation warning with docutils `frontend.OptionParser`
- `test.require` does not work with `context.distro` HOT 2
- Adjust on `provision.how` HOT 4
- Installing a local package does not work
- "Check first" and "Skip broken" flags are broken for installation of packages provided as files HOT 1
- Hard to debug `tmt plans ls` with remote plans HOT 1
- Ansible prepare step of imported plan does not work HOT 1
- 1.33 regression: `dist-git-source` behaves differently in different provisions HOT 5
- 1.33 regression: Ssh fails with tmt-reproducer.sh HOT 2
- RFE: `tmt test id` option to check for duplicate IDs HOT 5
- Enable `vcpu`s number for `virtual` provisioning step HOT 1
- Load `resource_files` from external project
- Require an explicit user confirmation that 'provision -h local' can be executed'
- Suggesting additional sources for test requirements HOT 2
- All `tmt try` to accept generic steps options from `tmt run` HOT 6
- Prepare step should allow the run to continue on missing test requirements HOT 1
- Allow custom failure patterns in dmesg in test plan
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tmt.