-
Notifications
You must be signed in to change notification settings - Fork 173
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
test: add some tracing to the svg validity test #658
Conversation
Mildly tangential, but I made a fairly rudimentary bash script to debug things when I was testing things out. #!/usr/bin/env bash
FILENAME=$1
echo "Checking for invalid class/id names"
grep -P "(class|id)=[\"'].*[\"']" $FILENAME | grep -vP '(class="[A-Z] (Button|Leader|Label)|id="(Button|Leader|Label)[A-Z])"'
echo "Checking for duplicate ids"
grep -P "id=[\"'](Button|Leader|Label)[A-Z][\"']" $FILENAME | sort | uniq -cd
echo "Checking for duplicate classes"
grep -P "class=[\"'][A-Z] (Button|Leader|Label)[\"']" $FILENAME | sort | uniq -cd It's absolute garbage, mind you -- but it would suggest that something like a python script can be used to prevent doomed automated checks from running. |
honestly, I think the whole svg validity test should be rewritten in python + pytest - it'll be simpler and provide better debugging options than the current one (which is now 12y old...) |
I'm unfamiliar with writing code for drivers, but I just heard some terms and ideas that I'm relatively familiar with. I have some housekeeping to do with other projects and my personal life, so if I get those sorted before someone else commits their time to this, I think I should be able to write that code. |
heh, I don't think in this case it's really low-level programming - you can parse the data files in python ( We already have a python test to check the data files exist ( Definitely a good one to get started with, doubly so if you want to learn python :) |
It's a bit hard to figure out from the CI logs what failed because they may be truncated. And for users not intimitely familiar with the test suite it's not that simple either so let's put in a bunch of trace stataments that should at least point to where things go wrong.
a75dcfc
to
ae01d5f
Compare
Going to merge this since @JoseExposito also ran into the issue of the svg checks not being particularly useful with their error messages. The output is a bit spammy and I've changed to to stderr now so it doesn't conflict with the TAP output on stdout but it's still better than a comment-less |
This is now part of #677 |
It's a bit hard to figure out from the CI logs what failed because they may be truncated. And for users not intimitely familiar with the test suite it's not that simple either so let's put in a bunch of trace stataments that should at least point to where things go wrong.
cc @AesaraB