We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2634 - SDL visualtest looks like it doesn't build on platforms other than Windows
Summary: SDL visualtest looks like it doesn't build on platforms other than Windows
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.0
Hardware: x86_64 Linux
: P2 normal
Assignee: Andreas Schiffler
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-08 17:30 UTC by Stewart Miles
Modified: 2014-07-08 23:47 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stewart Miles 2014-07-08 17:30:30 UTC
Testing on Linux..

$ hg tags
tip                             8998:995f6cd966a7

$ hg log -l 2
changeset:   8998:995f6cd966a7
tag:         tip
user:        Sam Lantinga <slouken@libsdl.org>
date:        Tue Jul 08 00:42:14 2014 -0700
summary:     Skip JUNK chunks in wave files

changeset:   8997:9e23a50a63f7
user:        Sam Lantinga <slouken@libsdl.org>
date:        Tue Jul 08 00:23:36 2014 -0700
summary:     Strip the binaries before signing them, in release configuration

$ cd visualtest
$ ./autogen.sh
$ ./configure
$ make -j16
gcc -o testharness src/action_configparser.c src/harness_argparser.c src/rwhelper.c src/testharness.c src/variator_exhaustive.c src/variators.c src/screenshot.c src/sut_configparser.c src/variator_common.c src/variator_random.c src/parsehelper.c src/mischelper.c src/linux/linux_process.c src/windows/windows_process.c src/windows/windows_screenshot.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGLES -I../include -I./include -lSDL2_test -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread
gcc -o testquit unittest/testquit.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGLES -I../include -I./include -lSDL2_test -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread
/tmp/ccU9u5rw.o: In function `ProcessAction':
sdl-2.x/visualtest/src/testharness.c:210: undefined reference to `SDLVisualTest_ScreenshotProcess'
collect2: ld returned 1 exit status
make: *** [testharness] Error 1

$ grep -B 10 -A 10 SDLVisualTest_ScreenshotProcess src/*
src/testharness.c-            if(SDL_IsProcessRunning(&pinfo) != 1)
src/testharness.c-            {
src/testharness.c-                SDLTest_LogError("SUT has quit.");
src/testharness.c-                *sut_running = 0;
src/testharness.c-                return TEST_FAILED;
src/testharness.c-            }
src/testharness.c-
src/testharness.c-            /* file name for the screenshot image */
src/testharness.c-            SDLVisualTest_HashString(args, hash);
src/testharness.c-            SDL_snprintf(path, MAX_PATH_LEN, "%s/%s", state.output_dir, hash);
src/testharness.c:            if(!SDLVisualTest_ScreenshotProcess(&pinfo, path))
src/testharness.c-            {
src/testharness.c:                SDLTest_LogError("SDLVisualTest_ScreenshotProcess() failed");
src/testharness.c-                return TEST_ERROR;
src/testharness.c-            }
src/testharness.c-        }
src/testharness.c-        break;
src/testharness.c-
src/testharness.c-        case SDL_ACTION_VERIFY:
src/testharness.c-        {
src/testharness.c-            int ret;
src/testharness.c-
src/testharness.c-            SDLTest_Log("Action: Verify screenshot");

$ grep -r SDLVisualTest_ScreenshotProcess src/*
src/testharness.c:            if(!SDLVisualTest_ScreenshotProcess(&pinfo, path))
src/testharness.c:                SDLTest_LogError("SDLVisualTest_ScreenshotProcess() failed");
src/windows/windows_screenshot.c:SDLVisualTest_ScreenshotProcess(SDL_ProcessInfo* pinfo, char* prefix)

Turns out SDLVisualTest_ScreenshotProcess is only implemented on Windows at the moment.