1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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
|
include ../extra.mk
SUBDIRS = ${TESTPLUGIN} \
${OBJC_SYNC} \
${SUBPROCESS} \
terminal
CLEAN = EBOOT.PBP \
boot.dol \
${PROG_NOINST}.arm9 \
${PROG_NOINST}.nds \
${PROG_NOINST}.nro \
${PROG_NOINST}.rpx \
testfile_bin.m \
testfile_ini.m
DISTCLEAN = Info.plist
PROG_NOINST = tests${PROG_SUFFIX}
STATIC_LIB_NOINST = ${TESTS_STATIC_LIB}
SRCS = ForwardingTests.m \
OFArrayTests.m \
${OF_BLOCK_TESTS_M} \
OFCharacterSetTests.m \
OFColorTests.m \
OFDataTests.m \
OFDateTests.m \
OFDictionaryTests.m \
OFHMACTests.m \
OFINIFileTests.m \
OFIRITests.m \
OFInvocationTests.m \
OFJSONTests.m \
OFListTests.m \
OFLocaleTests.m \
OFMD5HashTests.m \
OFMatrix4x4Tests.m \
OFMemoryStreamTests.m \
OFMethodSignatureTests.m \
OFNotificationCenterTests.m \
OFNumberTests.m \
OFObjectTests.m \
OFPBKDF2Tests.m \
OFPropertyListTests.m \
OFRIPEMD160HashTests.m \
OFSHA1HashTests.m \
OFSHA224HashTests.m \
OFSHA256HashTests.m \
OFSHA384HashTests.m \
OFSHA512HashTests.m \
OFScryptTests.m \
OFSetTests.m \
OFStreamTests.m \
OFStringTests.m \
OFSystemInfoTests.m \
OFValueTests.m \
OFXMLElementBuilderTests.m \
OFXMLNodeTests.m \
OFXMLParserTests.m \
RuntimeTests.m \
${RUNTIME_ARC_TESTS_M} \
TestsAppDelegate.m \
${USE_SRCS_FILES} \
${USE_SRCS_PLUGINS} \
${USE_SRCS_SOCKETS} \
${USE_SRCS_SUBPROCESS} \
${USE_SRCS_THREADS} \
${USE_SRCS_WINDOWS} \
testfile_bin.m \
testfile_ini.m
SRCS_PLUGINS = OFPluginTests.m
SRCS_SOCKETS = OFDNSResolverTests.m \
${OF_HTTP_CLIENT_TESTS_M} \
OFHTTPCookieTests.m \
OFHTTPCookieManagerTests.m \
OFKernelEventObserverTests.m \
OFSocketTests.m \
OFTCPSocketTests.m \
OFUDPSocketTests.m \
${USE_SRCS_APPLETALK} \
${USE_SRCS_IPX} \
${USE_SRCS_UNIX_SOCKETS}
SRCS_APPLETALK = OFDDPSocketTests.m
SRCS_IPX = OFIPXSocketTests.m \
OFSPXSocketTests.m \
OFSPXStreamSocketTests.m
SRCS_UNIX_SOCKETS = OFUNIXDatagramSocketTests.m \
OFUNIXStreamSocketTests.m
SRCS_SUBPROCESS = OFSubprocessTests.m
SRCS_THREADS = OFThreadTests.m
SRCS_WINDOWS = OFWindowsRegistryKeyTests.m
IOS_USER ?= mobile
IOS_TMP ?= /tmp/objfw-test
include ../buildsys.mk
testfile_bin.m: testfile.bin
${SHELL} ../utils/objfw-embed testfile.bin testfile.bin $@
testfile_ini.m: testfile.ini
${SHELL} ../utils/objfw-embed testfile.ini testfile.ini $@
.PHONY: run run-on-ios run-on-android
run:
rm -f libobjfw.so.${OBJFW_LIB_MAJOR}
rm -f libobjfw.so.${OBJFW_LIB_MAJOR_MINOR}
rm -f objfw${OBJFW_LIB_MAJOR}.dll libobjfw.${OBJFW_LIB_MAJOR}.dylib
rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR}
rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR_MINOR}
|
<
|
<
|
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
include ../extra.mk
SUBDIRS = ${OBJC_SYNC} \
terminal
CLEAN = EBOOT.PBP \
boot.dol \
${PROG_NOINST}.arm9 \
${PROG_NOINST}.nds \
${PROG_NOINST}.nro \
${PROG_NOINST}.rpx
DISTCLEAN = Info.plist
PROG_NOINST = tests${PROG_SUFFIX}
STATIC_LIB_NOINST = ${TESTS_STATIC_LIB}
SRCS = OFDataTests.m \
OFDictionaryTests.m \
OFListTests.m \
OFMemoryStreamTests.m \
OFNotificationCenterTests.m \
OFStreamTests.m \
OFStringTests.m \
OFValueTests.m \
OFXMLElementBuilderTests.m \
OFXMLNodeTests.m \
OFXMLParserTests.m \
RuntimeTests.m \
${RUNTIME_ARC_TESTS_M} \
TestsAppDelegate.m \
${USE_SRCS_FILES} \
${USE_SRCS_SOCKETS} \
${USE_SRCS_WINDOWS}
SRCS_SOCKETS = ${OF_HTTP_CLIENT_TESTS_M} \
OFHTTPCookieTests.m \
OFHTTPCookieManagerTests.m \
OFKernelEventObserverTests.m
SRCS_WINDOWS = OFWindowsRegistryKeyTests.m
IOS_USER ?= mobile
IOS_TMP ?= /tmp/objfw-test
include ../buildsys.mk
.PHONY: run run-on-ios run-on-android
run:
rm -f libobjfw.so.${OBJFW_LIB_MAJOR}
rm -f libobjfw.so.${OBJFW_LIB_MAJOR_MINOR}
rm -f objfw${OBJFW_LIB_MAJOR}.dll libobjfw.${OBJFW_LIB_MAJOR}.dylib
rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR}
rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR_MINOR}
|
152
153
154
155
156
157
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
|
rm -f libobjfw.${OBJFW_LIB_MAJOR}.dylib; \
rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR}; \
rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR_MINOR}; \
rm -f objfwrt${OBJFWRT_LIB_MAJOR}.dll; \
rm -f libobjfwrt.${OBJFWRT_LIB_MAJOR}.dylib; \
exit $$EXIT
run-on-ios: all
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'
destname=libobjfw.${OBJFW_LIB_MAJOR}.dylib; \
scp -q ../src/libobjfw.dylib \
${IOS_USER}@${IOS_HOST}:${IOS_TMP}/$$destname
scp -q tests testfile.txt ${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} && DYLD_LIBRARY_PATH=. ${WRAPPER} ./tests'
run-on-android: all
echo "Uploading files to Android device..."
if test -f ../src/libobjfw.so; then \
adb push ../src/libobjfw.so \
/data/local/tmp/objfw/libobjfw.so.${OBJFW_LIB_MAJOR}; \
fi
if test -f ../src/runtime/libobjfwrt.so; then \
adb push ../src/runtime/libobjfwrt.so \
/data/local/tmp/objfw/libobjfwrt.so.${OBJFWRT_LIB_MAJOR}; \
fi
adb push tests /data/local/tmp/objfw/tests
adb push testfile.txt /data/local/tmp/objfw/testfile.txt
if test -f plugin/TestPlugin.so; then \
adb push plugin/TestPlugin.so \
/data/local/tmp/objfw/plugin/TestPlugin.so; \
fi
echo "Running tests binary on Android device..."
adb shell 'cd /data/local/tmp/objfw && LD_LIBRARY_PATH=. exec ${WRAPPER} ./tests'
EBOOT.PBP: ${PROG_NOINST}
psp-fixup-imports ${PROG_NOINST}
mksfo "ObjFW Tests" PARAM.SFO
psp-strip ${PROG_NOINST}
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
rm -f libobjfw.${OBJFW_LIB_MAJOR}.dylib; \
rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR}; \
rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR_MINOR}; \
rm -f objfwrt${OBJFWRT_LIB_MAJOR}.dll; \
rm -f libobjfwrt.${OBJFWRT_LIB_MAJOR}.dylib; \
exit $$EXIT
run-on-android: all
echo "Uploading files to Android device..."
if test -f ../src/libobjfw.so; then \
adb push ../src/libobjfw.so \
/data/local/tmp/objfw/libobjfw.so.${OBJFW_LIB_MAJOR}; \
fi
if test -f ../src/runtime/libobjfwrt.so; then \
adb push ../src/runtime/libobjfwrt.so \
/data/local/tmp/objfw/libobjfwrt.so.${OBJFWRT_LIB_MAJOR}; \
fi
adb push tests /data/local/tmp/objfw/tests
adb push testfile.txt /data/local/tmp/objfw/testfile.txt
echo "Running tests binary on Android device..."
adb shell 'cd /data/local/tmp/objfw && LD_LIBRARY_PATH=. exec ${WRAPPER} ./tests'
EBOOT.PBP: ${PROG_NOINST}
psp-fixup-imports ${PROG_NOINST}
mksfo "ObjFW Tests" PARAM.SFO
psp-strip ${PROG_NOINST}
|
229
230
231
232
233
234
235
236
237
238
239
240
241
|
${PROG_NOINST}.rpx: ${PROG_NOINST}
elf2rpl $< $@
CPPFLAGS += -I../src \
-I../src/exceptions \
-I../src/runtime \
-I.. \
-DSTDOUT \
-DPROG_SUFFIX=\"${PROG_SUFFIX}\"
OBJCFLAGS_RuntimeARCTests.m = -fobjc-arc -fobjc-arc-exceptions
LIBS := ${TESTS_LIBS} ${LIBS}
LDFLAGS += ${MAP_LDFLAGS}
LD = ${OBJC}
|
|
<
|
149
150
151
152
153
154
155
156
157
158
159
160
|
${PROG_NOINST}.rpx: ${PROG_NOINST}
elf2rpl $< $@
CPPFLAGS += -I../src \
-I../src/exceptions \
-I../src/runtime \
-I.. \
-DSTDOUT
OBJCFLAGS_RuntimeARCTests.m = -fobjc-arc -fobjc-arc-exceptions
LIBS := ${TESTS_LIBS} ${LIBS}
LDFLAGS += ${MAP_LDFLAGS}
LD = ${OBJC}
|