3 # Copyright (c) 2020 Cisco and/or its affiliates.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at:
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
18 # This entry script does not change CSIT branch,
19 # use "with_oper_for_vpp.sh" wrapper for that.
22 # + There is a directory holding VPP repo with patch under test checked out.
23 # + It contains csit subdirectory with CSIT code to use (this script is there).
24 # + Everything needed to build VPP is already installed locally.
26 # + The following directories (relative to VPP repo) are (re)created:
27 # ++ csit_current, build_current, archives, csit/archives, csit_download_dir.
29 # TODO: Implement some kind of VPP build caching.
31 # "set -eu" handles failures from the following two lines.
32 BASH_ENTRY_DIR="$(dirname $(readlink -e "${BASH_SOURCE[0]}"))"
33 BASH_FUNCTION_DIR="$(readlink -e "${BASH_ENTRY_DIR}/../function")"
34 source "${BASH_FUNCTION_DIR}/common.sh" || {
35 echo "Source failed." >&2
38 source "${BASH_FUNCTION_DIR}/per_patch.sh" || die "Source failed."
40 check_prerequisites || die
41 set_perpatch_vpp_dir || die
42 build_vpp_ubuntu_amd64 "CURRENT" || die
43 set_aside_commit_build_artifacts || die
44 initialize_csit_dirs || die
45 get_test_code "${1-}" || die
46 get_test_tag_string || die
47 set_perpatch_dut || die
48 select_topology || die
50 select_build "build_current" || die
51 check_download_dir || die
52 activate_virtualenv "${VPP_DIR}" || die
55 activate_docker_topology || die
56 select_vpp_device_tags || die
57 compose_pybot_arguments || die
60 die_on_pybot_error || die