Whamcloud - gitweb
LU-3249 tests: build POSIX test suite on FC18 44/7644/2
authorJian Yu <jian.yu@intel.com>
Fri, 13 Sep 2013 12:35:56 +0000 (20:35 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 24 Sep 2013 14:55:14 +0000 (14:55 +0000)
While building POSIX test suite, some required header files are
not in the /usr/include directory on Fedora 18 distribution. On
FC18, only arm-gp2x-linux-glibc-2.3.6-11.fc18.noarch.rpm contains
those header files. This patch links those header files to the
standard system directory so as to make the building pass.

Test-Parameters: envdefinitions=SLOW=yes \
clientdistro=fc18 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 testlist=posix

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: Idf622606d730d80a44e341bf7317dda37ea6bf82
Reviewed-on: http://review.whamcloud.com/7644
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Hudson
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/posix/posix.cfg

index 1f1408c..2f40b06 100644 (file)
@@ -98,22 +98,27 @@ prep() {
     [[ -f $TEST_BIN ]] && rm -f $TEST_BIN
     [[ -d $INSTALL_DIR ]] && rm -rf $INSTALL_DIR
 
     [[ -f $TEST_BIN ]] && rm -f $TEST_BIN
     [[ -d $INSTALL_DIR ]] && rm -rf $INSTALL_DIR
 
-    if grep -q " 6." /etc/issue; then
-        [[ -d /usr/include/bits ]] || mkdir -p /usr/include/bits
-        [[ -d /usr/include/sys ]] || mkdir -p /usr/include/sys
-        [[ -s /usr/include/stropts.h ]] || \
-            ln -s /usr/lib/x86_64-redhat-linux5E/include/stropts.h \
-            /usr/include/stropts.h
-        [[ -s /usr/include/bits/stropts.h ]] || \
-            ln -s /usr/lib/x86_64-redhat-linux5E/include/bits/stropts.h \
-            /usr/include/bits/stropts.h
-        [[ -s /usr/include/bits/xtitypes.h ]] || \
-            ln -s /usr/lib/x86_64-redhat-linux5E/include/bits/xtitypes.h \
-            /usr/include/bits/xtitypes.h
-        [[ -s /usr/include/sys/stropts.h ]] || \
-            ln -s /usr/lib/x86_64-redhat-linux5E/include/sys/stropts.h \
-            /usr/include/sys/stropts.h
-    fi
+       if egrep -q "CentOS|Red Hat|Fedora" /etc/issue; then
+               local prefix=/usr/lib/$(uname -m)-redhat-linux5E
+               if egrep -q "Fedora" /etc/issue; then
+                       prefix=/usr/arm-gp2x-linux
+               fi
+
+               [[ -d /usr/include/bits ]] || mkdir -p /usr/include/bits
+               [[ -d /usr/include/sys ]] || mkdir -p /usr/include/sys
+               [[ -s /usr/include/stropts.h ]] ||
+                       ln -s $prefix/include/stropts.h \
+                       /usr/include/stropts.h
+               [[ -s /usr/include/bits/stropts.h ]] ||
+                       ln -s $prefix/include/bits/stropts.h \
+                       /usr/include/bits/stropts.h
+               [[ -s /usr/include/bits/xtitypes.h ]] ||
+                       ln -s $prefix/include/bits/xtitypes.h \
+                       /usr/include/bits/xtitypes.h
+               [[ -s /usr/include/sys/stropts.h ]] ||
+                       ln -s $prefix/include/sys/stropts.h \
+                       /usr/include/sys/stropts.h
+       fi
 
     pushd $POSIX_SRC > /dev/null
 
 
     pushd $POSIX_SRC > /dev/null