* As we are replacing native_posix with native_sim, let's
refer to native_sim instead of native_posix in the comments
of why we have 1 extra interface.
* scripts/net/run-sample-tests.sh builds for native_sim now,
not native_posix => let's fix it
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix the correct path to net-tools directory.
Also default to Bash instead of /bin/sh as we use
Bash syntax.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Add a script to extract HTTP status values and format them
in a way that is both human readable and machine parseable.
Each line of output is of the form:
```
HTTP_{key}_{upper_val} = {key}, /**< val */
```
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Move actual test cases from the run-sample-tests.sh script to
the network samples directory that are supported by Docker based
testing. Each network sample directory that supports Docker testing,
will contain docker-test.sh script that is sourced by the runner
script. The docker-test.sh script will run the test as needed and
then return return value to the runner script.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add a way to run dumb_http_server_mt sample application against
HTTP get script (using curl) running in Docker.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Allow gPTP sample to be run via run-sample-tests.sh script.
This makes it possible to do simple smoke testing and verify that
gPTP stack is not broken.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The zeth interface was left hanging around when the test
finished but we can remove it here as it is not needed.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If environment variables ZEPHYR_BASE or NET_TOOLS_BASE are unset, an
incorrect message is printed saying that "it is set, but it is not a
directory":
$ZEPHYR_BASE is unset
$ZEPHYR_BASE is set, but it is not a directory
$NET_TOOLS_BASE is unset, no net-tools found
$NET_TOOLS_BASE set, but it is not a directory
This patch fixes that issue.
Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
Start SOCKS5 proxy in the net-tools Docker image and run MQTT TLS
tests with SOCKS enabled. Since the MQTT TLS server is already
running as of the previous test, start only the danted daemon.
Rely on mosquitto MQTT port being handled by the Docker image
configuration file instead of specifying it on the command line.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
In addition to the existing plain TCP MQTT test, add the same test
with TLS applied. Robert Lubos provided the updated test_cert.h, which
contains the same certificate as in the echo samples.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
The README file was in need of clarification how to set up the
net-tools Docker image and how the IP addresses were assigned.
mqtt_publisher is also mentioned.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
With net-tools and the mqtt_publisher sample updated, add support
for running the sample with the network sample test script.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
Enhance error reporting by returning immediately when the calling
function reports an error.
Signed-off-by: Andrei Laperie <andrei.laperie@intel.com>
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
Return the final return value from Docker script when running echo
client in the container, first for UDP and then TCP, for both IPv4
and IPv6.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
Add a script that sets up Docker networking and starts the net-tools
Docker container. If successful, run Zephyr with native_posix and
execute the appropriate net-tools container executable. The proper
net-tools executable and arguments is selected depending on the
basename of the sample directory. This script needs to be updated
if the net-tools Docker image is updated in some incompatible way.
The net-tools directory is assumed to exist at the same level as
the Zephyr base directory, but its location can be set using the
'-N' command line argument. Likewise, '-Z' sets the Zephyr top level
directory.
When stopping Zephyr, go through all child processes since running a
native posix or other variant of Zephyr may cause a hierarchy of
processes to be created.
Fixes: #19540
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>