Skip to content

Commit b6eef9b

Browse files
build: allow configuring unit-tests
Now you can configure with --with-unit-tests Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
1 parent 38f2769 commit b6eef9b

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

build_scripts/build_spdk.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Options:
6969
--with-fio <FIO> Use given FIO path
7070
--without-fio Build without FIO
7171
--with-fio-dst <PATH> FIO install destination
72+
--with-unit-tests Enables the unit tests
7273
--log <no|tee*|silent> Output logging options
7374
--no-log Same as "--log no"
7475
-n, --dry-run Dry run
@@ -247,6 +248,11 @@ function detect_fio() {
247248
#fi
248249
}
249250

251+
function rm_configure_arg() {
252+
arg="$1"
253+
CONFIGURE_ARGS=($(printf "%s\n" "${CONFIGURE_ARGS[@]}" | grep -v "^$arg$"))
254+
}
255+
250256
function cmd_configure() {
251257
#
252258
# Making configure options.
@@ -489,6 +495,10 @@ do
489495
msg_info "With FIO install destination: $WITH_FIO_DST"
490496
shift
491497
;;
498+
"--with-unit-tests")
499+
rm_configure_arg "--disable-unit-tests"
500+
msg_info "With unit-tests"
501+
;;
492502
"--log")
493503
LOG_MODE=$1
494504
LOG_MODE_EXPLICIT="yes"
@@ -498,7 +508,7 @@ do
498508
LOG_MODE="no"
499509
LOG_MODE_EXPLICIT="yes"
500510
;;
501-
"-n" | "--dry-run")
511+
"-n" | "-d" | "--dry-run")
502512
DRY_RUN="yes"
503513
msg_info "Dry run is enabled"
504514
;;

0 commit comments

Comments
 (0)