d22233ac59
This is done in preparation for the RPM tests. Signed-off-by: Michal Berger <michalx.berger@intel.com> Change-Id: I93cd0d3d7ddeff54387e2a270e9713b2415845b0 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7142 Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot
51 lines
989 B
Bash
Executable File
51 lines
989 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -xe
|
|
|
|
# If the configuration of tests is not provided, no tests will be carried out.
|
|
if [[ ! -f $1 ]]; then
|
|
echo "ERROR: SPDK test configuration not specified"
|
|
exit 1
|
|
fi
|
|
|
|
source "$1"
|
|
|
|
rootdir=$(readlink -f $(dirname $0))
|
|
source "$rootdir/test/common/autotest_common.sh"
|
|
|
|
out=$PWD
|
|
|
|
MAKEFLAGS=${MAKEFLAGS:--j16}
|
|
cd $rootdir
|
|
|
|
timing_enter porcelain_check
|
|
$MAKE clean
|
|
|
|
if [ $(git status --porcelain --ignore-submodules | wc -l) -ne 0 ]; then
|
|
echo make clean left the following files:
|
|
git status --porcelain --ignore-submodules
|
|
exit 1
|
|
fi
|
|
timing_exit porcelain_check
|
|
|
|
if [[ $RUN_NIGHTLY -eq 0 ]]; then
|
|
timing_finish
|
|
exit 0
|
|
fi
|
|
|
|
timing_enter build_release
|
|
|
|
config_params="$(get_config_params | sed 's/--enable-debug//g')"
|
|
if [ $(uname -s) = Linux ]; then
|
|
./configure $config_params --enable-lto
|
|
else
|
|
# LTO needs a special compiler to work on BSD.
|
|
./configure $config_params
|
|
fi
|
|
$MAKE ${MAKEFLAGS}
|
|
$MAKE ${MAKEFLAGS} clean
|
|
|
|
timing_exit build_release
|
|
|
|
timing_finish
|