sclorg / container-common-scripts

Apache License 2.0
21 stars 45 forks source link

Do not try to get compressed image size when tests are interrupted #337

Closed pkubatrh closed 1 year ago

pkubatrh commented 1 year ago

When I run tests locally and I want to kill them early (through SIGINT) the cleanup phase starts, including compressing the image to check its size. This can take a while to complete when the image is larger, so it would make sense to skip this part when the tests are interrupted early.

zmiklank commented 1 year ago

Probably connected to: https://github.com/sclorg/container-common-scripts/issues/327.

We can set different traps on SIGINT and EXIT and that would solve the issue.

zmiklank commented 1 year ago

I think this is good first issue.

zmiklank commented 1 year ago

I've proposed PR, which at least adds a log entry, that the cleanup takes some time, so the user know. I know it is not a fix, but I was doing something else in test-lib.sh and thus had a good opportunity to add such a commit there.

zmiklank commented 1 year ago

Proper fix should be here: https://github.com/sclorg/container-common-scripts/pull/338