summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cogl/driver/gl/gles/cogl-driver-gles.c1
-rw-r--r--configure.ac16
-rw-r--r--tests/conform/test-backface-culling.c3
-rw-r--r--tests/conform/test-conform-main.c2
-rw-r--r--tests/conform/test-premult.c6
-rwxr-xr-xtests/run-tests.sh10
6 files changed, 31 insertions, 7 deletions
diff --git a/cogl/driver/gl/gles/cogl-driver-gles.c b/cogl/driver/gl/gles/cogl-driver-gles.c
index e94449f4..d8d1d0ad 100644
--- a/cogl/driver/gl/gles/cogl-driver-gles.c
+++ b/cogl/driver/gl/gles/cogl-driver-gles.c
@@ -201,6 +201,7 @@ _cogl_driver_pixel_format_to_gl (CoglContext *context,
case COGL_PIXEL_FORMAT_ANY:
case COGL_PIXEL_FORMAT_YUV:
+ default:
g_assert_not_reached ();
break;
}
diff --git a/configure.ac b/configure.ac
index a9a81c9d..1f0c6060 100644
--- a/configure.ac
+++ b/configure.ac
@@ -685,10 +685,15 @@ AS_IF([test "x$enable_gles1" = "xyes"],
AC_SUBST([COGL_EGL_INCLUDES])
AC_CHECK_HEADERS([EGL/eglext.h],
- [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDE
+ [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDES
#include <EGL/eglext.h>"],
[],
[$COGL_EGL_INCLUDES])
+ AC_CHECK_HEADERS([EGL/eglmesaext.h],
+ [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDES
+#include <EGL/eglmesaext.h>"],
+ [],
+ [$COGL_EGL_INCLUDES])
# Check for a GLES 1.x Common Profile library with/without EGL.
#
@@ -1216,6 +1221,12 @@ AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"],
[],
[AC_MSG_ERROR([Unable to locate required EGL headers])],
[#include <EGL/egl.h>])
+ AC_CHECK_HEADERS(
+ [EGL/eglmesaext.h],
+ [],
+ [AC_MSG_ERROR([Unable to locate required EGL headers])],
+ [#include <EGL/egl.h>
+#include <EGL/eglext.h>])
AC_CHECK_LIB(EGL, [eglInitialize],
[COGL_EXTRA_LDFLAGS="$COGL_EXTRA_LDFLAGS -lEGL"],
@@ -1226,7 +1237,8 @@ AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"],
)
COGL_EGL_INCLUDES="#include <EGL/egl.h>
-#include <EGL/eglext.h>"
+#include <EGL/eglext.h>
+#include <EGL/eglmesaext.h>"
AC_SUBST([COGL_EGL_INCLUDES])
])
diff --git a/tests/conform/test-backface-culling.c b/tests/conform/test-backface-culling.c
index e90c2f5e..c06ec79a 100644
--- a/tests/conform/test-backface-culling.c
+++ b/tests/conform/test-backface-culling.c
@@ -193,6 +193,9 @@ validate_result (CoglFramebuffer *framebuffer, int y_offset)
cull_front = TRUE;
cull_back = TRUE;
break;
+
+ default:
+ g_assert_not_reached ();
}
if (FRONT_WINDING (draw_num) == COGL_WINDING_CLOCKWISE)
diff --git a/tests/conform/test-conform-main.c b/tests/conform/test-conform-main.c
index 9b6573d9..ee668999 100644
--- a/tests/conform/test-conform-main.c
+++ b/tests/conform/test-conform-main.c
@@ -55,7 +55,7 @@ main (int argc, char **argv)
ADD_TEST (test_pipeline_user_matrix, 0, 0);
ADD_TEST (test_blend_strings, 0, 0);
ADD_TEST (test_blend, 0, 0);
- ADD_TEST (test_premult, 0, TEST_KNOWN_FAILURE);
+ ADD_TEST (test_premult, 0, 0);
UNPORTED_TEST (test_readpixels);
#ifdef COGL_HAS_COGL_PATH_SUPPORT
ADD_TEST (test_path, 0, 0);
diff --git a/tests/conform/test-premult.c b/tests/conform/test-premult.c
index fa60bdf1..9ac7b680 100644
--- a/tests/conform/test-premult.c
+++ b/tests/conform/test-premult.c
@@ -49,6 +49,7 @@ make_texture (uint32_t color,
CoglPixelFormat src_format,
MakeTextureFlags flags)
{
+ static CoglUserDataKey bitmap_free_key;
CoglTexture2D *tex_2d;
guchar *tex_data = gen_tex_data (color);
CoglBitmap *bmp = cogl_bitmap_new_for_data (test_ctx,
@@ -57,6 +58,10 @@ make_texture (uint32_t color,
src_format,
QUAD_WIDTH * 4,
tex_data);
+ cogl_object_set_user_data (COGL_OBJECT (bmp),
+ &bitmap_free_key,
+ tex_data,
+ g_free);
tex_2d = cogl_texture_2d_new_from_bitmap (bmp);
@@ -66,7 +71,6 @@ make_texture (uint32_t color,
cogl_texture_set_premultiplied (tex_2d, FALSE);
cogl_object_unref (bmp);
- g_free (tex_data);
return tex_2d;
}
diff --git a/tests/run-tests.sh b/tests/run-tests.sh
index 7e62bf0f..763e173b 100755
--- a/tests/run-tests.sh
+++ b/tests/run-tests.sh
@@ -18,6 +18,8 @@ shift
set +m
+LOG=$(mktemp)
+
trap "" ERR
trap "" SIGABRT
trap "" SIGFPE
@@ -62,17 +64,17 @@ get_status()
run_test()
{
- $($TEST_BINARY $1 &>.log)
+ $($TEST_BINARY $1 &> "$LOG")
TMP=$?
var_name=$2_result
eval $var_name=$TMP
- if grep -q "$MISSING_FEATURE" .log; then
+ if grep -q "$MISSING_FEATURE" "$LOG"; then
if test $TMP -ne 0; then
eval $var_name=500
else
eval $var_name=400
fi
- elif grep -q "$KNOWN_FAILURE" .log; then
+ elif grep -q "$KNOWN_FAILURE" "$LOG"; then
if test $TMP -ne 0; then
eval $var_name=300
else
@@ -154,4 +156,6 @@ do
echo ""
done
+rm "$LOG"
+
exit $EXIT