Skip to content

Commit a7c9aa3

Browse files
authored
Install HelloWorld example script [14086] (#17)
* Refs #14086: Install HelloWorldExample.py Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com> * Refs #14086: Add shebang to example Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com> * Refs #14086: Failed tests so verbose output Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>
1 parent 1778cb1 commit a7c9aa3

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/build_and_test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ jobs:
122122
--packages-select fastdds_python \
123123
--event-handlers=console_direct+ \
124124
--return-code-on-test-failure \
125-
--ctest-args --timeout 60
125+
--ctest-args \
126+
--output-on-failure \
127+
--timeout 60
126128
127129
- name: Upload Logs
128130
uses: actions/upload-artifact@v1

fastdds_python_examples/HelloWorldExample/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ set(${PROJECT_NAME}_MODULE_FILES
6767
${PROJECT_NAME}.i
6868
)
6969

70+
set(${PROJECT_NAME}_SCRIPT HelloWorldExample.py)
71+
set(PACKAGE_NAME fastdds_python_examples)
72+
7073
SET_SOURCE_FILES_PROPERTIES(
7174
${${PROJECT_NAME}_MODULE_FILES}
7275
PROPERTIES CPLUSPLUS ON
@@ -113,4 +116,4 @@ install(TARGETS ${PROJECT_NAME}
113116
install(TARGETS ${${PROJECT_NAME}_MODULE} DESTINATION ${PYTHON_MODULE_PATH})
114117
get_property(support_files TARGET ${${PROJECT_NAME}_MODULE} PROPERTY SWIG_SUPPORT_FILES)
115118
install(FILES ${support_files} DESTINATION ${PYTHON_MODULE_PATH})
116-
119+
install(PROGRAMS ${${PROJECT_NAME}_SCRIPT} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/${PACKAGE_NAME}/${PROJECT_NAME})

fastdds_python_examples/HelloWorldExample/HelloWorldExample.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima).
1+
#!/usr/bin/env python3
2+
# # Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima).
23
#
34
# Licensed under the Apache License, Version 2.0 (the "License");
45
# you may not use this file except in compliance with the License.
@@ -131,7 +132,7 @@ def __init__(self, domain, machine):
131132
self.writer_qos = fastdds.DataWriterQos()
132133
self.publisher.get_default_datawriter_qos(self.writer_qos)
133134
self.writer = self.publisher.create_datawriter(self.topic, self.writer_qos, self.listener)
134-
135+
135136
self.index = 0
136137

137138
def write(self):

0 commit comments

Comments
 (0)