pingapp_lifecycle_8.test 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. %description:
  2. Test node shutdown followed by ping stop.
  3. %inifile: omnetpp.ini
  4. [General]
  5. network = Test
  6. tkenv-plugin-path = ../../../etc/plugins
  7. ned-path = .;../../../../src;../../lib
  8. cmdenv-express-mode = false
  9. #omnetpp 5.0 - 5.1 compatibility:
  10. eventlog-file = "${resultdir}/${configname}-${runnumber}.elog"
  11. output-scalar-file = "${resultdir}/${configname}-${runnumber}.sca"
  12. output-vector-file = "${resultdir}/${configname}-${runnumber}.vec"
  13. snapshot-file = "${resultdir}/${configname}-${runnumber}.sna"
  14. *.host.numPingApps = 1
  15. *.host.pingApp[0].destAddr = "192.168.0.42"
  16. *.host.pingApp[0].startTime = 0s
  17. *.host.pingApp[0].stopTime = 6s
  18. *.host.networkLayer.configurator.networkConfiguratorModule = ""
  19. **.hasStatus = true
  20. **.scenarioManager.script = xmldoc("scenario.xml")
  21. %file: test.ned
  22. import inet.node.inet.StandardHost;
  23. import inet.common.lifecycle.LifecycleController;
  24. import inet.common.scenario.ScenarioManager;
  25. network Test
  26. {
  27. submodules:
  28. scenarioManager: ScenarioManager;
  29. lifecycleController: LifecycleController;
  30. host: StandardHost;
  31. }
  32. %#--------------------------------------------------------------------------------------------------------------
  33. %file: scenario.xml
  34. <scenario>
  35. <at t="3.0">
  36. <tell module="lifecycleController" target="host" operation="NodeShutdownOperation"/>
  37. </at>
  38. </scenario>
  39. %#--------------------------------------------------------------------------------------------------------------
  40. %contains-regex: stdout
  41. \*\* Event #\d+ t=0 Test\.host\.pingApp\[0\] \(PingApp, id=\d+\)
  42. Starting up: dest=192\.168\.0\.42 src=<none>seqNo=0
  43. Sending ping request #0 to lower layer\.
  44. .*
  45. \*\* Event #\d+ t=2 Test\.host\.pingApp\[0\] \(PingApp, id=\d+\)
  46. Sending ping request #2 to lower layer\.
  47. .*
  48. \*\* Event #\d+ t=3 Test\.scenarioManager \(ScenarioManager, id=\d+\)
  49. processing <at> command\.\.\.
  50. processing <tell> command\.\.\.
  51. Doing stage 0/8 of operation inet::NodeShutdownOperation on Test\.host
  52. Test\.host shutting down
  53. .*
  54. Test\.host shut down
  55. <!> No more events
  56. %#--------------------------------------------------------------------------------------------------------------
  57. %not-contains: stdout
  58. undisposed object:
  59. %#--------------------------------------------------------------------------------------------------------------
  60. %not-contains: stdout
  61. -- check module destructor
  62. %#--------------------------------------------------------------------------------------------------------------