From edafe76036036bebf1f2fbab7b4e7c66227d1c3e Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Sun, 22 Jan 2023 12:15:21 -0300 Subject: [PATCH] build: add new .ns3rc message and table asserts/logs setting status --- build-support/custom-modules/ns3-configtable.cmake | 12 +++++++++++- utils/tests/test-ns3.py | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/build-support/custom-modules/ns3-configtable.cmake b/build-support/custom-modules/ns3-configtable.cmake index 3b972d8fe..f1477774e 100644 --- a/build-support/custom-modules/ns3-configtable.cmake +++ b/build-support/custom-modules/ns3-configtable.cmake @@ -113,12 +113,18 @@ function(print_formatted_table_with_modules table_name modules output) endfunction() macro(write_configtable) - set(out "---- Summary of optional ns-3 features:\n") + set(out "---- Summary of ns-3 settings:\n") string(APPEND out "Build profile : ${build_profile}\n") string(APPEND out "Build directory : ${CMAKE_OUTPUT_DIRECTORY}\n" ) + string(APPEND out "Build with runtime asserts : ") + check_on_or_off("${NS3_ASSERT}" "${NS3_ASSERT}") + + string(APPEND out "Build with runtime logging : ") + check_on_or_off("${NS3_LOG}" "${NS3_LOG}") + string(APPEND out "Build version embedding : ") check_on_or_off("${NS3_ENABLE_BUILD_VERSION}" "${ENABLE_BUILD_VERSION}") @@ -211,4 +217,8 @@ macro(write_configtable) file(WRITE ${PROJECT_BINARY_DIR}/ns3config.txt ${out}) message(STATUS ${out}) + + if(NOT (${NS3RC} STREQUAL "NS3RC-NOTFOUND")) + message(STATUS "Applying configuration override from: ${NS3RC}") + endif() endmacro() diff --git a/utils/tests/test-ns3.py b/utils/tests/test-ns3.py index 91b4a1ace..2e9cce1e0 100755 --- a/utils/tests/test-ns3.py +++ b/utils/tests/test-ns3.py @@ -1173,7 +1173,7 @@ class NS3ConfigureTestCase(NS3BaseTestCase): """ return_code, stdout, stderr = run_ns3("show config") self.assertEqual(return_code, 0) - self.assertIn("Summary of optional ns-3 features", stdout) + self.assertIn("Summary of ns-3 settings", stdout) def test_11_CheckProfile(self): """!