[*.py]
indent_style = space
indent_size = 4
+
+[*.sh]
+indent_style = space
+indent_size = 4
data_disk_path="$(virsh vol-path ${name}.raw --pool default)"
sudo mkfs.ext4 "$data_disk_path"
virt-install --print-xml \
- --name "$name" \
- --memory 2096\
- --disk /var/lib/libvirt/images/ipxe.iso,device=cdrom \
- --boot cdrom \
- --disk "$data_disk_path,format=raw" \
- --vcpus 2 \
- --cpu host \
- --serial pty \
- --graphics none \
- --autostart \
- --network bridge=br0 \
- --check path_in_use=off > "$tmp"
+ --name "$name" \
+ --memory 2096\
+ --disk /var/lib/libvirt/images/ipxe.iso,device=cdrom \
+ --boot cdrom \
+ --disk "$data_disk_path,format=raw" \
+ --vcpus 2 \
+ --cpu host \
+ --serial pty \
+ --graphics none \
+ --autostart \
+ --network bridge=br0 \
+ --check path_in_use=off > "$tmp"
virsh define --validate "$tmp"
virsh start "$name"
rm -rf "$tmp"
export TMPDIR
function checkout_scripts() {
- git clone https://github.com/lttng/lttng-ci.git "$SCRIPT_DIR"
+ git clone https://github.com/lttng/lttng-ci.git "$SCRIPT_DIR"
}
function setup_env ()
{
- mkdir -p "$RESULTS_DIR"
- virtualenv --python python3 "$VENV"
- set +u
- # shellcheck disable=SC1090
- . "${VENV}/bin/activate"
- set -u
- pip install -r "$REQUIREMENT_PATH"
+ mkdir -p "$RESULTS_DIR"
+ virtualenv --python python3 "$VENV"
+ set +u
+ # shellcheck disable=SC1090
+ . "${VENV}/bin/activate"
+ set -u
+ pip install -r "$REQUIREMENT_PATH"
}
function run_jobs ()
{
- python "$SCRIPT_PATH" --generate-jobs --repo-path "$SRC_DIR"
+ python "$SCRIPT_PATH" --generate-jobs --repo-path "$SRC_DIR"
}
function generate_report ()
{
- python "$SCRIPT_PATH" --generate-report --repo-path "$SRC_DIR" --report-name "${RESULTS_DIR}/babeltrace-benchmark.pdf"
+ python "$SCRIPT_PATH" --generate-report --repo-path "$SRC_DIR" --report-name "${RESULTS_DIR}/babeltrace-benchmark.pdf"
}
checkout_scripts
# Use bear to generate compile_commands.json when enabled
BEAR=""
if [ "$BABELTRACE_GEN_COMPILE_COMMANDS" = "yes" ]; then
- BEAR="bear"
+ BEAR="bear"
fi
# Create tmp directory
export CXX="c++"
if use_ccache; then
- CC="ccache $CC"
- CXX="ccache $CXX"
+ CC="ccache $CC"
+ CXX="ccache $CXX"
fi
# To make GDB find libcc1.so
print_tooling || true
if use_ccache; then
- ccache -c
+ ccache -c
fi
# This job has been seen generating cores in /tmp, filling and and causing
esac
if [ -d "$WORKSPACE/src/linux" ]; then
- export KERNELDIR="$WORKSPACE/src/linux"
+ export KERNELDIR="$WORKSPACE/src/linux"
fi
# Enter the source directory
COLOR_NONE='\033[0m' # No Color
print_blue() {
- echo -e "${COLOR_BLUE}$1${COLOR_NONE}"
+ echo -e "${COLOR_BLUE}$1${COLOR_NONE}"
}
print_hardware() {
echo "Version: $(head -n1 /etc/release)"
elif command -v sw_vers >/dev/null 2>&1; then
# For MacOS
- echo "Version: $(sw_vers -productName) $(sw_vers -productVersion)"
+ echo "Version: $(sw_vers -productName) $(sw_vers -productVersion)"
fi
echo -n "Kernel: "
if command -v cmake >/dev/null 2>&1; then
print_blue "cmake version"
- cmake --version
+ cmake --version
fi
print_blue "automake version"
if command -v asciidoc >/dev/null 2>&1; then
print_blue "asciidoc version"
- asciidoc --version
+ asciidoc --version
fi
if command -v xmlto >/dev/null 2>&1; then
print_blue "xmlto version"
- xmlto --version
+ xmlto --version
fi
if command -v openssl >/dev/null 2>&1; then
print_blue "openssl version"
- openssl version
+ openssl version
fi
if command -v pkg-config >/dev/null 2>&1; then
print_pkgconfig_mod libdw
print_pkgconfig_mod libelf
print_pkgconfig_mod libxml-2.0
- print_pkgconfig_mod msgpack
+ print_pkgconfig_mod msgpack
print_pkgconfig_mod popt
print_pkgconfig_mod uuid
print_pkgconfig_mod zlib
esac
if [ -d "$WORKSPACE/src/linux" ]; then
- export KERNELDIR="$WORKSPACE/src/linux"
+ export KERNELDIR="$WORKSPACE/src/linux"
fi
# Enter the source directory
# Use bear to generate compile_commands.json when enabled
BEAR=""
if [ "$LIBRSEQ_GEN_COMPILE_COMMANDS" = "yes" ]; then
- BEAR="bear"
+ BEAR="bear"
fi
# Create tmp directory
;;
*)
if [ "x$cc" != "x" ]; then
- export CC="$cc"
+ export CC="$cc"
fi
;;
esac
# Use bear to generate compile_commands.json when enabled
BEAR=""
if [ "$USERSPACE_RCU_GEN_COMPILE_COMMANDS" = "yes" ]; then
- BEAR="bear"
+ BEAR="bear"
fi
# Create tmp directory
;;
*)
if [ "x$cc" != "x" ]; then
- export CC="$cc"
+ export CC="$cc"
fi
;;
esac
# Use bear to generate compile_commands.json when enabled
BEAR=""
if [ "$LTTNG_TOOLS_GEN_COMPILE_COMMANDS" = "yes" ]; then
- BEAR="bear"
+ BEAR="bear"
fi
# Create tmp directory
;;
*)
if [ "x$cc" != "x" ]; then
- export CC="$cc"
+ export CC="$cc"
fi
;;
esac
if command -v $PYTHON2 >/dev/null 2>&1; then
P2_VERSION=$($PYTHON2 -c 'import sys;v = sys.version.split()[0].split("."); print("{}.{}".format(v[0], v[1]))')
DEPS_PYTHON2="$WORKSPACE/deps/build/$LIBDIR/python$P2_VERSION/site-packages"
- if [ "$LIBDIR" != "$LIBDIR_ARCH" ]; then
+ if [ "$LIBDIR" != "$LIBDIR_ARCH" ]; then
DEPS_PYTHON2="$DEPS_PYTHON2:$WORKSPACE/deps/build/$LIBDIR_ARCH/python$P2_VERSION/site-packages"
- fi
+ fi
fi
P3_VERSION=$($PYTHON3 -c 'import sys;v = sys.version.split()[0].split("."); print("{}.{}".format(v[0], v[1]))')
# the change id. We could also be clever and require that the
# "branch name" be included in the `Depends-on` clause.
local_query="${gerrit_url}/changes/?q=change:${gerrit_id}+branch:${GERRIT_BRANCH}${gerrit_query}"
- default_branch="${GERRIT_BRANCH}"
+ default_branch="${GERRIT_BRANCH}"
;;
*)
local_query="${gerrit_url}/changes/?q=change:${gerrit_id}${gerrit_query}"
- default_branch="master"
+ default_branch="master"
;;
esac
json_doc=$(curl "$local_query" | tail -n+2)
count=$(jq -r '. | length' <<< "$json_doc")
if [ "$count" != "1" ]; then
- echo "Expected an array of size 1 got $count"
- exit 1
+ echo "Expected an array of size 1 got $count"
+ exit 1
fi
ref=$(jq -r "$gerrit_json_query" <<< "$json_doc")
change_status=$(jq -r "$gerrit_json_query_status" <<< "$json_doc")
if [ "$change_status" == "MERGED" ]; then
- # When the change we depends on is merged use master as the ref.
- # This is not ideal CI time wise since we do not reuse artifacts.
- # This solve a tricky situation where we actually want to use master
- # instead of the change available on gerrit. Intermediary changes
- # present in master could have an impact on the change under test.
- echo "Depends-on change is MERGED. Defaulting to ${default_branch}"
- ref="refs/heads/$default_branch"
+ # When the change we depends on is merged use master as the ref.
+ # This is not ideal CI time wise since we do not reuse artifacts.
+ # This solve a tricky situation where we actually want to use master
+ # instead of the change available on gerrit. Intermediary changes
+ # present in master could have an impact on the change under test.
+ echo "Depends-on change is MERGED. Defaulting to ${default_branch}"
+ ref="refs/heads/$default_branch"
elif [ "$change_status" == "ABANDONED" ]; then
- # We have a situation where the "HEAD" commit for feature branch are
- # not merged and abandoned. Default to the master branch and hope
- # for the best. This is far from ideal but we need might also need
- # to find a better way to handle feature branch here. In the
- # meantime use master for such cases.
- echo "Depends-on change is ABANDONED. Defaulting to ${default_branch}"
- ref="refs/heads/${default_branch}"
+ # We have a situation where the "HEAD" commit for feature branch are
+ # not merged and abandoned. Default to the master branch and hope
+ # for the best. This is far from ideal but we need might also need
+ # to find a better way to handle feature branch here. In the
+ # meantime use master for such cases.
+ echo "Depends-on change is ABANDONED. Defaulting to ${default_branch}"
+ ref="refs/heads/${default_branch}"
fi
# The build.sh script from userspace-rcu expects the source to be located in
if [ "$project" = "userspace-rcu" ]; then
clone_directory="liburcu"
else
- clone_directory="$project"
+ clone_directory="$project"
fi
clone_directory="$WORKSPACE/src/$clone_directory"
# Make sure the coredump is finished using fuser
while fuser "$core_file"; do
sleep 1
- sleep_count+=1
+ sleep_count+=1
- # Skip the core file if it takes more than 30 seconds
- if [ "$sleep_count" -ge 30 ]; then
- continue
- fi
+ # Skip the core file if it takes more than 30 seconds
+ if [ "$sleep_count" -ge 30 ]; then
+ continue
+ fi
done
# Print a full backtrace of all threads
# the trace reader in its test suite or that we move to only supporting
# babeltrace2
if [ -x "$DEPS_BIN/babeltrace2" ]; then
- ln -s "$DEPS_BIN/babeltrace2" "$DEPS_BIN/babeltrace"
+ ln -s "$DEPS_BIN/babeltrace2" "$DEPS_BIN/babeltrace"
fi
# When using babeltrace2 make sure that it finds its plugins and
# Use bear to generate compile_commands.json when enabled
BEAR=""
if [ "$LTTNG_UST_GEN_COMPILE_COMMANDS" = "yes" ]; then
- BEAR="bear"
+ BEAR="bear"
fi
# Create tmp directory
;;
*)
if [ "x$cc" != "x" ]; then
- export CC="$cc"
+ export CC="$cc"
fi
;;
esac
# Explicitly add '--enable-java-agent-log4j2', it's not part of '-all' in stable 2.12/2.13
if verlt "$PACKAGE_VERSION" "2.14"; then
- CONF_OPTS+=("--enable-java-agent-log4j2")
+ CONF_OPTS+=("--enable-java-agent-log4j2")
fi
;;
count=$(lttng view | wc -l)
if [ $count -lt "100" ]; then
- false
+ false
fi
set -exu
git clone "$LTTNG_MODULES_REPO" src/lttng-modules && \
- cd src/lttng-modules && \
- git reset --hard "$LTTNG_MODULES_COMMIT_ID"
+ cd src/lttng-modules && \
+ git reset --hard "$LTTNG_MODULES_COMMIT_ID"