Overview
Comment: | Wii: Link only tests with libwiiuse and libbte. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
daa4869d184f3bb74bac764778277bf2 |
User & Date: | js on 2013-04-27 17:57:53 |
Other Links: | manifest | tags |
Context
2013-04-27
| ||
21:51 | OFFile: Don't use fchmod(). check-in: 06443a3ae9 user: js tags: trunk | |
17:57 | Wii: Link only tests with libwiiuse and libbte. check-in: daa4869d18 user: js tags: trunk | |
02:22 | Initial Wii port. check-in: 2713b481a1 user: js tags: trunk | |
Changes
Modified configure.ac from [1fd9ad620c] to [989a042f2a].
︙ | ︙ | |||
23 24 25 26 27 28 29 | OBJCFLAGS="$OBJCFLAGS -fconstant-string-class=OFConstantString" AC_ARG_WITH(wii, AS_HELP_STRING([--with-wii], [build for Wii])) AS_IF([test x"$with_wii" = x"yes"], [ OBJCFLAGS="$OBJCFLAGS -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float" LDFLAGS="$LDFLAGS -mrvl -mcpu=750 -meabi -mhard-float" | > | | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | OBJCFLAGS="$OBJCFLAGS -fconstant-string-class=OFConstantString" AC_ARG_WITH(wii, AS_HELP_STRING([--with-wii], [build for Wii])) AS_IF([test x"$with_wii" = x"yes"], [ OBJCFLAGS="$OBJCFLAGS -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float" LDFLAGS="$LDFLAGS -mrvl -mcpu=750 -meabi -mhard-float" LIBS="$LIBS -lfat -logc" TESTS_LIBS="$TESTS_LIBS -lwiiuse -lbte" ]) AX_CHECK_COMPILER_FLAGS(-std=gnu99, [OBJCFLAGS="$OBJCFLAGS -std=gnu99"]) case $OBJC in *clang*) ;; *) |
︙ | ︙ | |||
841 842 843 844 845 846 847 | ]) ;; esac AS_IF([test x"$with_wii" = x"yes"], [ dnl Keep this lowercase, as WIILOAD is a variable used by dnl wiiload and thus likely already set by the user to something | | | 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 | ]) ;; esac AS_IF([test x"$with_wii" = x"yes"], [ dnl Keep this lowercase, as WIILOAD is a variable used by dnl wiiload and thus likely already set by the user to something dnl that is not the path of the wiiload binary. AC_CHECK_PROG(wiiload, wiiload, wiiload) AS_IF([test x"$wiiload" != x""], [ AC_SUBST(TESTS, "tests") AC_SUBST(TEST_LAUNCHER, "$wiiload") ]) ]) |
︙ | ︙ | |||
864 865 866 867 868 869 870 871 872 873 874 875 876 877 | dnl and add OBJCPPFLAGS to CPPFLAGS, thus we need to AC_SUBST these ourself. AC_SUBST(CPP) AC_SUBST(CPPFLAGS) dnl We use the OBJC compiler as our assembler AC_SUBST(AS, $OBJC) AC_SUBST(ASFLAGS) AC_SUBST(AS_DEPENDS, $OBJC_DEPENDS) AC_CONFIG_FILES([ buildsys.mk extra.mk Info.plist utils/objfw-config src/bridge/Info.plist | > > | 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 | dnl and add OBJCPPFLAGS to CPPFLAGS, thus we need to AC_SUBST these ourself. AC_SUBST(CPP) AC_SUBST(CPPFLAGS) dnl We use the OBJC compiler as our assembler AC_SUBST(AS, $OBJC) AC_SUBST(ASFLAGS) AC_SUBST(AS_DEPENDS, $OBJC_DEPENDS) AC_SUBST(TESTS_LIBS) AC_CONFIG_FILES([ buildsys.mk extra.mk Info.plist utils/objfw-config src/bridge/Info.plist |
︙ | ︙ |
Modified extra.mk.in from [f968c25685] to [895d88d448].
︙ | ︙ | |||
34 35 36 37 38 39 40 41 42 43 44 45 | RUNTIME = @RUNTIME@ RUNTIME_A = @RUNTIME_A@ RUNTIME_RUNTIME_A = @RUNTIME_RUNTIME_A@ RUNTIME_RUNTIME_LIB_A = @RUNTIME_RUNTIME_LIB_A@ RUNTIME_LIB_A = @RUNTIME_LIB_A@ TESTPLUGIN = @TESTPLUGIN@ TESTS = @TESTS@ TEST_LAUNCHER = @TEST_LAUNCHER@ USE_INCLUDES_THREADS = @USE_INCLUDES_THREADS@ USE_SRCS_PLUGINS = @USE_SRCS_PLUGINS@ USE_SRCS_SOCKETS = @USE_SRCS_SOCKETS@ USE_SRCS_THREADS = @USE_SRCS_THREADS@ | > | 34 35 36 37 38 39 40 41 42 43 44 45 46 | RUNTIME = @RUNTIME@ RUNTIME_A = @RUNTIME_A@ RUNTIME_RUNTIME_A = @RUNTIME_RUNTIME_A@ RUNTIME_RUNTIME_LIB_A = @RUNTIME_RUNTIME_LIB_A@ RUNTIME_LIB_A = @RUNTIME_LIB_A@ TESTPLUGIN = @TESTPLUGIN@ TESTS = @TESTS@ TESTS_LIBS = @TESTS_LIBS@ TEST_LAUNCHER = @TEST_LAUNCHER@ USE_INCLUDES_THREADS = @USE_INCLUDES_THREADS@ USE_SRCS_PLUGINS = @USE_SRCS_PLUGINS@ USE_SRCS_SOCKETS = @USE_SRCS_SOCKETS@ USE_SRCS_THREADS = @USE_SRCS_THREADS@ |
Modified tests/Makefile from [b55530a95c] to [a5eab7fd1a].
︙ | ︙ | |||
92 93 94 95 96 97 98 | mksfo "ObjFW Tests" PARAM.SFO psp-strip ${PROG_NOINST} pack-pbp $@ PARAM.SFO NULL NULL NULL NULL NULL ${PROG_NOINST} NULL include ../buildsys.mk CPPFLAGS += -I../src -I../src/exceptions -I../src/runtime -I.. -DSTDOUT | | | 92 93 94 95 96 97 98 99 100 101 | mksfo "ObjFW Tests" PARAM.SFO psp-strip ${PROG_NOINST} pack-pbp $@ PARAM.SFO NULL NULL NULL NULL NULL ${PROG_NOINST} NULL include ../buildsys.mk CPPFLAGS += -I../src -I../src/exceptions -I../src/runtime -I.. -DSTDOUT LIBS := -L../src -lobjfw ${TESTS_LIBS} ${LIBS} LDFLAGS += ${MAP_LDFLAGS} LD = ${OBJC} |
Modified tests/TestsAppDelegate.h from [0a217cd05f] to [3efff4d432].
︙ | ︙ | |||
59 60 61 62 63 64 65 | @interface TestsAppDelegate: OFObject { int _fails; } - (void)outputString: (OFString*)str | | | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | @interface TestsAppDelegate: OFObject { int _fails; } - (void)outputString: (OFString*)str inColor: (int)color; - (void)outputTesting: (OFString*)test inModule: (OFString*)module; - (void)outputSuccess: (OFString*)test inModule: (OFString*)module; - (void)outputFailure: (OFString*)test inModule: (OFString*)module; @end |
︙ | ︙ |
Modified tests/TestsAppDelegate.m from [949d72dfbf] to [5d7f8b1eec].
︙ | ︙ | |||
83 84 85 86 87 88 89 | } @catch (id e) { TestsAppDelegate *delegate = [[OFApplication sharedApplication] delegate]; OFString *string = [OFString stringWithFormat: @"\nRuntime error: Unhandled exception:\n%@\n", e]; [delegate outputString: string | | | | | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | } @catch (id e) { TestsAppDelegate *delegate = [[OFApplication sharedApplication] delegate]; OFString *string = [OFString stringWithFormat: @"\nRuntime error: Unhandled exception:\n%@\n", e]; [delegate outputString: string inColor: RED]; [delegate outputString: @"Press home button to exit!\n" inColor: NO_COLOR]; for (;;) { WPAD_ScanPads(); if (WPAD_ButtonsDown(0) & WPAD_BUTTON_HOME) [OFApplication terminateWithStatus: 1]; VIDEO_WaitVSync(); } } #else return of_application_main(&argc, &argv, [TestsAppDelegate class]); #endif } @implementation TestsAppDelegate - (void)outputString: (OFString*)str inColor: (int)color { #if defined(_PSP) char i, space = ' '; int y = pspDebugScreenGetY(); pspDebugScreenSetXY(0, y); for (i = 0; i < 68; i++) |
︙ | ︙ | |||
158 159 160 161 162 163 164 | - (void)outputTesting: (OFString*)test inModule: (OFString*)module { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; [self outputString: [OFString stringWithFormat: @"[%@] %@: testing...", module, test] | | | | | | | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | - (void)outputTesting: (OFString*)test inModule: (OFString*)module { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; [self outputString: [OFString stringWithFormat: @"[%@] %@: testing...", module, test] inColor: YELLOW]; [pool release]; } - (void)outputSuccess: (OFString*)test inModule: (OFString*)module { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; [self outputString: [OFString stringWithFormat: @"[%@] %@: ok\n", module, test] inColor: GREEN]; [pool release]; } - (void)outputFailure: (OFString*)test inModule: (OFString*)module { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; [self outputString: [OFString stringWithFormat: @"[%@] %@: failed\n", module, test] inColor: RED]; [pool release]; #ifdef __wii__ [self outputString: @"Press A to continue!\n" inColor: NO_COLOR]; for (;;) { WPAD_ScanPads(); if (WPAD_ButtonsDown(0) & WPAD_BUTTON_A) return; VIDEO_WaitVSync(); } #endif } - (void)applicationDidFinishLaunching { #ifdef _PSP pspDebugScreenInit(); #endif #ifdef __wii__ [OFFile changeToDirectoryAtPath: @"/apps/objfw-tests"]; #endif [self objectTests]; #ifdef OF_HAVE_BLOCKS [self blockTests]; #endif [self MD5HashTests]; |
︙ | ︙ | |||
244 245 246 247 248 249 250 | [self forwardingTests]; #ifdef OF_HAVE_PROPERTIES [self propertiesTests]; #endif #ifdef __wii__ [self outputString: @"Press home button to exit!\n" | | | 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | [self forwardingTests]; #ifdef OF_HAVE_PROPERTIES [self propertiesTests]; #endif #ifdef __wii__ [self outputString: @"Press home button to exit!\n" inColor: NO_COLOR]; for (;;) { WPAD_ScanPads(); if (WPAD_ButtonsDown(0) & WPAD_BUTTON_HOME) [OFApplication terminateWithStatus: _fails]; VIDEO_WaitVSync(); } #else [OFApplication terminateWithStatus: _fails]; #endif } @end |