install_qa_tools.sh 1.7 KB
Newer Older
S
storypku 已提交
1
#!/usr/bin/env bash
2 3

###############################################################################
S
storypku 已提交
4
# Copyright 2020 The Apollo Authors. All Rights Reserved.
5 6 7 8 9 10 11 12 13 14 15 16 17
#
# 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.
###############################################################################
S
storypku 已提交
18 19 20 21

# Fail on first error.
set -e

22 23
CURR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
. ${CURR_DIR}/installer_base.sh
S
storypku 已提交
24

C
changsh726 已提交
25 26
TARGET_ARCH="$(uname -m)"

27 28
## NOTE:
## buildifier/buildozer was moved into install_bazel.sh.
S
storypku 已提交
29

S
storypku 已提交
30 31
apt-get -y update && \
    apt-get -y install \
S
storypku 已提交
32 33
    cppcheck    \
    lcov        \
S
storypku 已提交
34
    valgrind
S
storypku 已提交
35

S
storypku 已提交
36 37 38 39 40 41
# libgoogle-perftools4  # gperftools
# PROFILER_SO="/usr/lib/${TARGET_ARCH}-linux-gnu/libprofiler.so"
# if [ ! -e "${PROFILER_SO}" ]; then
#    # libgoogle-perftools4: /usr/lib/x86_64-linux-gnu/libprofiler.so.0
#    ln -s "${PROFILER_SO}.0" "${PROFILER_SO}"
# fi
42

43
bash ${CURR_DIR}/install_shellcheck.sh
44 45
bash ${CURR_DIR}/install_gperftools.sh
bash ${CURR_DIR}/install_benchmark.sh
S
storypku 已提交
46
# TechDoc generation
47
bash ${CURR_DIR}/install_doxygen.sh
S
storypku 已提交
48 49 50

# sphinx ?

S
storypku 已提交
51
## Pylint
S
storypku 已提交
52 53
pip3_install pycodestyle \
    pyflakes \
C
changsh726 已提交
54
    flake8 \
55
    yapf \
C
changsh726 已提交
56
    autopep8
S
storypku 已提交
57
# pylint
S
storypku 已提交
58

C
changsh726 已提交
59
# shfmt
60
bash ${CURR_DIR}/install_shfmt.sh
C
changsh726 已提交
61

62
# Clean up cache to reduce layer size.
S
storypku 已提交
63 64
apt-get clean && \
    rm -rf /var/lib/apt/lists/*