feat(test): show executed commands for failing test scripts#2266
feat(test): show executed commands for failing test scripts#2266mohitdebian wants to merge 8 commits intoprefix-dev:mainfrom
Conversation
84260b0 to
afd64fb
Compare
|
Can we change this to always use |
afd64fb to
1e03759
Compare
Yes updated the implementation accordingly instead of injecting set -x into the script the bash interpreter now runs with -x when executing test scripts. |
|
@wolfv I updated the implementation based on your suggestions:
instead of injecting CI checks are running now please let me know if any further adjustments are needed. |
bb32ffb to
9baab05
Compare
|
|
||
| // Clone the script and prepend `set -x` to enable bash tracing for test scripts. | ||
| // Only inject for bash/sh scripts (interpreter unset defaults to bash on unix). | ||
| let mut test_script = commands_test.script.clone(); |
There was a problem hiding this comment.
this can all be removed now, right?
There was a problem hiding this comment.
yes that block has been removed in the updated pr since tracing is now handled at the interpreter level via bash -x the set -x injection logic in run_commands_test() is no longer needed
5d959a9 to
5fba653
Compare
|
@wolfv quick ping I’ve addressed the requested changes and removed the obsolete logic. CI is passing now would appreciate another look when you have time |
Fixes #2264
Currently rattler-build only reports "Script failed with status 1" when a
tests.scriptcommand fails, which makes it difficult to determine whichcommand caused the failure.
This change prepends
set -xto test scripts inrun_commands_test()so that each command is printed before execution.
The change only affects test scripts and does not modify build script behavior.