Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pretty print failures better #126

Merged
merged 2 commits into from
Jul 15, 2024
Merged

Pretty print failures better #126

merged 2 commits into from
Jul 15, 2024

Conversation

ltratt
Copy link
Member

@ltratt ltratt commented Jul 12, 2024

This PR is cosmetic, but makes it much easier to see which tests are failing. Each commit hopefully motivates it appropriately.

To give an example, before:

``
failures:
lang_tests::float.newcg.c lang_tests::float_consts.newcg.c lang_tests::fp_to_si.newcg.c lang_tests::float_add.newcg.c lang_tests::double.newcg.c lang_tests::float_mul.newcg.c lang_tests::float_div.newcg.c lang_tests::udiv.newcg.c lang_tests::sdiv.newcg.c lang_tests::fcmp_double.newcg.c lang_tests::fcmp_float.newcg.c


and after:

failures:
lang_tests::double.newcg.c
lang_tests::fcmp_double.newcg.c
lang_tests::fcmp_float.newcg.c
lang_tests::float.newcg.c
lang_tests::float_add.newcg.c
lang_tests::float_consts.newcg.c
lang_tests::float_div.newcg.c
lang_tests::float_mul.newcg.c
lang_tests::fp_to_si.newcg.c
lang_tests::sdiv.newcg.c
lang_tests::udiv.newcg.c

ltratt added 2 commits July 12, 2024 17:13
Before we pretty printed multiple failures as:

```
failures:
  A B C D
```

which gets very hard to read when tests have long names.

This commit changes this to:

```
failures:
  A
  B
  C
  D
```
When multiple tests are (hopefully expectedly!) failing, sometimes you
want to see if one particular test out of many is failing or succeeding.
That was difficult before because failing tests were shown in an
arbitrary order. This commit sorts them, case insensitive, in ascending
order.
@ltratt ltratt changed the title Pretty print failures Pretty print failures better Jul 12, 2024
@vext01
Copy link
Member

vext01 commented Jul 15, 2024

Agreed. Thank you!

@vext01 vext01 added this pull request to the merge queue Jul 15, 2024
Merged via the queue into softdevteam:master with commit 9ffbf2f Jul 15, 2024
2 checks passed
@ltratt ltratt deleted the pp_failures branch July 18, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants