Commit 73617fa9 authored by Marek Olšák's avatar Marek Olšák

Rename PIGLIT_SUCCESS and PIGLIT_FAILURE to PIGLIT_PASS and PIGLIT_FAIL, resp.

parent 03cc9091
......@@ -112,7 +112,7 @@ compile(const char *filename, GLenum target, int use_ARB)
buf = piglit_load_text_file(filename, &sz);
if (buf == NULL) {
piglit_report_result(PIGLIT_FAILURE);
piglit_report_result(PIGLIT_FAIL);
}
......@@ -195,7 +195,7 @@ compile(const char *filename, GLenum target, int use_ARB)
}
if ((err == GL_NO_ERROR) != (expected_fail == FALSE)) {
piglit_report_result(PIGLIT_FAILURE);
piglit_report_result(PIGLIT_FAIL);
}
}
......@@ -228,7 +228,7 @@ main(int argc, char **argv)
}
if ((argc - i) < 2) {
piglit_report_result(PIGLIT_FAILURE);
piglit_report_result(PIGLIT_FAIL);
}
......@@ -248,13 +248,13 @@ main(int argc, char **argv)
piglit_require_extension("GL_NV_fragment_program");
use_ARB = 0;
} else {
piglit_report_result(PIGLIT_FAILURE);
piglit_report_result(PIGLIT_FAIL);
}
for (i++; i < argc; i++) {
compile(argv[i], target, use_ARB);
}
piglit_report_result(PIGLIT_SUCCESS);
piglit_report_result(PIGLIT_PASS);
return 0;
}
......@@ -12,7 +12,7 @@ static int Width = 100, Height = 100;
static void Display(void)
{
piglit_report_result(PIGLIT_SUCCESS);
piglit_report_result(PIGLIT_PASS);
}
static void init(void)
......
......@@ -14,7 +14,7 @@ static int Width = 100, Height = 100;
static void Display(void)
{
piglit_report_result(PIGLIT_SUCCESS);
piglit_report_result(PIGLIT_PASS);
}
static void init(void)
......
......@@ -103,9 +103,9 @@ init(void)
printf("%s:%u: framebuffer status = 0x%04x\n",
__FUNCTION__, __LINE__, status);
if (status == GL_FRAMEBUFFER_UNSUPPORTED_EXT)
piglit_report_result(PIGLIT_SUCCESS);
piglit_report_result(PIGLIT_PASS);
else
piglit_report_result(PIGLIT_FAILURE);
piglit_report_result(PIGLIT_FAIL);
}
}
......
......@@ -88,7 +88,7 @@ display(void)
glutSwapBuffers();
if (Automatic)
piglit_report_result(pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE);
piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
}
......
......@@ -18,7 +18,7 @@ static void display(void)
glFlush();
if (Automatic) {
piglit_report_result(PIGLIT_SUCCESS);
piglit_report_result(PIGLIT_PASS);
}
}
......
......@@ -79,5 +79,5 @@ piglit_display(void)
glutSwapBuffers();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......@@ -75,5 +75,5 @@ piglit_display(void)
glutSwapBuffers();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......@@ -42,7 +42,7 @@ int piglit_height = 16;
enum piglit_result piglit_display(void)
{
return PIGLIT_SUCCESS;
return PIGLIT_PASS;
}
......@@ -68,5 +68,5 @@ void piglit_init(int argc, char ** argv)
printf("Testing whether the following call crashes...\n");
glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB, &result);
piglit_report_result(PIGLIT_SUCCESS);
piglit_report_result(PIGLIT_PASS);
}
......@@ -152,5 +152,5 @@ piglit_display(void)
glutSwapBuffers();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......@@ -45,7 +45,7 @@ piglit_display(void)
if (att_type != GL_FRAMEBUFFER_DEFAULT) {
printf("Default framebuffer's attachment type is not GL_FRAMEBUFFER_DEFAULT\n");
while (glGetError());
return PIGLIT_FAILURE;
return PIGLIT_FAIL;
}
glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,
......@@ -58,10 +58,10 @@ piglit_display(void)
err = glGetError();
if (err) {
printf("glGetFramebufferAttachmentParameteriv GL error: 0x%x\n", err);
return PIGLIT_FAILURE;
return PIGLIT_FAIL;
}
return PIGLIT_SUCCESS;
return PIGLIT_PASS;
}
void piglit_init(int argc, char **argv)
......
......@@ -141,5 +141,5 @@ piglit_display(void)
glutSwapBuffers();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......@@ -59,7 +59,7 @@ enum piglit_result piglit_display(void)
x, y, color,
colors[color][0], colors[color][1], colors[color][2],
result[0], result[1], result[2]);
return PIGLIT_FAILURE;
return PIGLIT_FAIL;
}
}
}
......@@ -67,7 +67,7 @@ enum piglit_result piglit_display(void)
}
}
return PIGLIT_SUCCESS;
return PIGLIT_PASS;
}
void piglit_init(int argc, char **argv)
......
......@@ -98,7 +98,7 @@ piglit_display(void)
glutSwapBuffers();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
void piglit_init(int argc, char **argv)
......
......@@ -100,9 +100,9 @@ piglit_display(void)
glEnd();
if (piglit_probe_pixel_rgb(piglit_width-5, piglit_height-20, red))
result = PIGLIT_SUCCESS;
result = PIGLIT_PASS;
else
result = PIGLIT_FAILURE;
result = PIGLIT_FAIL;
glutSwapBuffers();
......
......@@ -78,7 +78,7 @@ piglit_display(void)
glutSwapBuffers();
return PIGLIT_SUCCESS;
return PIGLIT_PASS;
}
......
......@@ -55,16 +55,16 @@ draw(struct egl_state *state)
state->cfg, state->win, NULL);
if (surf != EGL_NO_SURFACE) {
fprintf(stderr, "eglCreateWindowSurface() didn't fail\n");
piglit_report_result(PIGLIT_FAILURE);
piglit_report_result(PIGLIT_FAIL);
}
if (eglGetError() != EGL_BAD_ALLOC) {
fprintf(stderr, "eglCreateWindowSurface() "
"error wasn't EGL_BAD_ALLOC\n");
piglit_report_result(PIGLIT_FAILURE);
piglit_report_result(PIGLIT_FAIL);
}
return PIGLIT_SUCCESS;
return PIGLIT_PASS;
}
static const char *extensions[] = { NULL };
......
......@@ -53,7 +53,7 @@ draw(struct egl_state *state)
if (swap_buffers_region == NULL) {
fprintf(stderr, "could not getproc eglSwapBuffersRegionNOK");
piglit_report_result(PIGLIT_SUCCESS);
piglit_report_result(PIGLIT_PASS);
}
/* Clear background to green */
......@@ -67,9 +67,9 @@ draw(struct egl_state *state)
for (i = 0; i < 16; i += 4)
if (!piglit_probe_pixel_rgba(rects[i] + 5,
rects[i + 1] + 5, red))
return PIGLIT_FAILURE;
return PIGLIT_FAIL;
return PIGLIT_SUCCESS;
return PIGLIT_PASS;
}
static const struct egl_test test = {
......
......@@ -53,7 +53,7 @@ draw(struct egl_state *state)
EGL_Y_INVERTED_NOK, &inv)) {
fprintf(stderr,
"eglGetConfigAttrib(EGL_Y_INVERTED_NOK) failed\n");
return PIGLIT_FAILURE;
return PIGLIT_FAIL;
}
printf("EGL_Y_INVERTED_NOK: %s\n", inv ? "TRUE" : "FALSE");
......@@ -61,7 +61,7 @@ draw(struct egl_state *state)
pixmap = egl_util_create_pixmap(state, 100, 100, pixmap_attribs);
if (!eglMakeCurrent(state->egl_dpy, pixmap, pixmap, state->ctx)) {
fprintf(stderr, "eglMakeCurrent() failed\n");
piglit_report_result(PIGLIT_FAILURE);
piglit_report_result(PIGLIT_FAIL);
}
/* Clear pixmap to purple */
......@@ -71,7 +71,7 @@ draw(struct egl_state *state)
if (!eglMakeCurrent(state->egl_dpy,
state->surf, state->surf, state->ctx)) {
fprintf(stderr, "eglMakeCurrent() failed\n");
piglit_report_result(PIGLIT_FAILURE);
piglit_report_result(PIGLIT_FAIL);
}
glViewport(0, 0, state->width, state->height);
......@@ -95,9 +95,9 @@ draw(struct egl_state *state)
!piglit_probe_pixel_rgba(50, 50, purple) ||
!piglit_probe_pixel_rgba(110, 110, purple) ||
!piglit_probe_pixel_rgba(130, 130, red))
return PIGLIT_FAILURE;
return PIGLIT_FAIL;
return PIGLIT_SUCCESS;
return PIGLIT_PASS;
}
static const struct egl_test test = {
......
......@@ -75,14 +75,14 @@ create_window(struct egl_state *state)
if (!eglGetConfigAttrib(state->egl_dpy,
state->cfg, EGL_NATIVE_VISUAL_ID, &id)) {
fprintf(stderr, "eglGetConfigAttrib() failed\n");
piglit_report_result(PIGLIT_FAILURE);
piglit_report_result(PIGLIT_FAIL);
}
template.visualid = id;
vinfo = XGetVisualInfo(state->dpy, VisualIDMask, &template, &count);
if (count != 1) {
fprintf(stderr, "XGetVisualInfo() failed\n");
piglit_report_result(PIGLIT_FAILURE);
piglit_report_result(PIGLIT_FAIL);
}
state->depth = vinfo->depth;
......@@ -107,7 +107,7 @@ static enum piglit_result
event_loop(struct egl_state *state, const struct egl_test *test)
{
XEvent event;
enum piglit_result result = PIGLIT_FAILURE;
enum piglit_result result = PIGLIT_FAIL;
while (1) {
XNextEvent (state->dpy, &event);
......@@ -164,7 +164,7 @@ egl_util_run(const struct egl_test *test, int argc, char *argv[])
state.dpy = XOpenDisplay(NULL);
if (state.dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
piglit_report_result(PIGLIT_FAILURE);
piglit_report_result(PIGLIT_FAIL);
}
eglBindAPI(EGL_OPENGL_API);
......@@ -172,12 +172,12 @@ egl_util_run(const struct egl_test *test, int argc, char *argv[])
state.egl_dpy = eglGetDisplay(state.dpy);
if (state.egl_dpy == EGL_NO_DISPLAY) {
fprintf(stderr, "eglGetDisplay() failed\n");
piglit_report_result(PIGLIT_FAILURE);
piglit_report_result(PIGLIT_FAIL);
}
if (!eglInitialize(state.egl_dpy, &state.major, &state.minor)) {
fprintf(stderr, "eglInitialize() failed\n");
piglit_report_result(PIGLIT_FAILURE);
piglit_report_result(PIGLIT_FAIL);
}
check_extensions(&state, test);
......@@ -185,14 +185,14 @@ egl_util_run(const struct egl_test *test, int argc, char *argv[])
if (!eglChooseConfig(state.egl_dpy, attribs, &state.cfg, 1, &count) ||
count == 0) {
fprintf(stderr, "eglChooseConfig() failed\n");
piglit_report_result(PIGLIT_FAILURE);
piglit_report_result(PIGLIT_FAIL);
}
state.ctx = eglCreateContext(state.egl_dpy, state.cfg,
EGL_NO_CONTEXT, NULL);
if (state.ctx == EGL_NO_CONTEXT) {
fprintf(stderr, "eglCreateContext() failed\n");
piglit_report_result(PIGLIT_FAILURE);
piglit_report_result(PIGLIT_FAIL);
}
state.width = 300;
......@@ -203,13 +203,13 @@ egl_util_run(const struct egl_test *test, int argc, char *argv[])
state.cfg, state.win, NULL);
if (state.surf == EGL_NO_SURFACE) {
fprintf(stderr, "eglCreateWindowSurface() failed\n");
piglit_report_result(PIGLIT_FAILURE);
piglit_report_result(PIGLIT_FAIL);
}
if (!eglMakeCurrent(state.egl_dpy,
state.surf, state.surf, state.ctx)) {
fprintf(stderr, "eglMakeCurrent() failed\n");
piglit_report_result(PIGLIT_FAILURE);
piglit_report_result(PIGLIT_FAIL);
}
result = event_loop(&state, test);
......
......@@ -137,7 +137,7 @@ piglit_display(void)
glutSwapBuffers();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
void piglit_init(int argc, char **argv)
......
......@@ -178,7 +178,7 @@ piglit_display(void)
glutSwapBuffers();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
void piglit_init(int argc, char **argv)
......
......@@ -138,7 +138,7 @@ piglit_display(void)
glutSwapBuffers();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
void
......
......@@ -273,7 +273,7 @@ static enum piglit_result test_format(const struct format_desc *format, GLenum b
glutSwapBuffers();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
enum piglit_result piglit_display(void)
......
......@@ -207,7 +207,7 @@ piglit_display(void)
glutSwapBuffers();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
void piglit_init(int argc, char **argv)
......
......@@ -324,7 +324,7 @@ static enum piglit_result test_format(const struct format_desc *format, GLenum b
glutSwapBuffers();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
enum piglit_result piglit_display(void)
......
......@@ -196,7 +196,7 @@ run_test(void)
err = glGetError();
if (err != GL_NO_ERROR) {
printf("Unexpected GL error state 0x%04x\n", err);
piglit_report_result(PIGLIT_FAILURE);
piglit_report_result(PIGLIT_FAIL);
}
/* WIN(bottom) -> FBO(middle) */
......@@ -241,7 +241,7 @@ piglit_display(void)
{
GLboolean pass = run_test();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -205,7 +205,7 @@ piglit_display(void)
{
GLboolean pass = run_test();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -425,7 +425,7 @@ test_format(const struct format_desc *format, GLenum baseformat)
glDeleteTextures(1, &tex);
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
enum piglit_result piglit_display(void)
......
......@@ -166,5 +166,5 @@ piglit_display(void)
glutSwapBuffers();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......@@ -202,7 +202,7 @@ piglit_display(void)
{
GLboolean pass = run_test();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -135,7 +135,7 @@ piglit_display(void)
glutSwapBuffers();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
void piglit_init(int argc, char **argv)
......
......@@ -138,7 +138,7 @@ piglit_display(void)
glutSwapBuffers();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
void piglit_init(int argc, char **argv)
......
......@@ -195,7 +195,7 @@ piglit_display(void)
glutSwapBuffers();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
void piglit_init(int argc, char **argv)
......
......@@ -230,7 +230,7 @@ piglit_display(void)
glutSwapBuffers();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
void piglit_init(int argc, char **argv)
......
......@@ -303,9 +303,9 @@ count_and_report_bad_pixels(void)
/* XXX this error test is a total hack for now */
if (error > ErrorScale)
return PIGLIT_FAILURE;
return PIGLIT_FAIL;
else
return PIGLIT_SUCCESS;
return PIGLIT_PASS;
}
......
......@@ -194,7 +194,7 @@ enum piglit_result piglit_display(void)
glutSwapBuffers();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
void piglit_init(int argc, char **argv)
......
......@@ -135,7 +135,7 @@ enum piglit_result piglit_display(void)
glutSwapBuffers();
return pass ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}