-
Notifications
You must be signed in to change notification settings - Fork 0
/
autobuild.sh
executable file
·74 lines (61 loc) · 1.85 KB
/
autobuild.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (C) 2015 Intel Corporation
# All rights reserved.
#
set -e
# 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
rootdir=$(readlink -f $(dirname $0))
source "$1"
source "$rootdir/test/common/autobuild_common.sh"
umask 022
cd $rootdir
# Print some test system info out for the log
date -u
git describe --tags
if [ $SPDK_RUN_ASAN -eq 1 ]; then
run_test "asan" echo "using asan"
fi
if [ $SPDK_RUN_UBSAN -eq 1 ]; then
run_test "ubsan" echo "using ubsan"
fi
if [ -n "$SPDK_TEST_NATIVE_DPDK" ]; then
run_test "build_native_dpdk" build_native_dpdk
fi
if [[ -z $SPDK_TEST_AUTOBUILD ]] || [[ $SPDK_TEST_AUTOBUILD == 'full' ]]; then
./configure $config_params
echo "** START ** Info for Hostname: $HOSTNAME"
uname -a
$MAKE cc_version
$MAKE cxx_version
echo "** END ** Info for Hostname: $HOSTNAME"
elif [[ $SPDK_TEST_AUTOBUILD != 'tiny' ]]; then
echo "ERROR: supported values for SPDK_TEST_AUTOBUILD are 'full' and 'tiny'"
exit 1
fi
if [[ $SPDK_TEST_OCF -eq 1 ]]; then
run_test "autobuild_ocf_precompile" ocf_precompile
fi
if [[ $SPDK_TEST_FUZZER -eq 1 ]]; then
run_test "autobuild_llvm_precompile" llvm_precompile
fi
if [[ -n $SPDK_TEST_AUTOBUILD ]]; then
run_test "autobuild" autobuild_test_suite $1
elif [[ $SPDK_TEST_UNITTEST -eq 1 ]]; then
run_test "unittest_build" unittest_build
elif [[ $SPDK_TEST_SCANBUILD -eq 1 ]]; then
run_test "scanbuild_make" scanbuild_make
else
if [[ $SPDK_TEST_FUZZER -eq 1 ]]; then
# if we are testing nvmf fuzz with llvm lib, --with-shared will cause lib link fail
./configure $config_params
else
# if we aren't testing the unittests, build with shared objects.
./configure $config_params --with-shared
fi
run_test "make" $MAKE $MAKEFLAGS
fi