Skip to content

Commit

Permalink
Update the job trigger-tests
Browse files Browse the repository at this point in the history
Signed-off-by: Rakshitha Kamath <[email protected]>
  • Loading branch information
rakshithakamath94 committed Jun 30, 2023
1 parent 94f394d commit 5b7bf1a
Show file tree
Hide file tree
Showing 12 changed files with 51 additions and 2,138 deletions.
64 changes: 27 additions & 37 deletions build_scripts/build-tests/build-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,27 @@ set -e
GIT_REPO="https://${GERRIT_HOST}/${GERRIT_PROJECT}"

# enable the Storage SIG for lttng-{tools,ust}-devel
yum -y install centos-release-nfs-ganesha28

# basic packages to install
xargs yum -y install <<< "
git
bison
cmake
dbus-devel
flex
gcc-c++
boost-devel
doxygen
redhat-lsb
git
krb5-devel
libacl-devel
libblkid-devel
libcap-devel
libnfsidmap-devel
libwbclient-devel
redhat-rpm-config
rpm-build
xfsprogs-devel
python2-devel
userspace-rcu-devel
lttng-tools-devel
lttng-ust-devel
gperftools-devel
gtest-devel
"
yum -y install centos-release-gluster yum-utils centos-release-ceph epel-release

BASE_PACKAGES="git bison flex cmake gcc-c++ libacl-devel krb5-devel dbus-devel rpm-build redhat-rpm-config libacl-devel libblkid-devel libcap-devel gperftools-devel gtest-devel"
BUILDREQUIRES_EXTRA="libnsl2-devel libnfsidmap-devel libwbclient-devel libcephfs-devel userspace-rcu-devel boost-devel doxygen xfsprogs-devel lttng-tools-devel lttng-ust-devel"

if [ "${CENTOS_VERSION}" = "7" ]; then
yum -y install libgfapi-devel
yum -y install ${BASE_PACKAGES} libnfsidmap-devel libwbclient-devel libcap-devel libblkid-devel userspace-rcu-devel userspace-rcu python2-devel
elif [ "${CENTOS_VERSION}" = "8s" ]; then
yum install -y ${BASE_PACKAGES} libacl-devel libblkid-devel libcap-devel redhat-rpm-config rpm-build libgfapi-devel xfsprogs-devel
yum install --enablerepo=powertools -y ${BUILDREQUIRES_EXTRA}
yum -y install selinux-policy-devel sqlite
elif [ "${CENTOS_VERSION}" = "9s" ]; then
yum install -y ${BASE_PACKAGES} libacl-devel libblkid-devel libcap-devel redhat-rpm-config rpm-build libgfapi-devel xfsprogs-devel
yum install --enablerepo=crb -y ${BUILDREQUIRES_EXTRA}
yum -y install selinux-policy-devel sqlite
fi

git clone --depth=1 ${GIT_REPO}
cd $(basename "${GERRIT_PROJECT}")
git fetch origin ${GERRIT_REFSPEC} && git checkout FETCH_HEAD
git fetch --depth=1 origin ${GERRIT_REFSPEC} && git checkout FETCH_HEAD

# update libntirpc
git submodule update --init || git submodule sync
Expand All @@ -55,18 +42,21 @@ git submodule update --init || git submodule sync
mkdir build
cd build

( cmake ../src -DCMAKE_BUILD_TYPE=Maintainer -DUSE_GTEST=ON -DUSE_FSAL_GLUSTER=OFF -DUSE_FSAL_CEPH=OFF -DUSE_FSAL_RGW=OFF -DUSE_DBUS=ON -DUSE_ADMIN_TOOLS=OFF && make) || touch FAILED
#( cmake ../src -DCMAKE_BUILD_TYPE=Maintainer -DUSE_GTEST=ON -DUSE_FSAL_GLUSTER=OFF -DUSE_FSAL_CEPH=OFF -DUSE_FSAL_RGW=OFF -DUSE_DBUS=ON -DUSE_ADMIN_TOOLS=OFF && make) || touch FAILED

cmake ../src -DCMAKE_BUILD_TYPE=Maintainer -DUSE_GTEST=ON -DUSE_FSAL_GLUSTER=OFF -DUSE_FSAL_CEPH=OFF -DUSE_FSAL_RGW=OFF -DUSE_DBUS=ON -DUSE_ADMIN_TOOLS=OFF && make
RET=$?

# we accept different return values
# 0 - SUCCESS + VOTE
# 1 - FAILED + VOTE
# 10 - SUCCESS + REPORT ONLY (NO VOTE)
# 11 - FAILED + REPORT ONLY (NO VOTE)

RET=10
if [ -e FAILED ]
then
RET=$[RET + 1]
fi
#RET=10
#if [ -e FAILED ]
#then
# RET=$[RET + 1]
#fi

exit ${RET}
2 changes: 1 addition & 1 deletion build_scripts/ganesha-build/basic-gluster-duffy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ ssh -t ${SSH_OPTIONS} root@${SERVER_IP} "CENTOS_VERSION='${CENTOS_VERSION}' CENT
RETURN_CODE=$?

#Copy the logs/rpms to the workspace
scp ${SSH_OPTIONS} -r root@${SERVER_IP}:/srv/nightly/libntirpc/next/${CENTOS_VERSION}/${CENTOS_ARCH} $WORKSPACE/
#scp ${SSH_OPTIONS} -r root@${SERVER_IP}:/srv/nightly/libntirpc/next/${CENTOS_VERSION}/${CENTOS_ARCH} $WORKSPACE/

exit $RETURN_CODE
Loading

0 comments on commit 5b7bf1a

Please sign in to comment.