autobuild.sh: do not use sudo to run make in external code test
Running the whole test_make.sh script with sudo causes "make" calls in script to also be run with sudo. This may result in "root" ownership of some of the output files, which in turn may affect subsequent autobuild.sh stages. Fixes #2426 Change-Id: I42cdc65153869076ad477d22d97e49d3ca4a9470 Signed-off-by: Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11885 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
3ee923eff1
commit
22e8fc83ed
@ -317,7 +317,7 @@ function build_doc() {
|
||||
|
||||
function autobuild_test_suite() {
|
||||
run_test "autobuild_check_format" ./scripts/check_format.sh
|
||||
run_test "autobuild_external_code" sudo -E --preserve-env=PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH $rootdir/test/external_code/test_make.sh $rootdir
|
||||
run_test "autobuild_external_code" $rootdir/test/external_code/test_make.sh $rootdir
|
||||
run_test "autobuild_check_so_deps" $rootdir/test/make/check_so_deps.sh $1
|
||||
./configure $config_params --without-shared
|
||||
$MAKE $MAKEFLAGS
|
||||
|
@ -23,36 +23,37 @@ make -C $SPDK_DIR -j$(nproc)
|
||||
|
||||
export SPDK_HEADER_DIR="$SPDK_DIR/include"
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$test_root/passthru"
|
||||
_sudo="sudo -E --preserve-env=PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
|
||||
|
||||
# The default target is to make both the app and bdev and link them against the combined SPDK shared library libspdk.so.
|
||||
run_test "external_make_hello_bdev_shared_combo" make -C $test_root hello_world_bdev_shared_combo
|
||||
run_test "external_run_hello_bdev_shared_combo" $test_root/hello_world/hello_bdev \
|
||||
run_test "external_run_hello_bdev_shared_combo" $_sudo $test_root/hello_world/hello_bdev \
|
||||
--json $test_root/hello_world/bdev_external.json -b TestPT
|
||||
|
||||
make -C $test_root clean
|
||||
|
||||
# Make just the application linked against the combined SPDK shared library libspdk.so.
|
||||
run_test "external_make_hello_no_bdev_shared_combo" make -C $test_root hello_world_no_bdev_shared_combo
|
||||
run_test "external_run_hello_no_bdev_shared_combo" $test_root/hello_world/hello_bdev \
|
||||
run_test "external_run_hello_no_bdev_shared_combo" $_sudo $test_root/hello_world/hello_bdev \
|
||||
--json $test_root/hello_world/bdev.json -b Malloc0
|
||||
|
||||
make -C $test_root clean
|
||||
|
||||
# Make both the application and bdev against individual SPDK shared libraries.
|
||||
run_test "external_make_hello_bdev_shared_iso" make -C $test_root hello_world_bdev_shared_iso
|
||||
run_test "external_run_hello_bdev_shared_iso" $test_root/hello_world/hello_bdev \
|
||||
run_test "external_run_hello_bdev_shared_iso" $_sudo $test_root/hello_world/hello_bdev \
|
||||
--json $test_root/hello_world/bdev_external.json -b TestPT
|
||||
|
||||
make -C $test_root clean
|
||||
|
||||
# Make just the application linked against individual SPDK shared libraries.
|
||||
run_test "external_make_hello_no_bdev_shared_iso" make -C $test_root hello_world_no_bdev_shared_iso
|
||||
run_test "external_run_hello_no_bdev_shared_iso" $test_root/hello_world/hello_bdev \
|
||||
run_test "external_run_hello_no_bdev_shared_iso" $_sudo $test_root/hello_world/hello_bdev \
|
||||
--json $test_root/hello_world/bdev.json -b Malloc0
|
||||
|
||||
# Make the basic NVMe driver linked against individual shared SPDK libraries.
|
||||
run_test "external_make_nvme_shared" make -C $test_root nvme_shared
|
||||
run_test "external_run_nvme_shared" $test_root/nvme/identify.sh
|
||||
run_test "external_run_nvme_shared" $_sudo $test_root/nvme/identify.sh
|
||||
|
||||
make -C $test_root clean
|
||||
|
||||
@ -62,19 +63,19 @@ make -C $SPDK_DIR -j$(nproc)
|
||||
|
||||
# Make both the application and bdev against individual SPDK archives.
|
||||
run_test "external_make_hello_bdev_static" make -C $test_root hello_world_bdev_static
|
||||
run_test "external_run_hello_bdev_static" $test_root/hello_world/hello_bdev \
|
||||
run_test "external_run_hello_bdev_static" $_sudo $test_root/hello_world/hello_bdev \
|
||||
--json $test_root/hello_world/bdev_external.json -b TestPT
|
||||
|
||||
make -C $test_root clean
|
||||
|
||||
# Make just the application linked against individual SPDK archives.
|
||||
run_test "external_make_hello_no_bdev_static" make -C $test_root hello_world_no_bdev_static
|
||||
run_test "external_run_hello_no_bdev_static" $test_root/hello_world/hello_bdev \
|
||||
run_test "external_run_hello_no_bdev_static" $_sudo $test_root/hello_world/hello_bdev \
|
||||
--json $test_root/hello_world/bdev.json -b Malloc0
|
||||
|
||||
# Make the basic NVMe driver statically linked against individual SPDK archives.
|
||||
run_test "external_make_nvme_static" make -C $test_root nvme_static
|
||||
run_test "external_run_nvme_static" $test_root/nvme/identify.sh
|
||||
run_test "external_run_nvme_static" $_sudo $test_root/nvme/identify.sh
|
||||
|
||||
make -C $test_root clean
|
||||
make -C $SPDK_DIR -j$(nproc) clean
|
||||
|
Loading…
Reference in New Issue
Block a user