On 24 February 2012 11:43, Chad Versace <span dir="ltr"><<a href="mailto:chad.versace@linux.intel.com">chad.versace@linux.intel.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 02/22/2012 01:29 PM, Paul Berry wrote:<br>
> This patch converts the following tests to use the main() function in<br>
> piglit-framework.c rather than define their own main() function.<br>
><br>
> - asmparsertest<br>
> - fdo14575<br>
> - fdo20701<br>
> - fdo22540<br>
> - fdo31934<br>
> - glslparsertest<br>
> - texunits<br>
> ---<br>
> tests/asmparsertest/asmparsertest.c | 44 +++++++----------<br>
> tests/bugs/fdo14575.c | 29 ++++-------<br>
> tests/bugs/fdo20701.c | 53 ++++-----------------<br>
> tests/bugs/fdo22540.c | 31 +++---------<br>
> tests/bugs/fdo31934.c | 25 ++++------<br>
> tests/general/texunits.c | 84 +++++++--------------------------<br>
> tests/glslparsertest/glslparsertest.c | 23 ++++-----<br>
> 7 files changed, 87 insertions(+), 202 deletions(-)<br>
><br>
<br>
<br>
<br>
</div><div class="im">> diff --git a/tests/bugs/fdo20701.c b/tests/bugs/fdo20701.c<br>
> index 279de10..6bab980 100644<br>
> --- a/tests/bugs/fdo20701.c<br>
> +++ b/tests/bugs/fdo20701.c<br>
> @@ -36,12 +36,14 @@<br>
><br>
<br>
</div><div class="im">> @@ -81,8 +61,6 @@ init(void)<br>
> {<br>
> GLenum status;<br>
><br>
> - glewInit();<br>
> -<br>
> piglit_require_extension("GL_EXT_framebuffer_object");<br>
><br>
> glGenFramebuffersEXT(1, &fb);<br>
> @@ -110,20 +88,7 @@ init(void)<br>
> }<br>
><br>
><br>
> -int main(int argc, char**argv)<br>
> +void<br>
> +piglit_init(int argc, char**argv)<br>
> {<br>
> - glutInit(&argc, argv);<br>
> - if (argc == 2 && !strcmp(argv[1], "-auto"))<br>
> - Automatic = 1;<br>
> - glutInitDisplayMode(GLUT_RGB);<br>
> - glutInitWindowSize(Width, Height);<br>
> - glutCreateWindow("FD.O bug #20701 test");<br>
> - glutReshapeFunc(Reshape);<br>
> - glutKeyboardFunc(Key);<br>
> - glutDisplayFunc(Display);<br>
> - if (!Automatic)<br>
> - printf("If the test doesn't crash, then it passes.\n");<br>
> - init();<br>
> - glutMainLoop();<br>
> - return 0;<br>
> }<br>
<br>
</div>In fdo20701.c, init() no longer gets called. It needs to be renamed to piglit_init().<br></blockquote><div><br>Whoops. Good catch. I'm not sure how I missed that.<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Other than that, this is<br>
Reviewed-by: Chad Versace <<a href="mailto:chad.versace@linux.intel.com">chad.versace@linux.intel.com</a>><br>
</blockquote></div><br>