Skip to content

Commit

Permalink
Test: Fixed external process tests, replaced index.hu with localhost.
Browse files Browse the repository at this point in the history
  • Loading branch information
levy committed Mar 19, 2024
1 parent cd94f01 commit d3394c8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tests/module/ExternalProcess_1.test
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ scheduler-class = "inet::RealTimeScheduler"
*.externalProcess[*].printStdout = true

*.numProcesses = 1
*.externalProcess[0].command = "ping -c 1 index.hu"
*.externalProcess[0].command = "ping -c 1 localhost"
*.externalProcess[0].onExit = "terminateSimulation"

%#--------------------------------------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions tests/module/ExternalProcess_2.test
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ scheduler-class = "inet::RealTimeScheduler"
sim-time-limit = 1s

*.numProcesses = 1
*.externalProcess[0].command = "ping index.hu"
*.externalProcess[0].command = "ping localhost"

%#--------------------------------------------------------------------------------------------------------------
%contains-regex: stdout
64 bytes .*? icmp_seq=1 ttl=58 time=.*? ms
64 bytes .*? icmp_seq=1 ttl=64 time=.*? ms

%#--------------------------------------------------------------------------------------------------------------
%postrun-command: grep "undisposed object:" test.out > test_undisposed.out || true
Expand Down
8 changes: 4 additions & 4 deletions tests/module/ExternalProcess_3.test
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ ned-path = .;../../../../src
scheduler-class = "inet::RealTimeScheduler"

*.numProcesses = 2
*.externalProcess[0].command = "ping index.hu"
*.externalProcess[0].command = "ping localhost"
*.externalProcess[0].onExit = "terminateSimulation"
*.externalProcess[1].command = "killall ping"
*.externalProcess[1].startTime = 1s

%#--------------------------------------------------------------------------------------------------------------
%contains-regex: stdout
\*\* Event #1 t=0 TestNetwork.externalProcess\[0\] \(ExternalProcess, id=2\)
Starting process: ping index.hu
PING .*? 56 data bytes
64 bytes .*? icmp_seq=1 ttl=58 time=.*? ms
Starting process: ping localhost
PING localhost.*?
64 bytes .*? icmp_seq=1 ttl=64 time=.*? ms
\*\* Event #2 t=1 TestNetwork.externalProcess\[1\] \(ExternalProcess, id=3\)
Starting process: killall ping

Expand Down
10 changes: 5 additions & 5 deletions tests/module/ExternalProcess_4.test
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,25 @@ scheduler-class = "inet::RealTimeScheduler"
sim-time-limit = 1s

*.numProcesses = ${1,1,1,1}
*.externalProcess[0].command = "ping index.hu"
*.externalProcess[0].command = "ping localhost"

%#--------------------------------------------------------------------------------------------------------------
%contains-regex: stdout
Preparing for running configuration General, run #0...
.*?
64 bytes .*? icmp_seq=1 ttl=58 time=.*? ms
64 bytes .*? icmp_seq=1 ttl=64 time=.*? ms
.*?
Preparing for running configuration General, run #1...
.*?
64 bytes .*? icmp_seq=1 ttl=58 time=.*? ms
64 bytes .*? icmp_seq=1 ttl=64 time=.*? ms
.*?
Preparing for running configuration General, run #2...
.*?
64 bytes .*? icmp_seq=1 ttl=58 time=.*? ms
64 bytes .*? icmp_seq=1 ttl=64 time=.*? ms
.*?
Preparing for running configuration General, run #3...
.*?
64 bytes .*? icmp_seq=1 ttl=58 time=.*? ms
64 bytes .*? icmp_seq=1 ttl=64 time=.*? ms

%#--------------------------------------------------------------------------------------------------------------
%postrun-command: grep "undisposed object:" test.out > test_undisposed.out || true
Expand Down

0 comments on commit d3394c8

Please sign in to comment.