tmt expects scripts to be executable
In tests/tests.fmf:
summary: Check basic command line options
discover:
how: shell
execute:
script: tests/run_tests.sh
tests/run_tests.sh exists as a 0644 file, but tmt complains about not being able to execute it.
The script being executable a requirement in STI, and it probably shouldn't be one in tmt, as one would expect scripts to be executed by a shell.
At the very least, the migration documentation should mention this: https://tmt.readthedocs.io/en/stable/questions.html#how-do-i-migrate-sti-tests-to-tmt
The documentation might be misleading or unclear, but yes, tmt does expect that whatever script is set to, is executable.
The documentation might be misleading or unclear, but yes, tmt does expect that whatever
scriptis set to, it's executable.
It can be a set to a shell code as well. See https://tmt.readthedocs.io/en/stable/spec/tests.html#test
script: |
echo hello world...
The documentation might be misleading or unclear, but yes, tmt does expect that whatever
scriptis set to, it's executable.It can be a set to a shell code as well. See https://tmt.readthedocs.io/en/stable/spec/tests.html#test
script: | echo hello world...
Hm, better to say "... executable command"?
It can be a set to a shell code as well. See https://tmt.readthedocs.io/en/stable/spec/tests.html#test
script: | echo hello world..
is that "shell code" or would it just run /bin/echo and the | is for a multi-line format?
Either way, the migration documentation should mention that the script should be executable, unlike in STI where this wasn't needed.
It can be a set to a shell code as well. See https://tmt.readthedocs.io/en/stable/spec/tests.html#test
script: | echo hello world..is that "shell code" or would it just run
/bin/echoand the|is for a multi-line format?
Yes, and yes - it is a multiline string, "echo hello world..\n".
So the needed action is to update the documentation here:
- https://tmt.readthedocs.io/en/stable/questions.html#how-do-i-migrate-sti-tests-to-tmt
- https://tmt.readthedocs.io/en/stable/spec/tests.html#test
And explicitly mention that scripts used in the script or test field need to be executable.
Let's cover #3703 as part of this as well. Adding as a child issue.