GNUnet  0.11.x
Public Member Functions | Data Fields
gnunet_testing.Test Class Reference
Inheritance diagram for gnunet_testing.Test:
[legend]
Collaboration diagram for gnunet_testing.Test:
[legend]

Public Member Functions

def __init__ (self, testname, verbose)
 
def add_peer (self, peer)
 
def p (self, msg)
 

Data Fields

 peers
 
 verbose
 
 name
 
 gnunetarm
 
 gnunetstatistics
 
 gnunetpeerinfo
 

Detailed Description

Definition at line 246 of file gnunet_testing.py.

Constructor & Destructor Documentation

◆ __init__()

def gnunet_testing.Test.__init__ (   self,
  testname,
  verbose 
)

Definition at line 247 of file gnunet_testing.py.

247  def __init__(self, testname, verbose):
248  self.peers = list()
249  self.verbose = verbose
250  self.name = testname
251  srcdir = "../.."
252  gnunet_pyexpect_dir = os.path.join(srcdir, "contrib/scripts")
253  if gnunet_pyexpect_dir not in sys.path:
254  sys.path.append(gnunet_pyexpect_dir)
255  self.gnunetarm = ''
256  self.gnunetstatistics = ''
257  if os.name == 'posix':
258  self.gnunetarm = 'gnunet-arm'
259  self.gnunetstatistics = 'gnunet-statistics'
260  self.gnunetpeerinfo = 'gnunet-peerinfo'
261  elif os.name == 'nt':
262  self.gnunetarm = 'gnunet-arm.exe'
263  self.gnunetstatistics = 'gnunet-statistics.exe'
264  self.gnunetpeerinfo = 'gnunet-peerinfo.exe'
265  if os.name == "nt":
266  shutil.rmtree(os.path.join(os.getenv("TEMP"), testname), True)
267  else:
268  shutil.rmtree("/tmp/" + testname, True)
269 
def __init__(self, test, cfg_file)
static int list
Set if we should print a list of currently running services.
Definition: gnunet-arm.c:69

Member Function Documentation

◆ add_peer()

def gnunet_testing.Test.add_peer (   self,
  peer 
)

Definition at line 270 of file gnunet_testing.py.

References GNUNET_DHT_TEST_Context.peers, GNUNET_CADET_TEST_Context.peers, GNUNET_CORE_Handle.peers, gnunet_testing.Test.peers, and ConsensusSession.peers.

270  def add_peer(self, peer):
271  self.peers.append(peer)
272 

◆ p()

def gnunet_testing.Test.p (   self,
  msg 
)

Definition at line 273 of file gnunet_testing.py.

References TestPublishOperation.verbose, TestDownloadOperation.verbose, LoggingHandle.verbose, and gnunet_testing.Test.verbose.

273  def p(self, msg):
274  if (self.verbose == True):
275  print(msg)
276 
277 
static struct GNUNET_OS_Process * p
Helper process we started.
Definition: gnunet-qr.c:59

Field Documentation

◆ peers

gnunet_testing.Test.peers

Definition at line 248 of file gnunet_testing.py.

Referenced by gnunet_testing.Test.add_peer().

◆ verbose

gnunet_testing.Test.verbose

Definition at line 249 of file gnunet_testing.py.

Referenced by gnunet_testing.Test.p().

◆ name

gnunet_testing.Test.name

Definition at line 250 of file gnunet_testing.py.

◆ gnunetarm

gnunet_testing.Test.gnunetarm

Definition at line 255 of file gnunet_testing.py.

◆ gnunetstatistics

gnunet_testing.Test.gnunetstatistics

Definition at line 256 of file gnunet_testing.py.

◆ gnunetpeerinfo

gnunet_testing.Test.gnunetpeerinfo

Definition at line 260 of file gnunet_testing.py.


The documentation for this class was generated from the following file: