core, test: Print example-as-test as example-as-test, instead of examples

Avoids confusion regarding manually passing a test as a test-suite name (-s) or an actual example names (-e)
This commit is contained in:
Gabriel Ferreira
2025-06-30 16:24:30 +02:00
parent b8f5dbcab1
commit cdbb632c6a
2 changed files with 9 additions and 9 deletions

View File

@@ -790,11 +790,11 @@ TestRunnerImpl::PrintTestNameList(std::list<TestCase*>::const_iterator begin,
NS_LOG_FUNCTION(this << &begin << &end << printTestType);
std::map<TestSuite::Type, std::string> label;
label[TestSuite::Type::ALL] = "all ";
label[TestSuite::Type::UNIT] = "unit ";
label[TestSuite::Type::SYSTEM] = "system ";
label[TestSuite::Type::EXAMPLE] = "example ";
label[TestSuite::Type::PERFORMANCE] = "performance ";
label[TestSuite::Type::ALL] = "all ";
label[TestSuite::Type::UNIT] = "unit ";
label[TestSuite::Type::SYSTEM] = "system ";
label[TestSuite::Type::EXAMPLE] = "example-as-test ";
label[TestSuite::Type::PERFORMANCE] = "performance ";
for (auto i = begin; i != end; ++i)
{
@@ -813,7 +813,7 @@ TestRunnerImpl::PrintTestTypeList() const
{
NS_LOG_FUNCTION(this);
std::cout << " core: Run all TestSuite-based tests (exclude examples)" << std::endl;
std::cout << " example: Examples (to see if example programs run successfully)"
std::cout << " example-as-test: Examples (to see if example programs run successfully)"
<< std::endl;
std::cout
<< " performance: Performance Tests (check to see if the system is as fast as expected)"

View File

@@ -1408,8 +1408,8 @@ def run_tests():
standard_out = standard_out.decode()
list_items = standard_out.split("\n")
list_items.sort()
print("Test Type Test Name")
print("--------- ---------")
print("Test Type Test Name")
print("--------------- ---------")
for item in list_items:
if len(item.strip()):
print(item)
@@ -1425,7 +1425,7 @@ def run_tests():
python_examples_sorted.sort()
examples_sorted.extend(python_examples_sorted)
for item in examples_sorted:
print("example ", item)
print("example ", item)
print()
if args.kinds or args.list: