A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
test-ns3.NS3ConfigureTestCase Class Reference

Test ns3 configuration options. More...

+ Inheritance diagram for test-ns3.NS3ConfigureTestCase:
+ Collaboration diagram for test-ns3.NS3ConfigureTestCase:

Public Member Functions

def setUp (self)
 Reuse cleaning/release configuration from NS3BaseTestCase if flag is cleaned.
 
def test_01_Examples (self)
 Test enabling and disabling examples.
 
def test_02_Tests (self)
 Test enabling and disabling tests.
 
def test_03_EnableModules (self)
 Test enabling specific modules.
 
def test_04_DisableModules (self)
 Test disabling specific modules.
 
def test_05_EnableModulesComma (self)
 Test enabling comma-separated (waf-style) examples.
 
def test_06_DisableModulesComma (self)
 Test disabling comma-separated (waf-style) examples.
 
def test_07_Ns3rc (self)
 Test loading settings from the ns3rc config file.
 
def test_08_DryRun (self)
 Test dry-run (printing commands to be executed instead of running them)
 
def test_09_PropagationOfReturnCode (self)
 Test if ns3 is propagating back the return code from the executables called with the run command.
 
def test_10_CheckConfig (self)
 Test passing 'show config' argument to ns3 to get the configuration table.
 
def test_11_CheckProfile (self)
 Test passing 'show profile' argument to ns3 to get the build profile.
 
def test_12_CheckVersion (self)
 Test passing 'show version' argument to ns3 to get the build version.
 
def test_13_Scratches (self)
 Test if CMake target names for scratches and ns3 shortcuts are working correctly.
 
def test_14_MpiCommandTemplate (self)
 Test if ns3 is inserting additional arguments by MPICH and OpenMPI to run on the CI.
 
def test_15_InvalidLibrariesToLink (self)
 Test if CMake and ns3 fail in the expected ways when:
 
def test_16_LibrariesContainingLib (self)
 Test if CMake can properly handle modules containing "lib", which is used internally as a prefix for module libraries.
 
def test_17_CMakePerformanceTracing (self)
 Test if CMake performance tracing works and produces the cmake_performance_trace.log file.
 
def test_18_CheckBuildVersionAndVersionCache (self)
 Check if ENABLE_BUILD_VERSION and version.cache are working as expected.
 
def test_19_FilterModuleExamplesAndTests (self)
 Test filtering in examples and tests from specific modules.
 
def test_20_CheckFastLinkers (self)
 Check if fast linkers LLD and Mold are correctly found and configured.
 
def test_21_ClangTimeTrace (self)
 Check if NS3_CLANG_TIMETRACE feature is working Clang's -ftime-trace plus ClangAnalyzer report.
 
def test_22_NinjaTrace (self)
 Check if NS3_NINJA_TRACE feature is working Ninja's .ninja_log conversion to about://tracing json format conversion with Ninjatracing.
 
def test_23_PrecompiledHeaders (self)
 Check if precompiled headers are being enabled correctly.
 
def test_24_CheckTestSettings (self)
 Check for regressions in test object build.
 
def test_25_CheckBareConfig (self)
 Check for regressions in a bare ns-3 configuration.
 
- Public Member Functions inherited from test-ns3.NS3BaseTestCase
def config_ok (self, return_code, stdout, stderr)
 Check if configuration for release mode worked normally.
 
def setUp (self)
 Clean configuration/build artifacts before testing configuration and build settings After configuring the build as release, check if configuration worked and check expected output files.
 

Public Attributes

 type
 python-based ns3rc template # noqa
 
- Public Attributes inherited from test-ns3.NS3BaseTestCase
 ns3_executables
 ns3_executables holds a list of executables in .lock-ns3 # noqa
 
 ns3_modules
 ns3_modules holds a list to the modules enabled stored in .lock-ns3 # noqa
 

Detailed Description

Test ns3 configuration options.

Definition at line 838 of file test-ns3.py.

Member Function Documentation

◆ setUp()

def test-ns3.NS3ConfigureTestCase.setUp (   self)

Reuse cleaning/release configuration from NS3BaseTestCase if flag is cleaned.

Returns
None

Reimplemented from test-ns3.NS3BaseTestCase.

Definition at line 843 of file test-ns3.py.

References test-ns3.NS3ConfigureTestCase.setUp().

Referenced by test-ns3.NS3ConfigureTestCase.setUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ test_01_Examples()

def test-ns3.NS3ConfigureTestCase.test_01_Examples (   self)

Test enabling and disabling examples.

Returns
None

Definition at line 850 of file test-ns3.py.

References test-ns3.NS3BaseTestCase.config_ok(), test-ns3.get_programs_list(), test-ns3.NS3BaseTestCase.ns3_executables, test-ns3.NS3BuildBaseTestCase.ns3_executables, test-ns3.NS3ExpectedUseTestCase.ns3_executables, and test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_02_Tests()

def test-ns3.NS3ConfigureTestCase.test_02_Tests (   self)

Test enabling and disabling tests.

Returns
None

Definition at line 873 of file test-ns3.py.

References test-ns3.NS3BaseTestCase.config_ok(), and test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_03_EnableModules()

def test-ns3.NS3ConfigureTestCase.test_03_EnableModules (   self)

Test enabling specific modules.

Returns
None

Definition at line 900 of file test-ns3.py.

References test-ns3.NS3BaseTestCase.config_ok(), test-ns3.get_enabled_modules(), test-ns3.NS3BaseTestCase.ns3_modules, test-ns3.NS3ExpectedUseTestCase.ns3_modules, and test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_04_DisableModules()

def test-ns3.NS3ConfigureTestCase.test_04_DisableModules (   self)

Test disabling specific modules.

Returns
None

Definition at line 932 of file test-ns3.py.

References test-ns3.NS3BaseTestCase.config_ok(), test-ns3.get_enabled_modules(), test-ns3.NS3BaseTestCase.ns3_modules, test-ns3.NS3ExpectedUseTestCase.ns3_modules, and test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_05_EnableModulesComma()

def test-ns3.NS3ConfigureTestCase.test_05_EnableModulesComma (   self)

Test enabling comma-separated (waf-style) examples.

Returns
None

Definition at line 956 of file test-ns3.py.

References test-ns3.NS3BaseTestCase.config_ok(), test-ns3.get_enabled_modules(), test-ns3.NS3BaseTestCase.ns3_modules, test-ns3.NS3ExpectedUseTestCase.ns3_modules, and test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_06_DisableModulesComma()

def test-ns3.NS3ConfigureTestCase.test_06_DisableModulesComma (   self)

Test disabling comma-separated (waf-style) examples.

Returns
None

Definition at line 980 of file test-ns3.py.

References test-ns3.NS3BaseTestCase.config_ok(), test-ns3.get_enabled_modules(), test-ns3.NS3BaseTestCase.ns3_modules, test-ns3.NS3ExpectedUseTestCase.ns3_modules, and test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_07_Ns3rc()

def test-ns3.NS3ConfigureTestCase.test_07_Ns3rc (   self)

Test loading settings from the ns3rc config file.

Returns
None

Definition at line 1004 of file test-ns3.py.

◆ test_08_DryRun()

def test-ns3.NS3ConfigureTestCase.test_08_DryRun (   self)

Test dry-run (printing commands to be executed instead of running them)

Returns
None

Definition at line 1164 of file test-ns3.py.

References test-ns3.cmake_build_target_command, test-ns3.get_programs_list(), and test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_09_PropagationOfReturnCode()

def test-ns3.NS3ConfigureTestCase.test_09_PropagationOfReturnCode (   self)

Test if ns3 is propagating back the return code from the executables called with the run command.

Returns
None

Definition at line 1220 of file test-ns3.py.

References NS_ABORT_IF, and test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_10_CheckConfig()

def test-ns3.NS3ConfigureTestCase.test_10_CheckConfig (   self)

Test passing 'show config' argument to ns3 to get the configuration table.

Returns
None

Definition at line 1295 of file test-ns3.py.

References test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_11_CheckProfile()

def test-ns3.NS3ConfigureTestCase.test_11_CheckProfile (   self)

Test passing 'show profile' argument to ns3 to get the build profile.

Returns
None

Definition at line 1304 of file test-ns3.py.

References test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_12_CheckVersion()

def test-ns3.NS3ConfigureTestCase.test_12_CheckVersion (   self)

Test passing 'show version' argument to ns3 to get the build version.

Returns
None

Definition at line 1313 of file test-ns3.py.

References test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_13_Scratches()

def test-ns3.NS3ConfigureTestCase.test_13_Scratches (   self)

Test if CMake target names for scratches and ns3 shortcuts are working correctly.

Returns
None

Definition at line 1328 of file test-ns3.py.

References list, test-ns3.run_ns3(), and test-ns3.run_program().

+ Here is the call graph for this function:

◆ test_14_MpiCommandTemplate()

def test-ns3.NS3ConfigureTestCase.test_14_MpiCommandTemplate (   self)

Test if ns3 is inserting additional arguments by MPICH and OpenMPI to run on the CI.

Returns
None

Definition at line 1425 of file test-ns3.py.

References test-ns3.get_programs_list(), list, and test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_15_InvalidLibrariesToLink()

def test-ns3.NS3ConfigureTestCase.test_15_InvalidLibrariesToLink (   self)

Test if CMake and ns3 fail in the expected ways when:

  • examples from modules or general examples fail if they depend on a library with a name shorter than 4 characters or are disabled when a library is nonexistent
  • a module library passes the configuration but fails to build due to a missing library
    Returns
    None

Definition at line 1482 of file test-ns3.py.

References test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_16_LibrariesContainingLib()

def test-ns3.NS3ConfigureTestCase.test_16_LibrariesContainingLib (   self)

Test if CMake can properly handle modules containing "lib", which is used internally as a prefix for module libraries.

Returns
None

Definition at line 1589 of file test-ns3.py.

References test-ns3.cmake_build_target_command, and test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_17_CMakePerformanceTracing()

def test-ns3.NS3ConfigureTestCase.test_17_CMakePerformanceTracing (   self)

Test if CMake performance tracing works and produces the cmake_performance_trace.log file.

Returns
None

Definition at line 1635 of file test-ns3.py.

References test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_18_CheckBuildVersionAndVersionCache()

def test-ns3.NS3ConfigureTestCase.test_18_CheckBuildVersionAndVersionCache (   self)

Check if ENABLE_BUILD_VERSION and version.cache are working as expected.

Returns
None

Definition at line 1656 of file test-ns3.py.

◆ test_19_FilterModuleExamplesAndTests()

def test-ns3.NS3ConfigureTestCase.test_19_FilterModuleExamplesAndTests (   self)

Test filtering in examples and tests from specific modules.

Returns
None

Definition at line 1738 of file test-ns3.py.

References test-ns3.NS3BaseTestCase.config_ok(), test-ns3.get_enabled_modules(), test-ns3.get_programs_list(), test-ns3.NS3BaseTestCase.ns3_executables, test-ns3.NS3BuildBaseTestCase.ns3_executables, test-ns3.NS3ExpectedUseTestCase.ns3_executables, test-ns3.NS3BaseTestCase.ns3_modules, test-ns3.NS3ExpectedUseTestCase.ns3_modules, and test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_20_CheckFastLinkers()

def test-ns3.NS3ConfigureTestCase.test_20_CheckFastLinkers (   self)

Check if fast linkers LLD and Mold are correctly found and configured.

Returns
None

Definition at line 1786 of file test-ns3.py.

References test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_21_ClangTimeTrace()

def test-ns3.NS3ConfigureTestCase.test_21_ClangTimeTrace (   self)

Check if NS3_CLANG_TIMETRACE feature is working Clang's -ftime-trace plus ClangAnalyzer report.

Returns
None

Definition at line 1853 of file test-ns3.py.

References test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_22_NinjaTrace()

def test-ns3.NS3ConfigureTestCase.test_22_NinjaTrace (   self)

Check if NS3_NINJA_TRACE feature is working Ninja's .ninja_log conversion to about://tracing json format conversion with Ninjatracing.

Returns
None

Definition at line 1912 of file test-ns3.py.

References test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_23_PrecompiledHeaders()

def test-ns3.NS3ConfigureTestCase.test_23_PrecompiledHeaders (   self)

Check if precompiled headers are being enabled correctly.

Returns
None

Definition at line 1999 of file test-ns3.py.

References test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_24_CheckTestSettings()

def test-ns3.NS3ConfigureTestCase.test_24_CheckTestSettings (   self)

Check for regressions in test object build.

Returns
None

Definition at line 2030 of file test-ns3.py.

References test-ns3.run_ns3().

+ Here is the call graph for this function:

◆ test_25_CheckBareConfig()

def test-ns3.NS3ConfigureTestCase.test_25_CheckBareConfig (   self)

Check for regressions in a bare ns-3 configuration.

Returns
None

Definition at line 2045 of file test-ns3.py.

References test-ns3.NS3BaseTestCase.config_ok(), and test-ns3.run_ns3().

+ Here is the call graph for this function:

Member Data Documentation

◆ type

test-ns3.NS3ConfigureTestCase.type

python-based ns3rc template # noqa

cmake-based ns3rc template # noqa

map ns3rc templates to types # noqa

type contains the ns3rc variant type (deprecated python-based or current cmake-based)

Definition at line 1038 of file test-ns3.py.


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