-
- # parse the binary for available test commands
- stripped = 'not stripped' not in \
- subprocess.check_output(['file', self.binary])
- if not stripped:
- symbols = subprocess.check_output(['nm',
- self.binary]).decode('utf-8')
- avail_cmds = re.findall('test_register_(\w+)', symbols)
-
- if test_cmd not in avail_cmds:
- # notify user
- result = 0, "Skipped [Not compiled]", test_id, 0, "", None
- self.skipped.append(tuple(result))
- return False
+ if self.avail_cmds and test_cmd not in self.avail_cmds:
+ result = 0, "Skipped [Not compiled]", test_id, 0, "", None
+ self.skipped.append(tuple(result))
+ return False