Whamcloud - gitweb
LU-14653 tests: Correct include path for sanity-lnet test_300 00/43500/6
authorChris Horn <chris.horn@hpe.com>
Thu, 29 Apr 2021 17:45:56 +0000 (12:45 -0500)
committerOleg Drokin <green@whamcloud.com>
Mon, 21 Jun 2021 22:16:42 +0000 (22:16 +0000)
We need to supply an appropriate include path for sanity-lnet
test_300 when we're running in tree.

Test-Parameters: trivial testlist=sanity-lnet env=ONLY=300
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: Ia04a713ef6f1989507a77a618328d31f74d48e0d
Reviewed-on: https://review.whamcloud.com/43500
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-lnet.sh

index 485e105..8d232ff 100755 (executable)
@@ -2004,9 +2004,11 @@ test_300() {
        cleanup_lnet || exit 1
        load_lnet
 
+       local cc_args="-Wall -Werror -std=c99 -c -x c /dev/null -o $out"
        if ! [[ -d $prefix ]]; then
                # Assume we're running in tree and fixup the include path.
                prefix=$LUSTRE/../lnet/include/uapi/linux/lnet
+               cc_args+=" -I $LUSTRE/../lnet/include/uapi"
        fi
 
        for header in $prefix/*.h; do
@@ -2014,7 +2016,8 @@ test_300() {
                        continue
                fi
 
-               $CC -Wall -Werror -std=c99 -include $header -c -x c /dev/null -o $out ||
+               echo "$CC $cc_args -include $header"
+               $CC $cc_args -include $header ||
                        error "cannot compile '$header'"
        done
        rm -f $out