From 86dd9696d3a1acb036d65909d93d73455b8aed3a Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Tue, 19 Feb 2008 14:54:17 +0200 Subject: Revert ubi-tools changes Restore ubi tools to their "original" state, which means to the state they were before I stareted cleaning them up. Instead, create a "new-utils" subdirectory and move my work there. Signed-off-by: Artem Bityutskiy --- ubi-utils/tests/runtests.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 ubi-utils/tests/runtests.sh (limited to 'ubi-utils/tests/runtests.sh') diff --git a/ubi-utils/tests/runtests.sh b/ubi-utils/tests/runtests.sh new file mode 100755 index 0000000..f993bc0 --- /dev/null +++ b/ubi-utils/tests/runtests.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +ubidev="$1" +ubiloadcmd="$2" +tests="mkvol_basic mkvol_bad mkvol_paral rsvol io_basic io_read io_update io_paral" + +if test -z "$ubidev" || test -z "$ubiloadcmd"; +then + echo "Usage:" + echo "$0 " + exit 1 +fi + +ubiname=`echo $ubidev | cut -d/ -f3` + +major=`cat /sys/class/ubi/$ubiname/dev | cut -d: -f1` + +for minor in `seq 0 4`; do + if test ! -e ${ubidev}_${minor} ; + then + mknod ${ubidev}_${minor} c $major $(($minor + 1)) + fi +done + +if ! test -c "$ubidev"; +then + echo "Error: $ubidev is not character device" + exit 1 +fi + +for t in `echo $tests`; +do + echo "Running $t $ubidev" + "./$t" "$ubidev" || exit 1 +done + +./integ "$ubiloadcmd" || exit 1 + +echo SUCCESS + +exit 0 -- cgit v1.2.3