summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2017-02-27 13:09:25 +0800
committerruki <[email protected]>2017-02-27 13:09:34 +0800
commit256c8e4eb25a2644e386516e3151264af32243eb (patch)
tree166fa375ce9066eec91495d1221cf7791175f2b2
parent7e887ad68ba8c51dff9f85b76c75bfa97247fb91 (diff)
fix tests script
-rwxr-xr-xtests/tests23
1 files changed, 16 insertions, 7 deletions
diff --git a/tests/tests b/tests/tests
index b83c831d2..5caeb88f9 100755
--- a/tests/tests
+++ b/tests/tests
@@ -22,13 +22,6 @@ function build()
echo "build $1"
cd $1
- # build for macosx
- if [ $host = "macosx" ]; then
-
- # package all archs for iphoneos
- exec "xmake m package -p iphoneos"
- fi
-
# build
exec "xmake f -c"
exec "xmake "
@@ -38,6 +31,19 @@ function build()
cd -
}
+function build_for_iphoenos()
+{
+ # enter project
+ echo "build $1"
+ cd $1
+
+ # package all archs for iphoneos
+ exec "xmake m package -p iphoneos"
+
+ # leave project
+ cd -
+}
+
# build for c
build "./tests/console_c"
build "./tests/static_library_c"
@@ -60,9 +66,12 @@ if [ $host = "macosx" ]; then
# build for objc/c++
build "./tests/console_objc"
build "./tests/console_objc++"
+ build_for_iphoenos "./tests/console_objc"
+ build_for_iphoenos "./tests/console_objc++"
# build for swift
build "./tests/console_swift"
+ build_for_iphoenos "./tests/console_swift"
# build for go
build "./tests/console_go"