-
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
Tests runner questions #334
Comments
Vice versa, The idea is that hard errors are a subset of soft errors, which are in turn a subset of all tests (in Venn diagrams all tests would be a big white circle, soft errors would be a grey circle inside of the white circle, and hard errors would be a black circle inside of the grey circle). If it makes more sense to partition hard and soft errors into disjoint subsets, it can surely be done. Let me clarify the process. Soft errors make sense only for skeleton tests, which consist of multiple steps:
Unlike normal tests that compare the generated Return codes Lines 224 to 230 in 50ac133
|
This is because for normal (non-skeleton) tests we check every bit of output that re2c generates against a reference result (it should coincide verbatim, modulo some newline issues on Windows). That includes all output files that re2c might generate, as well as Unlike normal tests, for skeleton tests we do not check the generated C code. |
It should: the idea is that all
I think it should be fine, that's what non-skeleton tests do. |
Oh! That is unexpected. The code should be fixed to put the negative error code into "unknown failure" category. Something like this: if [ $status -eq 0 ]; then
# ok
elif [ $status -eq 1 ]; then
# re2c reported an error => soft fail
soft_errors=$(($soft_errors + 1))
else
# compilation error / runtime error / unknown error => hard fail
hard_errors=$(($hard_errors + 1))
fi |
Thanks for working on this @sergeyklay ! I'm curious to see what those negative return codes are. |
I'm sorry, but I can find this. What I see is that |
Actually no. I see a lot of |
Ok. Should we fix this, right? |
I didn't mean that non-skeleton tests use
Ah, I see. That is not windows-specific, I suspect it's the tests that generate header files. It might make sense to disable header generation for them, I'll have a look a bit later.
Yes, definitely. |
This commit 745f6e3 removes the Still, changing |
Should we mention this fact here? Line 10 in 50ac133
|
TBH I don't care much for |
Actually I'm OK with dropping it to simplify |
|
Fine! Only one question is remains #334 (comment) Could you address this too? |
Good job! As I can see all my questions are answered. Should we close this issue? |
Yes, I think it can be closed. Thanks for raising the issue! |
You're welcome :) |
Hello,
This is not a real issue, just question regarding
run_tests.sh
usage.This looks like a typo for me:
re2c/run_tests.sh.in
Lines 238 to 239 in 50ac133
Are hard errors the sum of all exit codes greater than zero? Let's say we have 5 exit codes with 1 and also we have 5 exit codes with 2. What value will the variables have? I assume
$soft_errors
will be 5 and$hard_errors
will be 10.Why the standard output is not redirected here:
re2c/run_tests.sh.in
Line 217 in 50ac133
But is redirected here:
re2c/run_tests.sh.in
Line 185 in 50ac133
Should this code remove
*.re
files (it is$outx
here)?re2c/run_tests.sh.in
Lines 233 to 235 in 50ac133
If so, we'll have an empty
test_*
directory then, because all other files are deleted too (including output and generated ones). Why we need this empty directory after all?What do you think about simplification:
The status code is not checked for negative number here, but I faced this situation in this issue #331:
re2c/run_tests.sh.in
Lines 238 to 239 in 50ac133
re2c.exe on Windows can return negative status code
The text was updated successfully, but these errors were encountered: