Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
adc7bc23
Commit
adc7bc23
authored
Apr 21, 2017
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build on Android.
parent
83b8dccf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
7 deletions
+24
-7
http-test.c++
c++/src/kj/compat/http-test.c++
+1
-1
super-test.sh
super-test.sh
+23
-6
No files found.
c++/src/kj/compat/http-test.c++
View file @
adc7bc23
...
...
@@ -441,7 +441,7 @@ void testHttpClientResponse(kj::AsyncIoContext& io, const HttpResponseTestCase&
auto
client
=
newHttpClient
(
table
,
fragmenter
);
HttpHeaders
headers
(
table
);
auto
request
=
client
->
request
(
testCase
.
method
,
"/"
,
headers
,
size
_t
(
0
));
auto
request
=
client
->
request
(
testCase
.
method
,
"/"
,
headers
,
uint64
_t
(
0
));
request
.
body
=
nullptr
;
auto
clientTask
=
request
.
response
.
then
([
&
](
HttpClient
::
Response
&&
response
)
{
...
...
super-test.sh
View file @
adc7bc23
...
...
@@ -64,6 +64,14 @@ while [ $# -gt 0 ]; do
ssh
$HOST
"cd tmp-test-capnp && git checkout test"
exec
ssh
$HOST
"cd tmp-test-capnp && ./super-test.sh
$@
&& cd .. && rm -rf tmp-test-capnp"
;;
compiler
)
if
[
"$#"
-lt
2
]
;
then
echo
"usage:
$0
compiler CXX_NAME"
>
&2
exit
1
fi
export
CXX
=
"
$2
"
shift
;;
clang
)
export
CXX
=
clang++
;;
...
...
@@ -101,6 +109,11 @@ while [ $# -gt 0 ]; do
exit
0
;;
android
)
# To install Android SDK:
# - Download command-line tools: https://developer.android.com/studio/index.html#command-tools
# - Run $SDK_HOME/tools/bin/sdkmanager platform-tools 'platforms;android-25' 'system-images;android-25;google_apis;armeabi-v7a' emulator 'build-tools;25.0.2' ndk-bundle
# - Run $SDK_HOME/tools/bin/avdmanager create avd -n capnp -k 'system-images;android-25;google_apis;armeabi-v7a' -b google_apis/armeabi-v7a
# - Run $SDK_HOME/ndk-bundle/build/tools/make_standalone_toolchain.py --arch arm --api 24 --install-dir $TOOLCHAIN_HOME
if
[
"$#"
-ne
4
]
;
then
echo
"usage:
$0
android SDK_HOME TOOLCHAIN_HOME CROSS_HOST"
>
&2
exit
1
...
...
@@ -127,12 +140,16 @@ while [ $# -gt 0 ]; do
echo
"Starting emulator..."
trap
'kill $(jobs -p)'
EXIT
$SDK_HOME
/tools/emulator
-avd
n6
-no-window
&
$SDK_HOME
/platform-tools/adb wait-for-device
# TODO(soon): Speed up with KVM?
$SDK_HOME
/emulator/emulator
-avd
capnp
-no-window
&
$SDK_HOME
/platform-tools/adb
'wait-for-device'
echo
"Waiting for localhost to be resolvable..."
$SDK_HOME
/platform-tools/adb shell
'while ! ping -c 1 localhost > /dev/null 2>&1; do sleep 1; done'
doit
$SDK_HOME
/platform-tools/adb push capnp-test /data/capnp-test
doit
$SDK_HOME
/platform-tools/adb shell
'cd /data && /data/capnp-test && echo ANDROID_""TESTS_PASSED'
|
tee
android-test.log
doit
$SDK_HOME
/platform-tools/adb shell
'while ! ping -c 1 localhost > /dev/null 2>&1; do sleep 1; done'
# TODO(cleanup): With 'adb shell' I find I cannot put files anywhere, so I'm using 'su' a
# lot here. There is probably a better way.
doit
$SDK_HOME
/platform-tools/adb shell
'su 0 tee /data/capnp-test > /dev/null'
< capnp-test
doit
$SDK_HOME
/platform-tools/adb shell
'su 0 chmod a+rx /data/capnp-test'
doit
$SDK_HOME
/platform-tools/adb shell
'cd /data && su 0 /data/capnp-test && echo ANDROID_""TESTS_PASSED'
|
tee
android-test.log
grep
-q
ANDROID_TESTS_PASSED android-test.log
doit make distclean
...
...
@@ -160,7 +177,7 @@ while [ $# -gt 0 ]; do
echo
"========================================================================="
echo
"Android"
echo
"========================================================================="
"
$0
"
android /home/kenton/android
/android-sdk-linux /home/kenton/android/android-16
arm-linux-androideabi
"
$0
"
android /home/kenton/android
-sdk-linux /home/kenton/android-24
arm-linux-androideabi
echo
"========================================================================="
echo
"CMake"
echo
"========================================================================="
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment