4f7f0f0986
This accomplishes a couple of things: 1. Now we don't perform these checks every single time we source autotest_common.sh (some 140 times) 2. We have some flexibility in changing parameters either during a test or when trying to do a specific compilation and calling this function to get the updated parameters. Signed-off-by: Seth Howell <seth.howell@intel.com> Change-Id: Ibbe2dc9113a56f651d41216e8557708824652442 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1784 Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
45 lines
828 B
Bash
Executable File
45 lines
828 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
|
|
|
|
./configure $(get_config_params) --disable-debug --enable-lto
|
|
$MAKE ${MAKEFLAGS}
|
|
$MAKE ${MAKEFLAGS} clean
|
|
|
|
timing_exit build_release
|
|
|
|
timing_finish
|