mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-19 07:49:07 +08:00
vmtest: #121 follow-ups. Loop increase bpf-next git fetch depth
- The previously introduced git fetch depth of bpf-next tree is not sufficient when bpf-next tree is far ahead from libbpf checkpoint commit, so increase the depth up to 128 max. Since 128 may be an overkill for a general case, increase exponentially in a loop until max is reached. - Do not fetch bpf-next twice - Remove setup_example.sh
This commit is contained in:
committed by
Andrii Nakryiko
parent
583bddce6b
commit
f72fe00e70
@@ -11,7 +11,6 @@ env:
|
||||
- CI_MANAGERS="$TRAVIS_BUILD_DIR/travis-ci/managers"
|
||||
- VMTEST_ROOT="$TRAVIS_BUILD_DIR/travis-ci/vmtest"
|
||||
- REPO_ROOT="$TRAVIS_BUILD_DIR"
|
||||
- GIT_FETCH_DEPTH=64
|
||||
- VMTEST_SETUPCMD="PROJECT_NAME=${PROJECT_NAME} ./${PROJECT_NAME}/travis-ci/vmtest/run_selftests.sh"
|
||||
jobs:
|
||||
# Setup command override.
|
||||
@@ -37,8 +36,7 @@ before_script:
|
||||
- sudo apt-get -qq update
|
||||
- sudo apt-get -y install dwarves=1.15-1
|
||||
- sudo apt-get -qq -y install clang-10 lld-10 llvm-10
|
||||
- if [[ "${KERNEL}" = 'LATEST' ]]; then ${VMTEST_ROOT}/build_latest_kernel.sh travis-ci/vmtest/bpf-next; fi
|
||||
- ${VMTEST_ROOT}/prepare_selftests.sh travis-ci/vmtest/bpf-next
|
||||
- KERNEL="${KERNEL}" ${VMTEST_ROOT}/prepare_selftests.sh travis-ci/vmtest/bpf-next
|
||||
# Escape whitespace characters.
|
||||
- setup_cmd=$(sed 's/\([[:space:]]\)/\\\1/g' <<< "${VMTEST_SETUPCMD}")
|
||||
- if [[ "${KERNEL}" = 'LATEST' ]]; then
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
|
||||
GIT_FETCH_DEPTH="${GIT_FETCH_DEPTH}" ${VMTEST_ROOT}/checkout_latest_kernel.sh $1
|
||||
cd $1
|
||||
cp ${VMTEST_ROOT}/configs/latest.config .config
|
||||
make -j $((4*$(nproc))) olddefconfig all
|
||||
@@ -17,8 +17,8 @@ if [ ! -d "${REPO_PATH}" ]; then
|
||||
cd ${REPO_PATH}
|
||||
git init
|
||||
git remote add bpf-next ${BPF_NEXT_ORIGIN}
|
||||
git fetch --depth ${GIT_FETCH_DEPTH} bpf-next
|
||||
git reset --hard ${LINUX_SHA}
|
||||
else
|
||||
cd ${REPO_PATH}
|
||||
for depth in 32 64 128; do
|
||||
git fetch --depth ${depth} bpf-next
|
||||
git reset --hard ${LINUX_SHA} && break
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -1,11 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
GIT_FETCH_DEPTH="${GIT_FETCH_DEPTH}" ${VMTEST_ROOT}/checkout_latest_kernel.sh $1
|
||||
|
||||
REPO_PATH=$1
|
||||
|
||||
${VMTEST_ROOT}/checkout_latest_kernel.sh ${REPO_PATH}
|
||||
cd ${REPO_PATH}
|
||||
|
||||
if [[ "${KERNEL}" = 'LATEST' ]]; then
|
||||
cp ${VMTEST_ROOT}/configs/latest.config .config
|
||||
make -j $((4*$(nproc))) olddefconfig all
|
||||
fi
|
||||
|
||||
# Fix runqslower build
|
||||
# TODO(hex@): remove after the patch is merged from bpf to bpf-next tree
|
||||
cd $1
|
||||
wget https://lore.kernel.org/bpf/908498f794661c44dca54da9e09dc0c382df6fcb.1580425879.git.hex@fb.com/t.mbox.gz
|
||||
gunzip t.mbox.gz
|
||||
git apply t.mbox
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# An example of a script run on VM boot.
|
||||
# To execute it in TravisCI set VMTEST_SETUPCMD env var of .travis.yml in
|
||||
# libbpf root folder, e.g.
|
||||
# VMTEST_SETUPCMD="./${PROJECT_NAME}/travis-ci/vmtest/setup_example.sh"
|
||||
|
||||
if [ ! -z "${PROJECT_NAME}" ]; then
|
||||
echo "Running ${PROJECT_NAME} setup scripts..."
|
||||
fi
|
||||
echo "Hello, ${USER}!"
|
||||
Reference in New Issue
Block a user