From: Tomas Racek <tracek@redhat.com>
To: xfs@oss.sgi.com
Cc: lczerner@redhat.com, Tomas Racek <tracek@redhat.com>
Subject: [PATCH] xfstests: Don't require to set $TEST_DEV and $TEST_DIR when creating new script
Date: Mon, 30 Jul 2012 14:03:31 +0200 [thread overview]
Message-ID: <1343649811-13944-1-git-send-email-tracek@redhat.com> (raw)
Signed-off-by: Tomas Racek <tracek@redhat.com>
---
common.config | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/common.config b/common.config
index 7bed1c5..b92c025 100644
--- a/common.config
+++ b/common.config
@@ -201,9 +201,9 @@ known_hosts()
# Mandatory Config values.
MC=""
- [ -z "$EMAIL" ] && MC="$MC EMAIL"
- [ -z "$TEST_DIR" ] && MC="$MC TEST_DIR"
- [ -z "$TEST_DEV" ] && MC="$MC TEST_DEV"
+ [ -z "$EMAIL" ] && MC="$MC EMAIL"
+ [ -z "$TEST_DIR" ] && [ "$iam" != "new" ] && MC="$MC TEST_DIR"
+ [ -z "$TEST_DEV" ] && [ "$iam" != "new" ] && MC="$MC TEST_DEV"
if [ -n "$MC" ]; then
echo "Warning: need to define parameters for host $HOST"
@@ -219,15 +219,17 @@ else
known_hosts
fi
-echo $TEST_DEV | grep -q ":" > /dev/null 2>&1
-if [ ! -b "$TEST_DEV" -a "$?" != "0" ]; then
- echo "common.config: Error: \$TEST_DEV ($TEST_DEV) is not a block device or a NFS filesystem"
- exit 1
-fi
-
-if [ ! -d "$TEST_DIR" ]; then
- echo "common.config: Error: \$TEST_DIR ($TEST_DIR) is not a directory"
- exit 1
+if [ "$iam" != "new" ]; then
+ echo $TEST_DEV | grep -q ":" > /dev/null 2>&1
+ if [ ! -b "$TEST_DEV" -a "$?" != "0" ]; then
+ echo "common.config: Error: \$TEST_DEV ($TEST_DEV) is not a block device or a NFS filesystem"
+ exit 1
+ fi
+
+ if [ ! -d "$TEST_DIR" ]; then
+ echo "common.config: Error: \$TEST_DIR ($TEST_DIR) is not a directory"
+ exit 1
+ fi
fi
# a btrfs tester will set only SCRATCH_DEV_POOL, we will put first of its dev
--
1.7.7.6
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2012-07-30 12:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-30 12:03 Tomas Racek [this message]
2012-07-30 21:56 ` [PATCH] xfstests: Don't require to set $TEST_DEV and $TEST_DIR when creating new script Dave Chinner
2012-07-31 10:41 ` Tomas Racek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1343649811-13944-1-git-send-email-tracek@redhat.com \
--to=tracek@redhat.com \
--cc=lczerner@redhat.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox