[PATCH 7/7] fstests: environments - enable performance tests in ./check

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



Because performance tests can take longer and are usually not needed,
they won't run together with regression tests, but has to be enabled
using -performance flag. With it, only perf tests will run.

Signed-off-by: Jan Ťulák <jtulak@xxxxxxxxxx>
---
 check | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/check b/check
index c746d71..a80f69b 100755
--- a/check
+++ b/check
@@ -36,6 +36,7 @@ have_test_arg=false
 randomize=false
 export here=`pwd`
 xfile=""
+performance=false
 
 # start the initialisation work now
 iam=check
@@ -70,6 +71,7 @@ check options
     -nfs                test NFS
     -cifs               test CIFS
     -tmpfs              test TMPFS
+    -performance        performance tests
     -l			line mode diff
     -udiff		show unified diff (default)
     -n			show me, do not run tests
@@ -172,8 +174,11 @@ export_filtered_environments()
 get_group_list()
 {
 	grp=$1
-
-	for d in $SRC_GROUPS $FSTYP; do
+	tests="$SRC_GROUPS $FSTYP"
+	if $performance; then
+		tests="$SRC_GROUPS"
+	fi
+	for d in $tests; do
 		l=$(sed -n < $SRC_DIR/$d/group \
 			-e 's/#.*//' \
 			-e 's/$/ /' \
@@ -188,7 +193,11 @@ get_group_list()
 get_all_tests()
 {
 	touch $tmp.list
-	for d in $SRC_GROUPS $FSTYP; do
+	tests="$SRC_GROUPS $FSTYP"
+	if $performance; then
+		tests="$SRC_GROUPS"
+	fi
+	for d in $tests; do
 		ls $SRC_DIR/$d/* | \
 			grep -v "\..*" | \
 			grep "^$SRC_DIR/$d/$VALID_TEST_NAME"| \
@@ -291,6 +300,8 @@ while [ $# -gt 0 ]; do
 	-nfs)	FSTYP=nfs ;;
 	-cifs)	FSTYP=cifs ;;
 	-tmpfs)	FSTYP=tmpfs ;;
+	-performance)	SRC_GROUPS="performance";
+					performance=true;;
 
 	-g)	group=$2 ; shift ;
 		GROUP_LIST="$GROUP_LIST $group"
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux