Skip to content

Conversation

@patrto
Copy link
Contributor

@patrto patrto commented Mar 13, 2018

finishTest() is called right after test() returns, ending the test prematurely before all the test cases complete. This is because test() has a call to GLSLConformanceTester.runRenderTests(), which runs the tests asynchronously. runRenderTests() also already calls finishTest() after the last test completes.

@zhenyao
Copy link
Contributor

zhenyao commented Mar 13, 2018

I agree we don't need the finishTest() in the end because GLSLConformanceTester.runRenderTests() already call it in all its paths. However, I don't think GLSLConformanceTester.runRenderTests() is asynchronous so the current code should not cause any problem, only it's less elegant. Just want to clarify for the record. Still LGTM.

@zhenyao zhenyao merged commit 63cf94f into KhronosGroup:master Mar 13, 2018
@patrto
Copy link
Contributor Author

patrto commented Mar 13, 2018

Thank you for the review @zhenyao

GLSLConformanceTester.runRenderTests() uses setTimeout() between tests, so with the current code, GLSLConformanceTester.runRenderTests() returns after the first test case completes and calls finishTest() before the second test case starts.

@patrto patrto deleted the constant-precision-qualifier branch March 13, 2018 20:19
@zhenyao
Copy link
Contributor

zhenyao commented Mar 13, 2018

I didn't realize we are using setTimeout(). There is really no reason to use setTimeout(..., 1) and make it async. Instead, we should just execute tests in a for loop. Are you willing to upload another pull request to fix that?

@patrto
Copy link
Contributor Author

patrto commented Mar 14, 2018

Sure, I can try it and make sure all the test still pass

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