Ensure teardown.sh is alwasy executed 35/141335/2
authorhalil.cakal <halil.cakal@est.tech>
Wed, 18 Jun 2025 13:39:38 +0000 (14:39 +0100)
committerhalil.cakal <halil.cakal@est.tech>
Thu, 19 Jun 2025 09:25:14 +0000 (10:25 +0100)
commit938ba72570cf51d0f1fd21261d32820cbf3b58c0
tree6e18f89efc3ef608b24380cfab4484bba3238413
parent3d01eaa2d42ccd73bb335bbe24878c5f687b1129
Ensure teardown.sh is alwasy executed

- Currently, on_exit() is advised to run by only 'EXIT' signal that is
  for gracefull termination
- Thus, on_exit() function might not run in cases where job terminates
  abruptly
- To guarantee on_exit() alwasy being called, then add other common
  termination signals: SIGINT, SIGTERM, and SIGQUIT
- This will allow the trap command to catch these signals and execute
  on_exit() before it terminates.

Definition of the signals:
- SIGINT: Interrupt signal
- SIGTERM: Termination signal, a generic signal used to request a
  process to terminate.
- SIGQUIT: Quit signal

Issue-ID: CPS-2821

Change-Id: I96e5d3d42fb26d5dbad75df63a23419914c44fa5
Signed-off-by: halil.cakal <halil.cakal@est.tech>
k6-tests/run-k6-tests.sh