summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml8
-rw-r--r--esds/platform.py3
-rw-r--r--tests/api_log_5n/platform.yaml16
-rw-r--r--tests/api_send_eth0_3s1r/platform.yaml17
-rwxr-xr-xtests/run.sh4
5 files changed, 40 insertions, 8 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 87b164e..b9ee384 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,7 +5,7 @@ archlinux:
- pip install build
- pip install .
script:
- - ./tests/run.py
+ - ./tests/run.sh
debian:
image: "debian:latest"
@@ -15,7 +15,7 @@ debian:
- pip install build
- pip install .
script:
- - ./tests/run.py
+ - ./tests/run.sh
ubuntu:
image: "ubuntu:latest"
@@ -29,7 +29,7 @@ ubuntu:
- source myenv/bin/activate
- pip install .
script:
- - ./tests/run.py
+ - ./tests/run.sh
fedora:
image: "fedora:latest"
@@ -42,5 +42,5 @@ fedora:
- source myenv/bin/activate
- pip install .
script:
- - ./tests/run.py
+ - ./tests/run.sh
diff --git a/esds/platform.py b/esds/platform.py
index 6742e9d..873546f 100644
--- a/esds/platform.py
+++ b/esds/platform.py
@@ -160,9 +160,6 @@ class YAMLPlatformFile:
self.parsing_error("File "+file+" must be a python file")
for node in r:
self.default["implementations"][node]=path
- count = len(nodes["implementations"])
- if count > 1 and count != self.default["node_count"]:
- self.parsing_error("If more than one implementation is specified, each node implementation should be provided ("+str(self.default["node_count"])+" in total)")
else:
self.parsing_error("node implementation not provided")
##### Nodes arguments
diff --git a/tests/api_log_5n/platform.yaml b/tests/api_log_5n/platform.yaml
new file mode 100644
index 0000000..03e4416
--- /dev/null
+++ b/tests/api_log_5n/platform.yaml
@@ -0,0 +1,16 @@
+nodes:
+ count: 5
+ implementations:
+ - all node.py
+
+interfaces:
+ wlan0:
+ type: "wireless"
+ links:
+ - all 5bps 0s all
+ txperfs:
+ - all 5bps 0s
+ eth0:
+ type: "wired"
+ links:
+ - all 5Bps 0s all \ No newline at end of file
diff --git a/tests/api_send_eth0_3s1r/platform.yaml b/tests/api_send_eth0_3s1r/platform.yaml
new file mode 100644
index 0000000..7101548
--- /dev/null
+++ b/tests/api_send_eth0_3s1r/platform.yaml
@@ -0,0 +1,17 @@
+nodes:
+ count: 4
+ implementations:
+ - 0-2 sender.py
+ - 3 receiver.py
+
+interfaces:
+ wlan0:
+ type: "wireless"
+ links:
+ - all 1Bps 0s all
+ txperfs:
+ - all 1Bps 0s
+ eth0:
+ type: "wired"
+ links:
+ - all 1Bps 0s all \ No newline at end of file
diff --git a/tests/run.sh b/tests/run.sh
index c92187c..676d7c7 100755
--- a/tests/run.sh
+++ b/tests/run.sh
@@ -11,7 +11,9 @@ for test in ${tests}
do
printf "%-50s%s %s" "- $(basename $test)" "=>"
cd $test
- timeout $test_timeout ${pythonexec} simulator.py &> "$out"
+ testcmd="${pythonexec} simulator.py"
+ [ -e "platform.yaml" ] && testcmd="esds run platform.yaml"
+ timeout $test_timeout ${testcmd} &> "$out"
# Ensure timeout
if [ $? -eq 124 ]