diff options
author | Jez Ng <me@jezng.com> | 2013-06-17 18:13:38 -0700 |
---|---|---|
committer | Jez Ng <me@jezng.com> | 2013-06-17 18:31:36 -0700 |
commit | 4537de04414b3356628ec79fb919d0c10d5eff17 (patch) | |
tree | 34a903e2ffc286e92aa053a8f9f40adf1828f274 | |
parent | 83d1e40dc67587c0eee1a5103ee51cfc435aa91d (diff) |
Make browser tests nicer to run.
A bunch of misc changes, including fixing compile-time warnings, and
muting the Python server request log.
-rwxr-xr-x | tests/runner.py | 6 | ||||
-rw-r--r-- | tests/sdl_image_prepare_data.c | 4 | ||||
-rw-r--r-- | tests/sdl_maprgba.c | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/tests/runner.py b/tests/runner.py index 4b8a3010..d0559240 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -11452,6 +11452,9 @@ elif 'browser' in str(sys.argv): result = q.get() s.wfile.write(result) s.wfile.close() + def log_request(code=0, size=0): + # don't log; too noisy + pass httpd = BaseHTTPServer.HTTPServer(('localhost', 9999), TestServerHandler) httpd.serve_forever() # test runner will kill us @@ -11472,6 +11475,9 @@ elif 'browser' in str(sys.argv): s.send_response(500) s.send_header("Content-type", "text/html") s.end_headers() + def log_request(code=0, size=0): + # don't log; too noisy + pass os.chdir(dir) httpd = BaseHTTPServer.HTTPServer(('localhost', 8888), TestServerHandler) httpd.serve_forever() # test runner will kill us diff --git a/tests/sdl_image_prepare_data.c b/tests/sdl_image_prepare_data.c index 87e33399..d45a2e60 100644 --- a/tests/sdl_image_prepare_data.c +++ b/tests/sdl_image_prepare_data.c @@ -1,4 +1,6 @@ #include <stdio.h> +#include <stdlib.h> +#include <string.h> #include <SDL/SDL.h> #include <SDL/SDL_image.h> #include <assert.h> @@ -43,7 +45,7 @@ void ready(void *arg, const char *fileName) { testImage(seenName); - free(seenName); // As the API docs say, we are responsible for freeing the 'fake' names we are given + free((void*)seenName); // As the API docs say, we are responsible for freeing the 'fake' names we are given SDL_Flip(screen); } diff --git a/tests/sdl_maprgba.c b/tests/sdl_maprgba.c index c87c7524..4b5c0026 100644 --- a/tests/sdl_maprgba.c +++ b/tests/sdl_maprgba.c @@ -1,6 +1,5 @@ #include <stdio.h> #include <SDL/SDL.h> -#include <emscripten.h> int main() { Uint32 c; |