summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2013-06-20 14:39:11 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2013-06-20 14:39:11 +0200
commitcaf3ac3de1848814554282370069dfdda820884c (patch)
treead60b6c8b1ebf9ce057f736d4b870abc1a1b8cd9
parent534f3bdafd46535a9a25194dc2fba7925346c961 (diff)
downloadneard-caf3ac3de1848814554282370069dfdda820884c.tar.gz
neard-caf3ac3de1848814554282370069dfdda820884c.tar.bz2
neard-caf3ac3de1848814554282370069dfdda820884c.zip
test: Check for dump-* scripts argument
Check that there at least is one argument and dump a usage example otherwise.
-rwxr-xr-xtest/dump-device4
-rwxr-xr-xtest/dump-record4
-rwxr-xr-xtest/dump-tag4
3 files changed, 12 insertions, 0 deletions
diff --git a/test/dump-device b/test/dump-device
index 58b090c..6eead93 100755
--- a/test/dump-device
+++ b/test/dump-device
@@ -3,6 +3,10 @@
import sys
import dbus
+if len(sys.argv) < 2:
+ print "Usage: %s /org/neard/nfcX" % (sys.argv[0])
+ sys.exit(1)
+
bus = dbus.SystemBus()
def extract_record(key, list):
diff --git a/test/dump-record b/test/dump-record
index 2b7c187..b4db2af 100755
--- a/test/dump-record
+++ b/test/dump-record
@@ -3,6 +3,10 @@
import sys
import dbus
+if len(sys.argv) < 2:
+ print "Usage: %s /org/neard/nfcN/tagT/recordR" % (sys.argv[0])
+ sys.exit(1)
+
def extract_list(list):
val = "["
for i in list:
diff --git a/test/dump-tag b/test/dump-tag
index efdd14f..01652ea 100755
--- a/test/dump-tag
+++ b/test/dump-tag
@@ -3,6 +3,10 @@
import sys
import dbus
+if len(sys.argv) < 2:
+ print "Usage: %s /org/neard/nfcN/tagT" % (sys.argv[0])
+ sys.exit(1)
+
bus = dbus.SystemBus()
def extract_list(list):