From a15440b5ecba162fd44f6d6af9dc73145836a7e7 Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Thu, 19 Dec 2019 17:55:45 -0700 Subject: [PATCH] autobuild: move make install under run_test Change-Id: I0dcbbb05e90da8ad3760e68f5316ebc139bb03f8 Signed-off-by: Seth Howell Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478550 Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki Reviewed-by: Paul Luse Reviewed-by: Karol Latecki Tested-by: SPDK CI Jenkins --- autobuild.sh | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/autobuild.sh b/autobuild.sh index 2bbc6d326..a43b508b6 100755 --- a/autobuild.sh +++ b/autobuild.sh @@ -78,6 +78,20 @@ function header_dependency_check { fi } +function test_make_uninstall { + # Create empty file to check if it is not deleted by target uninstall + touch /tmp/spdk/usr/lib/sample_xyz.a + $MAKE $MAKEFLAGS uninstall DESTDIR=/tmp/spdk prefix=/usr + if [[ $(find /tmp/spdk/usr -maxdepth 1 -mindepth 1 | wc -l) -ne 2 ]] || [[ $(find /tmp/spdk/usr/lib/ -maxdepth 1 -mindepth 1 | wc -l) -ne 1 ]]; then + ls -lR /tmp/spdk + rm -rf /tmp/spdk + echo "Make uninstall failed" + exit 1 + else + rm -rf /tmp/spdk + fi +} + if [ $SPDK_RUN_VALGRIND -eq 1 ]; then run_test "valgrind" echo "using valgrind" fi @@ -113,28 +127,10 @@ fi run_test "autobuild_generated_files_check" porcelain_check run_test "autobuild_header_dependency_check" header_dependency_check +run_test "autobuild_make_install" $MAKE $MAKEFLAGS install DESTDIR=/tmp/spdk prefix=/usr +run_test "autobuild_make_uninstall" test_make_uninstall -# Test 'make install' -timing_enter make_install -$MAKE $MAKEFLAGS install DESTDIR=/tmp/spdk prefix=/usr -timing_exit make_install - -# Test 'make uninstall' -timing_enter make_uninstall -# Create empty file to check if it is not deleted by target uninstall -touch /tmp/spdk/usr/lib/sample_xyz.a -$MAKE $MAKEFLAGS uninstall DESTDIR=/tmp/spdk prefix=/usr -if [[ $(find /tmp/spdk/usr -maxdepth 1 -mindepth 1 | wc -l) -ne 2 ]] || [[ $(find /tmp/spdk/usr/lib/ -maxdepth 1 -mindepth 1 | wc -l) -ne 1 ]]; then - ls -lR /tmp/spdk - rm -rf /tmp/spdk - echo "Make uninstall failed" - exit 1 -else - rm -rf /tmp/spdk -fi -timing_exit make_uninstall - timing_enter doxygen if [ $SPDK_BUILD_DOC -eq 1 ] && hash doxygen; then $MAKE -C "$rootdir"/doc --no-print-directory $MAKEFLAGS &> "$out"/doxygen.log