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 22 23

# Fail on first error.
set -e

cd "$(dirname "${BASH_SOURCE[0]}")"

S
storypku 已提交
24 25
. /tmp/installers/installer_base.sh

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

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

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

S
storypku 已提交
38 39 40 41 42 43
# 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
44

S
storypku 已提交
45
bash /tmp/installers/install_gperftools.sh
C
changsh726 已提交
46

S
storypku 已提交
47 48
bash /tmp/installers/install_benchmark.sh

S
storypku 已提交
49 50 51 52 53
# TechDoc generation
bash /tmp/installers/install_doxygen.sh

# sphinx ?

S
storypku 已提交
54
## Pylint
S
storypku 已提交
55 56
pip3_install pycodestyle \
    pyflakes \
C
changsh726 已提交
57 58
    flake8 \
    autopep8
S
storypku 已提交
59
# pylint
S
storypku 已提交
60

C
changsh726 已提交
61 62 63
# shfmt
bash /tmp/installers/install_shfmt.sh

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