Commit 81716ed1 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add test for source.sh, small fixes

parent 73bab906
......@@ -6,6 +6,7 @@
. ./functions.sh
# FIXME: why we still need detect KERNELVERSION from source???
# Heuristic
detect_kernel()
{
......@@ -33,11 +34,11 @@ check_build_module()
{
if [ -r "$BUILDDIR/$MODULEFILENAME" ] ; then
echo "$KERNELVERSION - OK"
BUILTLIST="$BUILTLIST---DONE"
BUILTLIST="$BUILTLIST $KERNELVERSION---DONE"
else
echo "can't locate built module $MODULEFILENAME"
echo "$KERNELVERSION - FAIL"
BUILTLIST="$BUILTLIST---FAILURE"
BUILTLIST="$BUILTLIST $KERNELVERSION---FAILURE"
fi
}
......@@ -55,7 +56,6 @@ check_build_module()
echo "Can't detect kernel version in $KERNSRC"
else
echo "Build for $KERNSRC (detected as $KERNELVERSION)"
BUILTLIST="$BUILTLIST $KERNELVERSION"
compile_module
check_build_module
fi
......
File mode changed from 100644 to 100755
# demo data
DATADIR=./
SRC_DIR=/usr/src/etercifs-5.5.0
MODULENAME=etercifs
......
#!/bin/sh
test()
{
while read distro version source ; do
ts=$(./source.sh $distro $version < source.table)
if [ "$ts" = "$source" ] ; then
res="OK"
else
[ -n "$ts" ] && res="NOT OK ($ts != $source)" || res="skip"
fi
printf "%20s %20s %10s %s\n" $distro $version $source "$res"
done
}
# test data
cat <<EOF | test
ALTLinux 2.6.32-ovz-el-alt147 centos60
Ubuntu 4.1.2.4 4.1
GosLinux 3.10.0-1 goslinux64
EOF
#!/bin/sh
PACKAGEINFO=./package.conf.devel
. ./buildmodule.sh
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment