diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-09-13 14:38:30 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-09-13 14:38:30 +0200 |
| commit | 17bfda379be17acb20abfb7f0c9231d36ef8766d (patch) | |
| tree | f263d1b37e223278e4b929460c7f4dc7798493ef /tests/breakpoints_auto_1n | |
| parent | b3cbb52f00e000277c3c74e1e9eab230d8b2d843 (diff) | |
Debug and improve tests
Diffstat (limited to 'tests/breakpoints_auto_1n')
| -rwxr-xr-x | tests/breakpoints_auto_1n/callback.py | 4 | ||||
| -rw-r--r-- | tests/breakpoints_auto_1n/platform.yaml | 22 | ||||
| -rwxr-xr-x | tests/breakpoints_auto_1n/simulator.py | 18 |
3 files changed, 26 insertions, 18 deletions
diff --git a/tests/breakpoints_auto_1n/callback.py b/tests/breakpoints_auto_1n/callback.py new file mode 100755 index 0000000..5c9c6bc --- /dev/null +++ b/tests/breakpoints_auto_1n/callback.py @@ -0,0 +1,4 @@ +#!/usr/bin/env python + +def callback(simulator): + simulator.log("Hello Callback!") diff --git a/tests/breakpoints_auto_1n/platform.yaml b/tests/breakpoints_auto_1n/platform.yaml new file mode 100644 index 0000000..e8d4750 --- /dev/null +++ b/tests/breakpoints_auto_1n/platform.yaml @@ -0,0 +1,22 @@ +general: + breakpoints_every: 3.3 + breakpoints_callback: + file: "callback.py" + callback: "callback" + +nodes: + count: 2 + implementations: + - all node.py + +interfaces: + wlan0: + type: "wireless" + links: + - all 2bps 0s all + txperfs: + - all 2bps 0s + eth0: + type: "wired" + links: + - all 2bps 0s all
\ No newline at end of file diff --git a/tests/breakpoints_auto_1n/simulator.py b/tests/breakpoints_auto_1n/simulator.py deleted file mode 100755 index ac24a03..0000000 --- a/tests/breakpoints_auto_1n/simulator.py +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env python - -# Load ESDS -import esds -import numpy as np - -n=2 -B=np.full((2,2),n) -L=np.full((2,2),0) -s=esds.Simulator({"wlan0":{"bandwidth":B, "latency":L, "is_wired":False}, "eth0":{"bandwidth":B, "latency":L, "is_wired":True}}) - -s.create_node("node") -s.create_node("node") - -def callback(simulator): - simulator.log("Hello Callback!") - -s.run(breakpoints_every=3.3,breakpoint_callback=callback) |
