Skip to content

Commit

Permalink
Install HelloWorld example script [14086] (#17)
Browse files Browse the repository at this point in the history
* Refs #14086: Install HelloWorldExample.py

Signed-off-by: Eduardo Ponz <[email protected]>

* Refs #14086: Add shebang to example

Signed-off-by: Eduardo Ponz <[email protected]>

* Refs #14086: Failed tests so verbose output

Signed-off-by: Eduardo Ponz <[email protected]>
  • Loading branch information
EduPonz authored Mar 15, 2022
1 parent 1778cb1 commit a7c9aa3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ jobs:
--packages-select fastdds_python \
--event-handlers=console_direct+ \
--return-code-on-test-failure \
--ctest-args --timeout 60
--ctest-args \
--output-on-failure \
--timeout 60
- name: Upload Logs
uses: actions/upload-artifact@v1
Expand Down
5 changes: 4 additions & 1 deletion fastdds_python_examples/HelloWorldExample/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ set(${PROJECT_NAME}_MODULE_FILES
${PROJECT_NAME}.i
)

set(${PROJECT_NAME}_SCRIPT HelloWorldExample.py)
set(PACKAGE_NAME fastdds_python_examples)

SET_SOURCE_FILES_PROPERTIES(
${${PROJECT_NAME}_MODULE_FILES}
PROPERTIES CPLUSPLUS ON
Expand Down Expand Up @@ -113,4 +116,4 @@ install(TARGETS ${PROJECT_NAME}
install(TARGETS ${${PROJECT_NAME}_MODULE} DESTINATION ${PYTHON_MODULE_PATH})
get_property(support_files TARGET ${${PROJECT_NAME}_MODULE} PROPERTY SWIG_SUPPORT_FILES)
install(FILES ${support_files} DESTINATION ${PYTHON_MODULE_PATH})

install(PROGRAMS ${${PROJECT_NAME}_SCRIPT} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/${PACKAGE_NAME}/${PROJECT_NAME})
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima).
#!/usr/bin/env python3
# # Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -131,7 +132,7 @@ def __init__(self, domain, machine):
self.writer_qos = fastdds.DataWriterQos()
self.publisher.get_default_datawriter_qos(self.writer_qos)
self.writer = self.publisher.create_datawriter(self.topic, self.writer_qos, self.listener)

self.index = 0

def write(self):
Expand Down

0 comments on commit a7c9aa3

Please sign in to comment.