[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/app/e2fsprogs/e2fsprogs-1.42.9/tests/test_one.in b/ap/app/e2fsprogs/e2fsprogs-1.42.9/tests/test_one.in
new file mode 100644
index 0000000..d053fd7
--- /dev/null
+++ b/ap/app/e2fsprogs/e2fsprogs-1.42.9/tests/test_one.in
@@ -0,0 +1,69 @@
+#!/bin/sh
+# run a single regression test
+
+LC_ALL=C
+export LC_ALL
+
+case "$1" in
+ --valgrind)
+ export USE_VALGRIND="valgrind -q --sim-hints=lax-ioctls"
+ shift;
+ ;;
+ --valgrind-leakcheck)
+ export USE_VALGRIND="valgrind --sim-hints=lax-ioctls --leak-check=full --show-reachable=yes --log-file=/tmp/valgrind-%p.log"
+ shift;
+ ;;
+esac
+
+case "$1" in
+ *.failed|*.new|*.ok|*.log|*.tmp) exit 0 ;;
+esac
+
+test_dir=$1
+cmd_dir=$SRCDIR
+
+if test "$TEST_CONFIG"x = x; then
+ TEST_CONFIG=$SRCDIR/test_config
+fi
+
+. $TEST_CONFIG
+
+TMPFILE=$(mktemp -t e2fsprogs-tmp.XXXXXX)
+
+test_name=`echo $test_dir | sed -e 's;.*/;;'`
+if [ -f $test_dir ] ; then
+ exit 0;
+fi
+if [ ! -d $test_dir ] ; then
+ echo "The test '$test_name' does not exist."
+ exit 0;
+fi
+if [ -z "`ls $test_dir`" ]; then
+ exit 0
+fi
+if [ -f $test_dir/name ]; then
+ test_description=`cat $test_dir/name`
+else
+ test_description=
+fi
+
+rm -f $test_name.ok $test_name.failed
+#echo -e -n "$test_name: $test_description:\r"
+
+if [ -f $test_dir/script ]; then
+ . $test_dir/script
+else
+ test_base=`echo $test_name | sed -e 's/_.*//'`
+ default_script=$SRCDIR/defaults/${test_base}_script
+ if [ -f $default_script ]; then
+ . $SRCDIR/defaults/${test_base}_script
+ else
+ echo "$test_name: Missing test script $default_script!"
+ fi
+ [ -f $test_name.failed ] && cat $test_name.failed
+fi
+
+if [ "$SKIP_UNLINK" != "true" ] ; then
+ rm -f $TMPFILE
+fi
+