Skip to content

Commit

Permalink
Fix CI reports (#4736)
Browse files Browse the repository at this point in the history
Fixes #4735

Description of changes:
- fix the URL in the GitHub CI report (new GitLab routing system)
- provide a useful error message when the sigint test times out
  • Loading branch information
kodiakhq[bot] authored May 24, 2023
2 parents 3dec3bc + 0d909b4 commit 1f6daf7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion maintainer/gh_create_issue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

URL="https://gitlab.icp.uni-stuttgart.de/espressomd/espresso/pipelines/${CI_PIPELINE_ID}"
URL="https://gitlab.icp.uni-stuttgart.de/espressomd/espresso/-/pipelines/${CI_PIPELINE_ID}"

curl -s "https://api.github.com/repos/espressomd/espresso/issues" \
-H "Accept: application/vnd.github.full+json" \
Expand Down
2 changes: 1 addition & 1 deletion maintainer/gh_post_status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
[ "${#}" -eq 1 ] || exit 1

GIT_COMMIT=$(git rev-parse HEAD)
URL="https://gitlab.icp.uni-stuttgart.de/espressomd/espresso/pipelines/${CI_PIPELINE_ID}"
URL="https://gitlab.icp.uni-stuttgart.de/espressomd/espresso/-/pipelines/${CI_PIPELINE_ID}"
STATUS="${1}"
curl "https://api.github.com/repos/espressomd/espresso/statuses/${GIT_COMMIT}" \
-H "Authorization: token ${GITHUB_TOKEN}" \
Expand Down
10 changes: 8 additions & 2 deletions testsuite/python/sigint.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
import os


EXPECTED_TRACEBACK_ENDING = """ in handle_sigint
signal.raise_signal(signal.Signals.SIGINT)
KeyboardInterrupt
"""


class SigintTest(ut.TestCase):

script = str(pathlib.Path(__file__).parent / 'sigint_child.py')
Expand All @@ -43,8 +49,8 @@ def check_signal_handling(self, process, sig):
self.assertEqual(traceback, "")
elif sig == signal.Signals.SIGINT:
self.assertIn(" self.integrator.run(", traceback)
self.assertTrue(traceback.endswith(
" in handle_sigint\n signal.raise_signal(signal.Signals.SIGINT)\nKeyboardInterrupt\n"))
self.assertTrue(traceback.endswith(EXPECTED_TRACEBACK_ENDING),
msg=f"Traceback failed string match:\n{traceback}")

def test_signal_handling(self):
signals = [signal.Signals.SIGINT, signal.Signals.SIGTERM]
Expand Down

0 comments on commit 1f6daf7

Please sign in to comment.