Skip to content

Commit

Permalink
DAOS-623 ci: Miscellaneous small FTest fixes (#1665)
Browse files Browse the repository at this point in the history
Fix python-debuginfo installation
Update Dockerfile for quickbuild
Move pre and post Functional Test cleanup to Jenkinsfile.
- This allows one to accumulate results when running locally for
  comparisons, etc.
Changes to support using ftest.sh by developers

Signed-off-by: Brian J. Murrell <brian.murrell@intel.com>
  • Loading branch information
brianjmurrell authored and jolivier23 committed Jan 8, 2020
1 parent 0424f35 commit 9d2ec57
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 22 deletions.
12 changes: 11 additions & 1 deletion Jenkinsfile
@@ -1,5 +1,5 @@
#!/usr/bin/groovy
/* Copyright (C) 2019 Intel Corporation
/* Copyright (C) 2019-2020 Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -1037,13 +1037,18 @@ pipeline {
test_tag=pr,-hw
fi
tnodes=$(echo $NODELIST | cut -d ',' -f 1-9)
rm -rf install/lib/daos/TESTING/ftest/avocado ./*_results.xml
mkdir -p install/lib/daos/TESTING/ftest/avocado/job-results
./ftest.sh "$test_tag" $tnodes''',
junit_files: "install/lib/daos/TESTING/ftest/avocado/*/*/*.xml install/lib/daos/TESTING/ftest/*_results.xml",
failure_artifacts: env.STAGE_NAME
}
post {
always {
sh '''rm -rf install/lib/daos/TESTING/ftest/avocado/*/*/html/
# Remove the latest avocado symlink directory to avoid inclusion in the
# jenkins build artifacts
unlink install/lib/daos/TESTING/ftest/avocado/job-results/latest
if [ -n "$STAGE_NAME" ]; then
rm -rf "$STAGE_NAME/"
mkdir "$STAGE_NAME/"
Expand Down Expand Up @@ -1120,13 +1125,18 @@ pipeline {
test_tag=pr,hw
fi
tnodes=$(echo $NODELIST | cut -d ',' -f 1-9)
rm -rf install/lib/daos/TESTING/ftest/avocado ./*_results.xml
mkdir -p install/lib/daos/TESTING/ftest/avocado/job-results
./ftest.sh "$test_tag" $tnodes''',
junit_files: "install/lib/daos/TESTING/ftest/avocado/*/*/*.xml install/lib/daos/TESTING/ftest/*_results.xml",
failure_artifacts: env.STAGE_NAME
}
post {
always {
sh '''rm -rf install/lib/daos/TESTING/ftest/avocado/*/*/html/
# Remove the latest avocado symlink directory to avoid inclusion in the
# jenkins build artifacts
unlink install/lib/daos/TESTING/ftest/avocado/job-results/latest
if [ -n "$STAGE_NAME" ]; then
rm -rf "$STAGE_NAME/"
mkdir "$STAGE_NAME/"
Expand Down
34 changes: 17 additions & 17 deletions ftest.sh
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (C) 2019 Intel Corporation
# Copyright (C) Copyright 2019-2020 Intel Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -86,8 +86,13 @@ cleanup() {
fi
fi
x=0
if grep \"# DAOS_BASE # added by ftest.sh\" /etc/fstab; then
nfs_mount=true
else
nfs_mount=false
fi
sudo sed -i -e \"/added by ftest.sh/d\" /etc/fstab
if [ -n \"$DAOS_BASE\" ]; then
if [ -n \"$DAOS_BASE\" ] && \$nfs_mount; then
while [ \$x -lt 30 ] &&
grep $DAOS_BASE /proc/mounts &&
! sudo umount $DAOS_BASE; do
Expand Down Expand Up @@ -124,10 +129,6 @@ if ${TEARDOWN_ONLY:-false}; then
exit 0
fi

# let's output to a dir in the tree
rm -rf install/lib/daos/TESTING/ftest/avocado ./*_results.xml
mkdir -p install/lib/daos/TESTING/ftest/avocado/job-results

trap 'set +e; cleanup' EXIT

CLUSH_ARGS=($CLUSH_ARGS)
Expand Down Expand Up @@ -173,14 +174,18 @@ fi
mkdir /var/run/daos_{agent,server}
chown \$current_username -R /var/run/daos_{agent,server}
chmod 0755 /var/run/daos_{agent,server}
mkdir -p $DAOS_BASE
ed <<EOF /etc/fstab
if [ -f $DAOS_BASE/SConstruct ]; then
echo \\\"No need to NFS mount $DAOS_BASE\\\"
else
mkdir -p $DAOS_BASE
ed <<EOF /etc/fstab
\\\\\\\$a
$NFS_SERVER:$PWD $DAOS_BASE nfs defaults 0 0 # added by ftest.sh
$NFS_SERVER:$PWD $DAOS_BASE nfs defaults 0 0 # DAOS_BASE # added by ftest.sh
.
wq
EOF
mount \\\"$DAOS_BASE\\\"\"
mount \\\"$DAOS_BASE\\\"
fi\"
# set up symlinks to spdk scripts (none of this would be
# necessary if we were testing from RPMs) in order to
Expand Down Expand Up @@ -219,7 +224,7 @@ args+=" $*"

# shellcheck disable=SC2029
# shellcheck disable=SC2086
if ! ssh $SSH_KEY_ARGS ${REMOTE_ACCT:-jenkins}@"${nodes[0]}" "set -ex
if ! ssh -A $SSH_KEY_ARGS ${REMOTE_ACCT:-jenkins}@"${nodes[0]}" "set -ex
ulimit -c unlimited
rm -rf $DAOS_BASE/install/tmp
mkdir -p $DAOS_BASE/install/tmp
Expand Down Expand Up @@ -352,10 +357,6 @@ else
rc=0
fi
# Remove the latest avocado symlink directory to avoid inclusion in the
# jenkins build artifacts
unlink $DAOS_BASE/install/lib/daos/TESTING/ftest/avocado/job-results/latest
# get stacktraces for the core files
if ls core.*; then
# this really should be a debuginfo-install command but our systems lag
Expand All @@ -364,8 +365,7 @@ if ls core.*; then
python_debuginfo_rpm=\"\${python_rpm/-/-debuginfo-}\"
if ! rpm -q \$python_debuginfo_rpm; then
sudo yum -y install \
http://debuginfo.centos.org/7/x86_64/\$python_debuginfo_rpm.rpm
sudo yum --enablerepo=\*debug\* -y install \$python_debuginfo_rpm
fi
sudo yum -y install gdb
for file in core.*; do
Expand Down
7 changes: 3 additions & 4 deletions utils/docker/Dockerfile.centos.7
@@ -1,4 +1,4 @@
# Copyright (C) 2018-2019 Intel Corporation
# Copyright (C) 2018-2020 Intel Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -123,9 +123,8 @@ enabled=1\n\
gpgcheck=False\n" >> /etc/yum.repos.d/$repo:$branch:$build_number.repo; \
done; \
pkgs="cart-devel$CART_COMMIT argobots-devel libpmem-devel \
libpmemobj-devel fuse-devel protobuf-c-devel \
spdk spdk-devel \
fio-3.3-5.el7 libisa-l-devel mercury-devel-1.0.1-19.el7 \
libpmemobj-devel fuse-devel protobuf-c-devel spdk-devel \
fio-3.3-5.el7 libisa-l-devel mercury-devel-1.0.1-21.el7 \
openpa-devel libfabric-devel \
dpdk-devel"; \
echo "Installing: $pkgs"; \
Expand Down

0 comments on commit 9d2ec57

Please sign in to comment.