summaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-11-05 15:25:02 -0500
committerEric S. Raymond <esr@thyrsus.com>2013-11-05 15:26:21 -0500
commitbd0ffb3d68a514a7430973b295c4e0c2ec706184 (patch)
tree59b5029a17dd298a7c249e4f15d17cc4bd3b90c7 /devtools
parent9b6cbff43b557981c1f52d70c12b36164dbf8089 (diff)
downloadgpsd-bd0ffb3d68a514a7430973b295c4e0c2ec706184.tar.gz
Test machinery improvements. raw-regress is now only partially broken.
Diffstat (limited to 'devtools')
-rwxr-xr-xdevtools/striplog10
1 files changed, 8 insertions, 2 deletions
diff --git a/devtools/striplog b/devtools/striplog
index f3e21a48..d1c9fe11 100755
--- a/devtools/striplog
+++ b/devtools/striplog
@@ -11,12 +11,15 @@
import getopt, sys
secondline = firstline = False
-(options, arguments) = getopt.getopt(sys.argv[1:], "12")
+stripval = 0
+(options, arguments) = getopt.getopt(sys.argv[1:], "12n:")
for (switch, val) in options:
if (switch == '-1'):
firstline = True
if (switch == '-2'):
secondline = True
+ if (switch == '-n'):
+ stripval = int(val)
try:
if firstline:
@@ -24,6 +27,9 @@ try:
elif secondline:
sys.stdin.readline()
sys.stdin.readline()
+ elif stripval:
+ for _dummy in range(stripval):
+ sys.stdin.readline()
else:
while True:
line = sys.stdin.readline()
@@ -32,5 +38,5 @@ try:
sys.stdout.write(line)
sys.stdout.write(sys.stdin.read())
-except KeyBoardInterrupt:
+except KeyboardInterrupt:
pass