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
3b60a4cb
Commit
3b60a4cb
authored
Dec 11, 2014
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test scripts for MinGW and Android.
parent
13c52b82
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
94 additions
and
83 deletions
+94
-83
rpc-twoparty-test.c++
c++/src/capnp/rpc-twoparty-test.c++
+5
-0
exception.c++
c++/src/kj/exception.c++
+1
-1
mega-test.cfg
mega-test.cfg
+1
-0
super-test.sh
super-test.sh
+87
-82
No files found.
c++/src/capnp/rpc-twoparty-test.c++
View file @
3b60a4cb
...
@@ -245,7 +245,11 @@ TEST(TwoPartyNetwork, Release) {
...
@@ -245,7 +245,11 @@ TEST(TwoPartyNetwork, Release) {
// we drop a reference on the client side, there's no particular way to wait for the release
// we drop a reference on the client side, there's no particular way to wait for the release
// message to reach the server except to make a subsequent call and wait for the return -- but
// message to reach the server except to make a subsequent call and wait for the return -- but
// that would mask the bug. So we wait 10ms...
// that would mask the bug. So we wait 10ms...
//
// (We skip this test on Android because the Android emulator is slow enough that it sometimes
// fails.)
#if !__ANDROID__
ioContext
.
provider
->
getTimer
().
afterDelay
(
10
*
kj
::
MILLISECONDS
).
wait
(
ioContext
.
waitScope
);
ioContext
.
provider
->
getTimer
().
afterDelay
(
10
*
kj
::
MILLISECONDS
).
wait
(
ioContext
.
waitScope
);
EXPECT_EQ
(
1
,
handleCount
);
EXPECT_EQ
(
1
,
handleCount
);
...
@@ -258,6 +262,7 @@ TEST(TwoPartyNetwork, Release) {
...
@@ -258,6 +262,7 @@ TEST(TwoPartyNetwork, Release) {
ioContext
.
provider
->
getTimer
().
afterDelay
(
10
*
kj
::
MILLISECONDS
).
wait
(
ioContext
.
waitScope
);
ioContext
.
provider
->
getTimer
().
afterDelay
(
10
*
kj
::
MILLISECONDS
).
wait
(
ioContext
.
waitScope
);
EXPECT_EQ
(
0
,
handleCount
);
EXPECT_EQ
(
0
,
handleCount
);
#endif
}
}
TEST
(
TwoPartyNetwork
,
Abort
)
{
TEST
(
TwoPartyNetwork
,
Abort
)
{
...
...
c++/src/kj/exception.c++
View file @
3b60a4cb
...
@@ -43,7 +43,7 @@ namespace kj {
...
@@ -43,7 +43,7 @@ namespace kj {
namespace
{
namespace
{
String
getStackSymbols
(
ArrayPtr
<
void
*
const
>
trace
)
{
String
getStackSymbols
(
ArrayPtr
<
void
*
const
>
trace
)
{
#if (__linux__ || __APPLE__) && defined(KJ_DEBUG)
#if (__linux__ || __APPLE__) &&
!__ANDROID__ &&
defined(KJ_DEBUG)
// We want to generate a human-readable stack trace.
// We want to generate a human-readable stack trace.
// TODO(someday): It would be really great if we could avoid farming out to another process
// TODO(someday): It would be really great if we could avoid farming out to another process
...
...
mega-test.cfg
View file @
3b60a4cb
...
@@ -3,3 +3,4 @@ linux-gcc-4.8 5246 ./super-test.sh tmpdir capnp-gcc-4.8 gcc-4.8
...
@@ -3,3 +3,4 @@ linux-gcc-4.8 5246 ./super-test.sh tmpdir capnp-gcc-4.8 gcc-4.8
linux-clang 6039 ./super-test.sh tmpdir capnp-clang clang
linux-clang 6039 ./super-test.sh tmpdir capnp-clang clang
mac 5758 ./super-test.sh remote beat caffeinate
mac 5758 ./super-test.sh remote beat caffeinate
cygwin 6770 ./super-test.sh remote Kenton@flashman
cygwin 6770 ./super-test.sh remote Kenton@flashman
exotic 0 ./super-test.sh tmpdir exotic exotic
super-test.sh
View file @
3b60a4cb
...
@@ -47,7 +47,7 @@ while [ $# -gt 0 ]; do
...
@@ -47,7 +47,7 @@ while [ $# -gt 0 ]; do
cp
-r
c++/gtest
$DIR
/c++/gtest
cp
-r
c++/gtest
$DIR
/c++/gtest
fi
fi
cd
$DIR
cd
$DIR
exec
./super-test.sh
$@
exec
./super-test.sh
"
$@
"
;;
;;
remote
)
remote
)
if
[
"$#"
-lt
2
]
;
then
if
[
"$#"
-lt
2
]
;
then
...
@@ -75,89 +75,84 @@ while [ $# -gt 0 ]; do
...
@@ -75,89 +75,84 @@ while [ $# -gt 0 ]; do
gcc-4.7
)
gcc-4.7
)
export
CXX
=
g++-4.7
export
CXX
=
g++-4.7
;;
;;
kenton
)
mingw
)
cat
<<
"__EOF__"
if
[
"$#"
-ne
2
]
;
then
=========================================================================
echo
"usage:
$0
mingw CROSS_HOST"
>
&2
*************************************************************************
exit
1
_ _ ____ ____ ____
fi
| |
(
_
)
_ __ _ ___ __ / ___|/ ___/ ___|
CROSS_HOST
=
$2
| | | |
'_ \| | | \ \/ /____| | _| | | |
| |___| | | | | |_| |> <_____| |_| | |__| |___
cd
c++
|_____|_|_| |_|\__,_/_/\_\ \____|\____\____|
test
-e
gtest
||
doit ./setup-autotools.sh |
tr
=
-
test
-e
configure
||
doit autoreconf
-i
*************************************************************************
test
!
-e
Makefile
||
(
echo
"ERROR: Directory unclean!"
>
&2
&&
false
)
=========================================================================
doit ./configure
--host
=
"
$CROSS_HOST
"
--disable-shared
CXXFLAGS
=
'-static-libgcc -static-libstdc++'
__EOF__
doit make
-j6
capnp.exe capnpc-c++.exe
$0 test $QUICK
$0 clean
cp
capnp.exe capnp-mingw.exe
cat << "__EOF__"
cp
capnpc-c++.exe capnpc-c++-mingw.exe
=========================================================================
*************************************************************************
doit make distclean
___ ______ __ ____ _
doit ./configure
--host
=
"
$CROSS_HOST
"
--with-external-capnp
--disable-shared
--disable-reflection
CXXFLAGS
=
'-static-libgcc -static-libstdc++'
CAPNP
=
./capnp-mingw.exe
CAPNPC_CXX
=
./capnpc-c++-mingw.exe
/ _ \/ ___\ \/ / / ___| | __ _ _ __ __ _
| | | \___ \\ /_____| | | |/ _` | '
_
\
/ _
`
|
doit make
-j6
check
| |_| |___
)
/
\_
____| |___| |
(
_| | | | |
(
_| |
doit make distclean
\_
__/|____/_/
\_\
\_
___|_|
\_
_,_|_| |_|
\_
_, |
rm
-f
*
-mingw
.exe
|___/
exit
0
*************************************************************************
;;
=========================================================================
android
)
__EOF__
if
[
"$#"
-ne
4
]
;
then
$0
remote beat caffeinate
$QUICK
echo
"usage:
$0
android SDK_HOME TOOLCHAIN_HOME CROSS_HOST"
>
&2
cat
<<
"__EOF__"
exit
1
=========================================================================
fi
*************************************************************************
SDK_HOME
=
$2
____ _
TOOLCHAIN_HOME
=
$3
/ ___| _ __ ___ _
(
_
)
_ __
CROSS_HOST
=
$4
| | | | | |/ _
`
\ \
/
\
/ / |
'_ \
| |__| |_| | (_| |\ V V /| | | | |
cd
c++
\____\__, |\__, | \_/\_/ |_|_| |_|
test
-e
gtest
||
doit ./setup-autotools.sh |
tr
=
-
|___/ |___/
test
-e
configure
||
doit autoreconf
-i
*************************************************************************
test
!
-e
Makefile
||
(
echo
"ERROR: Directory unclean!"
>
&2
&&
false
)
=========================================================================
doit ./configure
--disable-shared
__EOF__
doit make
-j6
capnp capnpc-c++
$0 remote Kenton@flashman $QUICK
cat << "__EOF__"
cp
capnp capnp-host
=========================================================================
cp
capnpc-c++ capnpc-c++-host
*************************************************************************
____ ____ ____ _ _ ___
export
PATH
=
"
$TOOLCHAIN_HOME
/bin:
$PATH
"
/ ___|/ ___/ ___| | || | ( _ )
doit make distclean
| | _| | | | | || |_ / _ \
doit ./configure
--host
=
"
$CROSS_HOST
"
--with-external-capnp
--disable-shared
CXXFLAGS
=
'-pie -fPIE'
CAPNP
=
./capnp-host
CAPNPC_CXX
=
./capnpc-c++-host
| |_| | |__| |___ |__ _| (_) |
\____|\____\____| |_|(_)___/
doit make
-j6
capnp-test
*************************************************************************
echo
"Starting emulator..."
=========================================================================
trap
'kill $(jobs -p)'
EXIT
__EOF__
$SDK_HOME
/tools/emulator
-avd
n6
-no-window
&
$0 gcc-4.8 $QUICK
$SDK_HOME
/platform-tools/adb wait-for-device
$0 clean
echo
"Waiting for localhost to be resolvable..."
cat << "__EOF__"
$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
_ _ ____ _
grep
-q
ANDROID_TESTS_PASSED android-test.log
| | (_)_ __ _ ___ __ / ___| | __ _ _ __ __ _
| | | | '
_
\|
| |
\ \/
/____| | | |/ _
`
|
'_ \ / _` |
doit make distclean
| |___| | | | | |_| |> <_____| |___| | (_| | | | | (_| |
rm
-f
capnp-host capnpc-c++-host
|_____|_|_| |_|\__,_/_/\_\ \____|_|\__,_|_| |_|\__, |
|___/
*************************************************************************
=========================================================================
__EOF__
$0 clang $QUICK
$0 clean
cat << "__EOF__"
=========================================================================
*************************************************************************
____ _ _ ___ ____ ___ _____
/ ___|| | | |_ _| _ \ |_ _|_ _|
\___ \| |_| || || |_) | | | | |
___) | _ || || __/ | | | |
|____/|_| |_|___|_| |___| |_|
*************************************************************************
=========================================================================
__EOF__
exit
0
exit
0
;;
;;
exotic
)
echo
"========================================================================="
echo
"MinGW 64-bit"
echo
"========================================================================="
"
$0
"
mingw x86_64-w64-mingw32
echo
"========================================================================="
echo
"MinGW 32-bit"
echo
"========================================================================="
"
$0
"
mingw i686-w64-mingw32
echo
"========================================================================="
echo
"Android"
echo
"========================================================================="
"
$0
"
android /home/kenton/android/android-sdk-linux /home/kenton/android/android-16 arm-linux-androideabi
;;
clean
)
clean
)
rm
-rf
tmp-staging
rm
-rf
tmp-staging
cd
c++
cd
c++
...
@@ -348,6 +343,16 @@ doit make distcheck
...
@@ -348,6 +343,16 @@ doit make distcheck
doit make distclean
doit make distclean
rm
capnproto-
*
.tar.gz
rm
capnproto-
*
.tar.gz
if
[
"x
`
uname
`
"
=
xLinux
]
;
then
echo
"========================================================================="
echo
"Testing generic Unix (no Linux-specific features)"
echo
"========================================================================="
doit ./configure
--disable-shared
CXXFLAGS
=
"
$CXXFLAGS
-DKJ_USE_FUTEX=0 -DKJ_USE_EPOLL=0"
doit make
-j6
check
doit make distclean
fi
echo
"========================================================================="
echo
"========================================================================="
echo
"Testing with -fno-rtti and -fno-exceptions"
echo
"Testing with -fno-rtti and -fno-exceptions"
echo
"========================================================================="
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