]> git.proxmox.com Git - ceph.git/blob - ceph/src/spdk/autopackage.sh
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / autopackage.sh
1 #!/usr/bin/env bash
2
3 set -xe
4
5 # If the configuration of tests is not provided, no tests will be carried out.
6 if [[ ! -f $1 ]]; then
7 echo "ERROR: SPDK test configuration not specified"
8 exit 1
9 fi
10
11 source "$1"
12
13 rootdir=$(readlink -f $(dirname $0))
14 source "$rootdir/test/common/autotest_common.sh"
15
16 out=$PWD
17
18 MAKEFLAGS=${MAKEFLAGS:--j16}
19 cd $rootdir
20
21 timing_enter porcelain_check
22 $MAKE clean
23
24 if [ $(git status --porcelain --ignore-submodules | wc -l) -ne 0 ]; then
25 echo make clean left the following files:
26 git status --porcelain --ignore-submodules
27 exit 1
28 fi
29 timing_exit porcelain_check
30
31 if [[ $RUN_NIGHTLY -eq 0 ]]; then
32 timing_finish
33 exit 0
34 fi
35
36 timing_enter build_release
37
38 if [ $(uname -s) = Linux ]; then
39 ./configure $(get_config_params) --disable-debug --enable-lto
40 else
41 # LTO needs a special compiler to work on BSD.
42 ./configure $(get_config_params) --disable-debug
43 fi
44 $MAKE ${MAKEFLAGS}
45 $MAKE ${MAKEFLAGS} clean
46
47 timing_exit build_release
48
49 timing_finish