caught up with latest gitlab commits, added a new tests directory leveraging pytest based tests for testing core functionality
This commit is contained in:
parent
2fc6345138
commit
14cb7dc251
14 changed files with 570 additions and 96 deletions
|
@ -457,6 +457,7 @@ class EmaneManager(ConfigurableManager):
|
|||
servers.append(s)
|
||||
self._objslock.release()
|
||||
|
||||
servers.sort(key=lambda x: x.name)
|
||||
for server in servers:
|
||||
if server.name == "localhost":
|
||||
continue
|
||||
|
@ -1139,6 +1140,24 @@ class EmaneManager(ConfigurableManager):
|
|||
|
||||
return True
|
||||
|
||||
def emanerunning(self, node):
|
||||
"""
|
||||
Return True if an EMANE process associated with the given node
|
||||
is running, False otherwise.
|
||||
"""
|
||||
status = -1
|
||||
cmd = ['pkill', '-0', '-x', 'emane']
|
||||
|
||||
try:
|
||||
if self.version < emane.EMANE092:
|
||||
status = subprocess.call(cmd)
|
||||
else:
|
||||
status = node.cmd(cmd, wait=True)
|
||||
except IOError:
|
||||
logger.exception("error checking if emane is running")
|
||||
|
||||
return status == 0
|
||||
|
||||
|
||||
class EmaneGlobalModel(EmaneModel):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue