File: compile_and_test_all.sh

package info (click to toggle)
cld2 0.0.0-git20150806-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 120,756 kB
  • sloc: cpp: 864,716; sh: 255; ansic: 207; makefile: 15
file content (61 lines) | stat: -rwxr-xr-x 2,614 bytes parent folder | download | duplicates (6)
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
#!/bin/sh
#
#  Copyright 2014 Google Inc. All Rights Reserved.
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#      http:# www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.
set -e
trap 'echo "FAILED!" && exit 1' INT TERM EXIT

# ----------------------------------------------------------------------------
echo "--> [1 of 7] Invoking: compile.sh..."
./compile.sh
echo "--> [2 of 7] Testing results of compile.sh..."
echo "--> compact_lang_det_test_chrome_2... "
echo "this is some english text" | ./compact_lang_det_test_chrome_2
echo "--> compact_lang_det_test_chrome_16... "
echo "this is some english text" | ./compact_lang_det_test_chrome_16
echo "--> cld2_unittest_chrome_2... "
./cld2_unittest_chrome_2 > /dev/null
echo "--> cld2_unittest_avoid_chrome_2... "
./cld2_unittest_avoid_chrome_2 > /dev/null

# ----------------------------------------------------------------------------
echo "--> [3 of 7] Invoking: compile_libs.sh..."
./compile_libs.sh

# ----------------------------------------------------------------------------
echo "--> [4 of 7] Invoking: compile_full.sh..."
./compile_full.sh
echo "--> [5 of 7] Testing results of compile_full.sh..."
echo "--> compact_lang_det_test_full... "
echo "this is some english text" | ./compact_lang_det_test_full
echo "--> cld2_unittest_full... "
./cld2_unittest_full > /dev/null
echo "--> cld2_unittest_full_avoid... "
./cld2_unittest_full_avoid > /dev/null

# ----------------------------------------------------------------------------
echo "--> [6 of 7] Invoking: compile_dynamic.sh..."
./compile_dynamic.sh
echo "--> [6 of 7] Dumping dynamic data to cld2_data.bin..."
./cld2_dynamic_data_tool --dump cld2_data.bin
echo "--> [6 of 7] Verifying dynamic data in cld2_data.bin..."
./cld2_dynamic_data_tool --verify cld2_data.bin
echo "--> [7 of 7] Testing results of compile_dynamic.sh..."
echo "--> compact_lang_det_dynamic_test_chrome... "
echo "this is some english text" | ./compact_lang_det_dynamic_test_chrome --data-file cld2_data.bin
echo "--> cld2_dynamic_unittest... "
./cld2_dynamic_unittest --data-file cld2_data.bin > /dev/null

trap - INT TERM EXIT
echo "All libraries compiled and all tests passed!"