summaryrefslogtreecommitdiff
path: root/tests/pdtest
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2014-04-13 19:57:43 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2014-04-13 22:00:26 +0200
commit6a15597a7b3f901b566b7bfc8c484a14e0fb6a11 (patch)
treeee7241fa022b1b77f61affd373ff8baddb92d404 /tests/pdtest
parent486858f7208207fb12a281640c5f6e9be4e4626f (diff)
downloadlibsigrokdecode-6a15597a7b3f901b566b7bfc8c484a14e0fb6a11.tar.gz
libsigrokdecode-6a15597a7b3f901b566b7bfc8c484a14e0fb6a11.zip
Rename 'probe' to 'channel' everywhere.
Variables of type 'struct srd_channel *' are consistently named 'pdch' to make them easily distinguishable from libsigrok's 'struct sr_channel *' variables that are consistently named 'ch'.
Diffstat (limited to 'tests/pdtest')
-rwxr-xr-xtests/pdtest14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/pdtest b/tests/pdtest
index ebfcb28..57a8b54 100755
--- a/tests/pdtest
+++ b/tests/pdtest
@@ -110,7 +110,7 @@ def parse_testfile(path, pd, tc, op_type, op_class):
raise E_syntax
pd_spec = {
'name': f.pop(0),
- 'probes': [],
+ 'channels': [],
'options': [],
}
while len(f):
@@ -122,12 +122,12 @@ def parse_testfile(path, pd, tc, op_type, op_class):
if '=' not in b:
raise E_syntax
opt, val = b.split('=')
- if a == 'probe':
+ if a == 'channel':
try:
val = int(val)
except:
raise E_syntax
- pd_spec['probes'].append([opt, val])
+ pd_spec['channels'].append([opt, val])
elif a == 'option':
pd_spec['options'].append([opt, val])
else:
@@ -314,8 +314,8 @@ def run_tests(tests, fix=False):
# Set up PD stack for this test.
for spd in tc['pdlist']:
args.extend(['-P', spd['name']])
- for label, probe in spd['probes']:
- args.extend(['-p', "%s=%d" % (label, probe)])
+ for label, channel in spd['channels']:
+ args.extend(['-p', "%s=%d" % (label, channel)])
for option, value in spd['options']:
args.extend(['-o', "%s=%s" % (option, value)])
args.extend(['-i', os.path.join(dumps_dir, tc['input'])])
@@ -448,8 +448,8 @@ def show_tests(tests):
print("Testcase: %s/%s" % (tc['pd'], tc['name']))
for pd in tc['pdlist']:
print(" Protocol decoder: %s" % pd['name'])
- for label, probe in pd['probes']:
- print(" Probe %s=%d" % (label, probe))
+ for label, channel in pd['channels']:
+ print(" Channel %s=%d" % (label, channel))
for option, value in pd['options']:
print(" Option %s=%d" % (option, value))
if 'stack' in tc: