Whamcloud - gitweb
Need to remember that these tests are not just done "in-tree", they are also
authorbrian <brian>
Sat, 17 Jun 2006 22:05:32 +0000 (22:05 +0000)
committerbrian <brian>
Sat, 17 Jun 2006 22:05:32 +0000 (22:05 +0000)
done on properly installed (make install, rpm, etc.) lustre so...
When trying to install a modules, test if the module is in-tree and if not,
try to modprobe it.

lustre/tests/test-framework.sh

index 81f7fb0..4982979 100644 (file)
@@ -71,7 +71,13 @@ load_module() {
     module=$1
     shift
     BASE=`basename $module $EXT`
-    lsmod | grep ${BASE} > /dev/null || insmod ${LUSTRE}/${module}${EXT} $@
+    lsmod | grep -q ${BASE} || \
+      if [ -f ${LUSTRE}/${module}${EXT} ]; then
+        insmod ${LUSTRE}/${module}${EXT} $@
+    else
+        # must be testing a "make install" or "rpm" installation
+        modprobe $module $@
+    fi
 }
 
 load_modules() {