summaryrefslogtreecommitdiffstats
path: root/iptables-test.py
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2020-11-17 16:18:33 +0100
committerPhil Sutter <phil@nwl.cc>2020-11-17 20:03:52 +0100
commit47251c8bda92b8f655453c52699454b739cc2231 (patch)
tree1aa6924dbc91382f70229b7358ad27eb31b0fd37 /iptables-test.py
parent55b7c71dce7144f4dc0297c17abf0f04879ee247 (diff)
iptables-test.py: Accept multiple test files on commandline
This allows to call the script like so: | # ./iptables-test.py -n extensions/libebt_*.t Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables-test.py')
-rwxr-xr-xiptables-test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/iptables-test.py b/iptables-test.py
index 6b6eb611..52897a5d 100755
--- a/iptables-test.py
+++ b/iptables-test.py
@@ -310,7 +310,7 @@ def show_missing():
#
def main():
parser = argparse.ArgumentParser(description='Run iptables tests')
- parser.add_argument('filename', nargs='?',
+ parser.add_argument('filename', nargs='*',
metavar='path/to/file.t',
help='Run only this test')
parser.add_argument('-H', '--host', action='store_true',
@@ -359,7 +359,7 @@ def main():
return
if args.filename:
- file_list = [args.filename]
+ file_list = args.filename
else:
file_list = [os.path.join(EXTENSIONS_PATH, i)
for i in os.listdir(EXTENSIONS_PATH)