Run all aimrt example (#42)

* run all examples of aimrt and generate the report

* Handle the runtime environment and dependencies.

* Format Check

---------

Co-authored-by: hanjun <hanjun@agibot.com>
This commit is contained in:
han J 2024-10-21 15:20:21 +08:00 committed by GitHub
parent 9d148527a4
commit f22a869be3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 26 additions and 29 deletions

View File

@ -0,0 +1,13 @@
# Adapt this config to your needs and rename it to e.g. roudi_config.toml
[general]
version = 1
[[segment]]
[[segment.mempool]]
size = 1024
count = 1000
[[segment.mempool]]
size = 2048
count = 500

View File

@ -1,4 +1,3 @@
#!/bin/bash
./aimrt_main --cfg_file_path=./cfg/examples_plugins_iceoryx_plugin_pb_chn_benchmark_pub_cfg.yaml

View File

@ -1,4 +1,3 @@
#!/bin/bash
./aimrt_main --cfg_file_path=./cfg/examples_plugins_iceoryx_plugin_pb_chn_benchmark_sub_cfg.yaml

View File

@ -1,4 +1,3 @@
#!/bin/bash
./aimrt_main --cfg_file_path=./cfg/examples_plugins_iceoryx_plugin_pb_chn_pub_cfg.yaml

View File

@ -1,4 +1,3 @@
#!/bin/bash
./aimrt_main --cfg_file_path=./cfg/examples_plugins_iceoryx_plugin_pb_chn_sub_cfg.yaml

View File

@ -1,4 +1,3 @@
#!/bin/bash
source install/share/example_ros2/local_setup.bash

View File

@ -1,4 +1,3 @@
#!/bin/bash
source install/share/example_ros2/local_setup.bash

View File

@ -1,4 +1,3 @@
#!/bin/bash
./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_pb_chn_benchmark_pub_cfg.yaml

View File

@ -1,4 +1,3 @@
#!/bin/bash
./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_pb_chn_benchmark_sub_cfg.yaml

View File

@ -1,4 +1,3 @@
#!/bin/bash
./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_pb_chn_pub_cfg.yaml

View File

@ -1,4 +1,3 @@
#!/bin/bash
./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_pb_chn_sub_cfg.yaml

View File

@ -1,4 +1,3 @@
#!/bin/bash
./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_pb_rpc_benchmark_client_cfg.yaml

View File

@ -1,4 +1,3 @@
#!/bin/bash
./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_pb_rpc_client_cfg.yaml

View File

@ -1,4 +1,3 @@
#!/bin/bash
./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_pb_rpc_server_cfg.yaml

View File

@ -1,4 +1,3 @@
#!/bin/bash
source install/share/example_ros2/local_setup.bash

View File

@ -1,4 +1,3 @@
#!/bin/bash
source install/share/example_ros2/local_setup.bash

View File

@ -1,4 +1,3 @@
#!/bin/bash
source install/share/example_ros2/local_setup.bash

View File

@ -1,4 +1,3 @@
#!/bin/bash
source install/share/example_ros2/local_setup.bash

View File

@ -30,7 +30,7 @@ test_items = [
# ------------------------------iceoryx_pb_chn---------------------------------------------
{
"script_path": [
"./iox-roudi",
"./iox-roudi --config-file=./cfg/roudi_config.toml",
"./start_examples_plugins_iceoryx_plugin_pb_chn_sub.sh",
"./start_examples_plugins_iceoryx_plugin_pb_chn_pub.sh",
],
@ -50,7 +50,7 @@ test_items = [
# ------------------------------iceoryx_ros2_chn---------------------------------------------
{
"script_path": [
"./iox-roudi",
"./iox-roudi --config-file=./cfg/roudi_config.toml",
"./start_examples_plugins_iceoryx_plugin_ros2_chn_sub.sh",
"./start_examples_plugins_iceoryx_plugin_ros2_chn_pub.sh",
],

View File

@ -31,7 +31,7 @@ class ExampleRunner:
if self.args.save is not None:
self.check_and_create_directory(self.args.save) # todo ...
subprocess.run(
["pip3", "install", "./aimrt_py_pkg/dist/aimrt_py-0.9.0-cp310-cp310-linux_x86_64.whl"],
["pip3", "install", "./aimrt_py_pkg/dist/aimrt_py-0.9.0-cp310-cp310-linux_x86_64.whl", "--force-reinstall"],
cwd=defualt_build_path,
)
subprocess.run(
@ -83,13 +83,13 @@ class ExampleRunner:
width = 65
report = f"""
{CYAN}{BOLD}
_____ _ ____ _
|_ _|__ ___| |_ | _ \\ ___ _ __ ___ _ __| |_ _
| |/ _ \\/ __| __| | |_) / _ \\ '_ \\ / _ \\| '__| __(_)
| | __/\\__ \\ |_ | _ < __/ |_) | (_) | | | |_ _
|_|\\___||___/\\__| |_| \\_\\___| .__/ \\___/|_| \\__(_)
|_|
{CYAN}{BOLD}
_____ _ ____ _
|_ _|__ ___| |_ | _ \ ___ _ __ ___ _ __| |_ _
| |/ _ \/ __| __| | |_) / _ \ '_ \ / _ \| '__| __(_)
| | __/\__ \ |_ | _ < __/ |_) | (_) | | | |_ _
|_|\___||___/\__| |_| \_\___| .__/ \___/|_| \__(_)
|_|
{RESET}
{YELLOW}{BOLD} Overall Result:{RESET}
{WHITE}{'Total tests:':<{width}}{CYAN}{total_tests}

View File

@ -6,7 +6,8 @@
# -i <string1> <string2> ... : ignore test tags, with logic is "OR" (default: None)
# -p : print test log to console (default: False), we don't suggest to use this option with n > 1
source ../../../build/install/share/ros2_plugin_proto/local_setup.bash
export PYTHONPATH=$(dirname "$(pwd)"):$PYTHONPATH
python3 ./run_all_example.py -n 20 -s "./test_log" -t "python"
python3 ./run_all_example.py -n 20 -s "./test_log" $@