Skip to content

Commit

Permalink
Merge pull request #2 from flba-eb/enable_all_tests
Browse files Browse the repository at this point in the history
Enable all tests
  • Loading branch information
flba-eb authored Jun 21, 2024
2 parents c98c626 + 7737010 commit aab8b32
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ jobs:
- name: test Zenoh
run: |
set -x
( cd zenoh && patch -p1 < ../zenoh-patch.diff )
sudo chown -R 1000 zenoh
time docker run \
-v $(realpath zenoh):/src \
-v $(realpath scripts):/scripts \
-e "CI_COMMAND=/scripts/setup_host.sh && /scripts/test-zenoh.sh --only-one-test" \
-e "CI_COMMAND=/scripts/setup_host.sh && /scripts/test-zenoh.sh" \
ghcr.io/flba-eb/ebcl_cicd_template:main
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ A container is created which contains a sysroot and image:
- Target is a QEMU image, simulating an aarch64 CPU
- Tests are executed on target using the script [run_on_target.sh](scripts/run_on_target.sh), which
uploads the file and runs it.
- WARNING: It only executes one (small) unit test to reduce the disk usage. Standard Github action runners run out of space otherwise.
- The zenoh build configuration is slightly changed to reduce disk space usage (especially debug symbols are disabled, see [patch](./zenoh-patch.diff) for details)
17 changes: 16 additions & 1 deletion scripts/test-zenoh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,24 @@ cd /src
ssh target "mkdir -p /tmp/test/a/b"
scp DEFAULT_CONFIG.json5 target:/tmp/test

# The runners sometimes run out of disk space, which is why it is monitored:
show_res_usage () {
set +ex
sleep 10
while true ; do
sleep 60
echo "$(echo ============ && df -h . && du -shc target/* && echo ============)"
done
}
show_res_usage &
RES_MONITOR=$!

# Run tests
if [[ "$*" == *"--only-one-test"* ]] ; then
# only run one small test, as we would run out of disk space otherwise (on standard Github action runners)
cd commons/zenoh-buffers
fi
cargo t --target aarch64-unknown-linux-gnu

cargo t --target aarch64-unknown-linux-gnu --no-run
kill $RES_MONITOR
cargo t --target aarch64-unknown-linux-gnu -j1
20 changes: 20 additions & 0 deletions zenoh-patch.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/Cargo.toml b/Cargo.toml
index 4e1c6299..bf7d6efc 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -204,8 +204,13 @@ zenoh-runtime = { version = "0.11.0", path = "commons/zenoh-runtime" }
zenoh-task = { version = "0.11.0", path = "commons/zenoh-task" }

[profile.dev]
-debug = true
-opt-level = 0
+debug = false
+debug-assertions = false
+lto = false
+#panic = "abort"
+strip = true
+incremental = false
+opt-level = "s"

[profile.fast]
inherits = "release"

0 comments on commit aab8b32

Please sign in to comment.