-
Notifications
You must be signed in to change notification settings - Fork 0
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 cases are not generated because of uncovered process exit status #3
Comments
In the Linux world a process reacts to certain signals another process can send to it, to terminate it prematurely. Typical signals are SIGTERM and SIGKILL. And when a process is stopped by a signal it cannot have been successful. So, testing only for 0 in the status is correct either for a non-null termination and a signal terminated process. Is 0 not returned in your tests? What is it instead, null/undefined? |
It's strange tho. My |
Tricky decision. If I accept null as successful execution it might happen that the generation continues even though there might have been a signal/error. |
Something strange going on, the |
I don't know, sorry. |
Looks like spawning processes still shows issues in Node.js. Could you switch to something else? Like for example |
I've tested |
I use spawnSync to stay close to the original Java code, which also included the generation result in the test output, so it needed errors and normal output for the checks. But now that the test generation is a separate step there's no need anymore to capture the output, except for the check that generation went successful. Important is also that errors from ANTLR4 are printed to the console, to be able to recognize and fix them. |
I'd give the |
spawnSync
returns an object containing astatus
property.However you're only checking for
0
.I'm not sure what subprocess terminated due to a signal means, but that's the case I see on my laptop.
Probably it's because I'm using Node through Gradle? Who knows.
antlr-tgen/src/Generator.ts
Line 249 in 95e0cd2
The text was updated successfully, but these errors were encountered: