Artifact 2ffb33610ce5e45d6d5753bb10017a963b96e3aebae8a17039c2ced59fc03b9f:
- File
tests/Makefile
— part of check-in
[ffb91daffe]
at
2013-06-11 23:33:16
on branch trunk
— Initial sockets support for the Wii.
Not functional yet due to bugs in the SDK.
Bugs found so far:* Binding to port 0 fails instead of choosing a free port.
* gethostbyname() does not work for IPs.
* getsockname() is missing.
* struct sockaddr_storage is missing.I have not decided yet whether I fix those bugs in the SDK (I already
implemented getsockname() and added struct sockaddr_stroage and it seems
to work) or if I work around them in ObjFW. This will mainly depend on
how cooperative the developers of the Wii SDK are. (user: js, size: 3248) [annotate] [blame] [check-ins using]
include ../extra.mk SUBDIRS = ${TESTPLUGIN} PROG_NOINST = tests${PROG_SUFFIX} SRCS = ForwardingTests.m \ OFArrayTests.m \ ${OFBLOCKTESTS_M} \ OFDataArrayTests.m \ OFDateTests.m \ OFDictionaryTests.m \ OFJSONTests.m \ OFListTests.m \ OFMD5HashTests.m \ OFNumberTests.m \ OFObjectTests.m \ OFSerializationTests.m \ OFSet.m \ OFSHA1HashTests.m \ OFStreamTests.m \ OFStringTests.m \ OFURLTests.m \ OFXMLElementBuilderTests.m \ OFXMLNodeTests.m \ OFXMLParserTests.m \ ${PROPERTIESTESTS_M} \ TestsAppDelegate.m \ ${USE_SRCS_PLUGINS} \ ${USE_SRCS_SOCKETS} \ ${USE_SRCS_THREADS} \ ${OFHTTPCLIENTTESTS_M} SRCS_PLUGINS = OFPluginTests.m SRCS_SOCKETS = OFTCPSocketTests.m SRCS_THREADS = OFThreadTests.m IOS_USER ?= mobile IOS_TMP ?= /tmp/objfw-test .PHONY: run run-tests run-on-ios run: all if [ -z "${DONT_RUN_TESTS}" ]; then ${MAKE} ${MFLAGS} run-tests; fi run-tests: rm -f libobjfw.so.${OBJFW_LIB_MAJOR} rm -f libobjfw.so.${OBJFW_LIB_MAJOR_MINOR} rm -f libobjfw.dll libobjfw.dylib if test -f ../src/libobjfw.so; then \ ${LN_S} ../src/libobjfw.so libobjfw.so.${OBJFW_LIB_MAJOR}; \ ${LN_S} ../src/libobjfw.so \ libobjfw.so.${OBJFW_LIB_MAJOR_MINOR}; \ elif test -f ../src/libobjfw.so.${OBJFW_LIB_MAJOR_MINOR}; then \ ${LN_S} ../src/libobjfw.so.${OBJFW_LIB_MAJOR_MINOR} \ libobjfw.so.${OBJFW_LIB_MAJOR_MINOR}; \ fi if test -f ../src/libobjfw.dll; then \ ${LN_S} ../src/libobjfw.dll libobjfw.dll; \ fi if test -f ../src/libobjfw.dylib; then \ ${LN_S} ../src/libobjfw.dylib libobjfw.dylib; \ fi LD_LIBRARY_PATH=.$${LD_LIBRARY_PATH+:}$$LD_LIBRARY_PATH \ DYLD_LIBRARY_PATH=.$${DYLD_LIBRARY_PATH+:}$$DYLD_LIBRARY_PATH \ LIBRARY_PATH=.$${LIBRARY_PATH+:}$$LIBRARY_PATH \ ${TEST_LAUNCHER} ./${PROG_NOINST}; EXIT=$$?; \ rm -f libobjfw.so.${OBJFW_LIB_MAJOR}; \ rm -f libobjfw.so.${OBJFW_LIB_MAJOR_MINOR} libobjfw.dll \ rm -f libobjfw.dylib; \ exit $$EXIT sign-for-ios: all codesign -s "iPhone Developer" -f \ ../src/libobjfw.dylib tests plugin/TestPlugin.bundle run-on-ios: all sign-for-ios if [ -z "${IOS_HOST}" ]; then \ echo "Please set IOS_HOST to the hostname of your iOS host!"; \ exit 1; \ fi echo "Uploading files to iOS device ${IOS_HOST} at ${IOS_TMP}..." ssh ${IOS_USER}@${IOS_HOST} \ 'rm -fr ${IOS_TMP} && mkdir -p ${IOS_TMP}/plugin' scp -q ../src/libobjfw.dylib tests testfile.bin testfile.txt \ serialization.xml ${IOS_USER}@${IOS_HOST}:${IOS_TMP}/ scp -q plugin/TestPlugin.bundle \ ${IOS_USER}@${IOS_HOST}:${IOS_TMP}/plugin/ echo "Running tests binary on iOS device ${IOS_HOST}..." ssh ${IOS_USER}@${IOS_HOST} \ 'cd ${IOS_TMP} && ${TEST_LAUNCHER} ./tests' EBOOT.PBP: ${PROG_NOINST} psp-fixup-imports ${PROG_NOINST} mksfo "ObjFW Tests" PARAM.SFO psp-strip ${PROG_NOINST} pack-pbp $@ PARAM.SFO NULL NULL NULL NULL NULL ${PROG_NOINST} NULL boot.dol: ${PROG_NOINST} elf2dol ${PROG_NOINST} $@ 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}