blob: 2413c32330f93c208ef7cf37b41588f1ef9efdcd [file] [log] [blame]
Philippe Liardbee8be52011-07-06 12:15:51 +00001#! /bin/sh
2
3# Copyright (C) 2011 Google Inc.
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17# Author: Philippe Liard
18
19# Countinuous integration script that tests the different versions and
20# configurations of libphonenumber.
21
22# Test the C++ version with the provided CMake parameter.
23test_cpp_version() {
24 CMAKE_FLAGS="$1"
25 (
26 rm -rf cpp/build && mkdir cpp/build && cd cpp/build && \
27 cmake "${CMAKE_FLAGS}" .. && make && ./libphonenumber_test
28 ) || exit $?
29}
30test_cpp_version ''
31test_cpp_version '-DUSE_RE2=ON'
32test_cpp_version '-DUSE_LITE_METADATA=ON'
33test_cpp_version '-DUSE_STD_MAP=ON'
34
35# Test Java version using Ant.
36(cd java && ant clean jar && ant junit) || exit $?
37
38# Test Java version using Maven.
39(cd java && mvn clean package) || exit $?
40
41# Test build tools.
42(cd tools/java && mvn clean package) || exit $?