gallium: run gallium tests if GALLIUM_TESTS=1 is set

Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
This commit is contained in:
Marek Olšák
2015-02-01 12:59:27 +01:00
parent 0271ac72d1
commit dcf996c31e
3 changed files with 14 additions and 3 deletions
@@ -4,6 +4,7 @@
#include "pipe/p_compiler.h"
#include "util/u_debug.h"
#include "util/u_tests.h"
/* Helper function to wrap a screen with
@@ -49,6 +50,9 @@ debug_screen_wrap(struct pipe_screen *screen)
screen = noop_screen_create(screen);
#endif
if (debug_get_bool_option("GALLIUM_TESTS", FALSE))
util_run_tests(screen);
return screen;
}
+8 -1
View File
@@ -261,7 +261,14 @@ tgsi_vs_window_space_position(struct pipe_context *ctx)
* context_create.
*/
void
util_run_tests(struct pipe_context *ctx)
util_run_tests(struct pipe_screen *screen)
{
struct pipe_context *ctx = screen->context_create(screen, NULL);
tgsi_vs_window_space_position(ctx);
ctx->destroy(ctx);
puts("Done. Exiting..");
exit(0);
}
+2 -2
View File
@@ -30,8 +30,8 @@
#include "pipe/p_compiler.h"
struct pipe_context;
struct pipe_screen;
void util_run_tests(struct pipe_context *ctx);
void util_run_tests(struct pipe_screen *screen);
#endif