Commit 5a13182
committed
tests: always make sure we return an LLB state
Before this we are returning errors to buildkit when there are test
errors.
Or for that matter, if there is an error during evaluation of the stuff
running up to the tests.
This causes issues with the debug workflow ("docker buildx dap") since
there is no LLB state to attach to, so it can't set breakpoints
properly.
With this change even when we get a solve error when evaluating state,
we return the bad state so that the debugger can attach to it.
When a test fails, we add a new LLB exec op which prints the joined
test errors and exits non-zero so that the build will fail.
There's also some minor changes to make it simpler to discard any
changes to the filesystem from running tests, or in the case of
non-container outputs return the original state, while keeping the
dependency chain in tact.
Signed-off-by: Brian Goff <[email protected]>1 parent 4999a52 commit 5a13182
File tree
6 files changed
+319
-260
lines changed- cmd/frontend
- frontend
- targets/linux
- deb/distro
- rpm/distro
- test
6 files changed
+319
-260
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| |||
0 commit comments