A Discrete-Event Network Simulator
API
test-ns3.py File Reference

Go to the source code of this file.

Classes

class  test-ns3.NS3BaseTestCase
 Generic test case with basic function inherited by more complex tests. More...
 
class  test-ns3.NS3BuildBaseTestCase
 Tests ns3 regarding building the project. More...
 
class  test-ns3.NS3CommonSettingsTestCase
 ns3 tests related to generic options More...
 
class  test-ns3.NS3ConfigureBuildProfileTestCase
 ns3 tests related to build profiles More...
 
class  test-ns3.NS3ConfigureTestCase
 Test ns3 configuration options. More...
 
class  test-ns3.NS3ExpectedUseTestCase
 Tests ns3 usage in more realistic scenarios. More...
 
class  test-ns3.NS3UnusedSourcesTestCase
 ns-3 tests related to checking if source files were left behind, not being used by CMake More...
 

Namespaces

 test-ns3
 

Functions

def test-ns3.get_enabled_modules ()
 
def test-ns3.get_headers_list (outdir=usual_outdir)
 Gets a list of header files. More...
 
def test-ns3.get_libraries_list (lib_outdir=usual_lib_outdir)
 Gets a list of built libraries. More...
 
def test-ns3.get_programs_list ()
 Extracts the programs list from .lock-ns3. More...
 
def test-ns3.get_test_enabled ()
 Check if tests are enabled in the .lock-ns3. More...
 
def test-ns3.read_lock_entry (entry)
 Read interesting entries from the .lock-ns3 file. More...
 
def test-ns3.run_ns3 (args, env=None)
 Runs the ns3 wrapper script with arguments. More...
 
def test-ns3.run_program (program, args, python=False, cwd=ns3_path, env=None)
 Runs a program with the given arguments and returns a tuple containing (error code, stdout and stderr) More...
 

Variables

string test-ns3.cmake_build_project_command = "cmake --build . -j".format(ns3_path=ns3_path)
 
 test-ns3.cmake_build_target_command
 
 test-ns3.loader = unittest.TestLoader()
 
 test-ns3.ns3_lock_filename = os.path.join(ns3_path, ".lock-ns3_%s_build" % sys.platform)
 
 test-ns3.ns3_path = os.path.dirname(os.path.abspath(os.sep.join([__file__, "../../"])))
 
 test-ns3.ns3_script = os.sep.join([ns3_path, "ns3"])
 
 test-ns3.ns3rc_script = os.sep.join([ns3_path, ".ns3rc"])
 
string test-ns3.ns3rc_script_bak = ns3rc_script + ".bak"
 
 test-ns3.result = runner.run(suite)
 
 test-ns3.runner = unittest.TextTestRunner(failfast=True)
 
 test-ns3.suite = unittest.TestSuite()
 
 test-ns3.tests = dict(map(lambda x: (x._testMethodName, x), suite._tests))
 
 test-ns3.usual_lib_outdir = os.sep.join([usual_outdir, "lib"])
 
 test-ns3.usual_outdir = os.sep.join([ns3_path, "build"])