Skip to content
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
4ab0ba4
Adding some messages to improve debuggability
angelrti Jan 16, 2024
15fad25
printing only the name of the error instead of the enum element for e…
angelrti Jan 16, 2024
a57efcc
Update srcCxx/shape_main.cxx
angelrti Jan 16, 2024
ada7616
Adding preliminary port to micro
angelrti Feb 29, 2024
c5d4106
Fixing micro makefile
angelrti Jun 28, 2024
78ee44f
updating gitignore to allow idl files
angelrti Jun 28, 2024
e38d508
Merge branch 'master' into micro
angelrti Jun 28, 2024
adf7085
Fixing duplicated code from the master merge
angelrti Jun 28, 2024
7da104c
Adding additional configuration for micro 4
angelrti Jul 18, 2024
43e237a
Adding EOF to the pexpect interoperability report
angelrti Jul 22, 2024
c5c451d
Fixing test_color_receivers function
angelrti Jul 22, 2024
f4fb224
Merge branch 'master' into micro
angelrti Jul 22, 2024
be85a24
Incresed resource limits
angelrti Jul 22, 2024
ba1765e
Fixed Micro name in the generate_report
angelrti Jul 24, 2024
898631f
Fixing micro partitions
angelrti Jul 24, 2024
d8ff9e9
Merge branch 'master' into micro
angelrti Nov 25, 2025
ef3d06e
Adding support for micro 4.0.2
angelrti Dec 2, 2025
83e9312
Fix braces which caused some of the setting to not take effect for th…
arulmoondra1 Dec 2, 2025
1afc392
Disabled logging for Micro messages as they print a NUL char and fixe…
angelrti Dec 3, 2025
1344858
Printing 'not supported' messages only when enabling something that i…
angelrti Dec 11, 2025
e7139f5
Added a way of checking if a feature is not supported and report the …
angelrti Dec 11, 2025
5128c09
Added a way of identifying if the pub or sub is the one that does not…
angelrti Dec 15, 2025
f5b290b
Fixed issue when there are 0 tests to get the format color
angelrti Dec 16, 2025
d7ec022
Added multicast and use the default interface in micro
angelrti Dec 16, 2025
8ea07b2
Fixing debugging messages
angelrti Dec 17, 2025
0b666e0
Fixed the way in which process are stopped, now it shows the full log
angelrti Dec 17, 2025
f31cd8f
Added a basic check for received samples
angelrti Dec 17, 2025
d125be3
Fixed micro makefiles
angelrti Dec 19, 2025
5ff43fd
Fixed run_tests script and micro makefiles
angelrti Jan 12, 2026
bbf8a86
Changed the unsupported tests by supported tests
angelrti Jan 12, 2026
81496cf
Changed micro datatype to be bounded
angelrti Jan 13, 2026
727a723
Fixed resources limits for large data
angelrti Jan 13, 2026
451b469
Fixing an issue with micro instance_handle/color
angelrti Jan 14, 2026
d95223f
Updated basic_check function
angelrti Jan 22, 2026
2b5c663
Added some changes for Micro
angelrti Jan 22, 2026
5b45bc0
Removed duplicated error check
angelrti Jan 23, 2026
1b8ec2c
Added a way of configuring the datafrag size
angelrti Feb 2, 2026
cbc9ac3
Fixed potential memory leak when configuring micro
angelrti Feb 2, 2026
8a60559
Update shape_micro.idl name to shape_bounded.idl
angelrti Feb 6, 2026
7fe819a
Make the datafrag-size parameter optional since it wont be used in an…
angelrti Feb 6, 2026
384170c
Update gitignore to the new name shape_bounded
angelrti Feb 6, 2026
7c28491
NOT_ALIVE messages are now printed independently of the value of vali…
angelrti Feb 6, 2026
c86efce
Apply suggestions from code review
angelrti Feb 11, 2026
1587acb
Merge branch 'master' into micro
angelrti Feb 11, 2026
d1ce949
Fix missing brace after merge
angelrti Feb 11, 2026
fba7a84
Fixing merged code
angelrti Feb 11, 2026
74ae72e
Handle new cft parameter in micro
angelrti Feb 11, 2026
d6a9d38
Update srcCxx/shape_main.cxx
angelrti Feb 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,16 @@ GeneratedCode

# Generated files
srcCxx/shape.*
!srcCxx/shape.idl
srcCxx/shapePlugin.*
srcCxx/shapeSupport.*

# Generated files Connext Micro
srcCxx/shape_bounded.*
!srcCxx/shape_bounded.idl
srcCxx/shape_boundedPlugin.*
srcCxx/shape_boundedSupport.*

# VSCode default folders
.vscode/
build/
Expand Down
233 changes: 170 additions & 63 deletions generate_xlsx_report.py

Large diffs are not rendered by default.

95 changes: 65 additions & 30 deletions interoperability_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
if __name__ == "__main__" and platform.system() == "Darwin":
multiprocessing.set_start_method('fork')

from rtps_test_utilities import ReturnCode, log_message, no_check, remove_ansi_colors
from rtps_test_utilities import ReturnCode, log_message, basic_check, remove_ansi_colors

# This parameter is used to save the samples the Publisher sends.
# MAX_SAMPLES_SAVED is the maximum number of samples saved.
Expand All @@ -51,16 +51,19 @@ def stop_process(child_process, timeout=30, poll_interval=0.2):
else:
return True # Process already exited

start_time = time.time()
return_value = True

start_time = time.time()
while child_process.isalive() and (time.time() - start_time < timeout):
time.sleep(poll_interval)

if child_process.isalive():
child_process.terminate(force=True)
return False # Process was forcefully terminated
return_value = False # Process was forcefully terminated

child_process.expect(pexpect.EOF, timeout=5)

return True
return return_value

def run_subscriber_shape_main(
name_executable: str,
Expand Down Expand Up @@ -138,40 +141,51 @@ def run_subscriber_shape_main(
index = child_sub.expect(
[
'Create topic:', # index = 0
pexpect.TIMEOUT, # index = 1
pexpect.EOF # index = 2
re.compile('not supported', re.IGNORECASE), # index = 1
pexpect.TIMEOUT, # index = 2
pexpect.EOF # index = 3
],
timeout
)

if index == 1 or index == 2:
if index == 2 or index == 3:
produced_code[produced_code_index] = ReturnCode.TOPIC_NOT_CREATED
elif index == 1:
produced_code[produced_code_index] = ReturnCode.SUB_UNSUPPORTED_FEATURE
elif index == 0:
# Step 3: Check if the reader is created
log_message(f'Subscriber {subscriber_index}: Waiting for DataReader '
'creation', verbosity)
index = child_sub.expect(
[
'Create reader for topic:', # index = 0
pexpect.TIMEOUT, # index = 1
'failed to create content filtered topic' # index = 2
'failed to create content filtered topic', # index = 1
re.compile('not supported', re.IGNORECASE), # index = 2
pexpect.TIMEOUT, # index = 3
pexpect.EOF # index = 4

],
timeout
)

if index == 1:
if index == 3 or index == 4:
produced_code[produced_code_index] = ReturnCode.READER_NOT_CREATED
elif index == 2:
elif index == 1:
produced_code[produced_code_index] = ReturnCode.FILTER_NOT_CREATED
elif index == 2:
produced_code[produced_code_index] = ReturnCode.SUB_UNSUPPORTED_FEATURE
elif index == 0:
# Step 4: Read data or incompatible qos or deadline missed
log_message(f'Subscriber {subscriber_index}: Waiting for data', verbosity)
index = child_sub.expect(
[
'\[[0-9]+\]', # index = 0
r'\[[0-9]+\]', # index = 0
'on_requested_incompatible_qos()', # index = 1
'on_requested_deadline_missed()', # index = 2
pexpect.TIMEOUT, # index = 3
re.compile('not supported', re.IGNORECASE), # index = 3
pexpect.TIMEOUT, # index = 4
pexpect.EOF # index = 5

],
timeout
)
Expand All @@ -180,8 +194,10 @@ def run_subscriber_shape_main(
produced_code[produced_code_index] = ReturnCode.INCOMPATIBLE_QOS
elif index == 2:
produced_code[produced_code_index] = ReturnCode.DEADLINE_MISSED
elif index == 3:
elif index == 4 or index == 5:
produced_code[produced_code_index] = ReturnCode.DATA_NOT_RECEIVED
elif index == 3:
produced_code[produced_code_index] = ReturnCode.SUB_UNSUPPORTED_FEATURE
elif index == 0:
# Step 5: Receiving samples
log_message(f'Subscriber {subscriber_index}: Receiving samples',
Expand Down Expand Up @@ -277,43 +293,54 @@ def run_publisher_shape_main(
index = child_pub.expect(
[
'Create topic:', # index == 0
pexpect.TIMEOUT, # index == 1
pexpect.EOF # index == 2
re.compile('not supported', re.IGNORECASE), # index = 1
pexpect.TIMEOUT, # index == 2
pexpect.EOF # index == 3
],
timeout
)

if index == 1 or index == 2:
if index == 2 or index == 3:
produced_code[produced_code_index] = ReturnCode.TOPIC_NOT_CREATED
elif index == 1:
produced_code[produced_code_index] = ReturnCode.PUB_UNSUPPORTED_FEATURE
elif index == 0:
# Step 3: Check if the writer is created
log_message(f'Publisher {publisher_index}: Waiting for DataWriter '
'creation', verbosity)
index = child_pub.expect(
[
'Create writer for topic', # index = 0
pexpect.TIMEOUT # index = 1
re.compile('not supported', re.IGNORECASE), # index = 1
pexpect.TIMEOUT, # index = 2
pexpect.EOF # index == 3
],
timeout
)
if index == 1:
if index == 2 or index == 3:
produced_code[produced_code_index] = ReturnCode.WRITER_NOT_CREATED
elif index == 1:
produced_code[produced_code_index] = ReturnCode.PUB_UNSUPPORTED_FEATURE
elif index == 0:
# Step 4: Check if the writer matches the reader
log_message(f'Publisher {publisher_index}: Waiting for matching '
'DataReader', verbosity)
index = child_pub.expect(
[
'on_publication_matched()', # index = 0
pexpect.TIMEOUT, # index = 1
'on_offered_incompatible_qos' # index = 2
'on_offered_incompatible_qos', # index = 1
re.compile('not supported', re.IGNORECASE), # index = 2
pexpect.TIMEOUT, # index = 3
pexpect.EOF # index == 4
],
timeout
)
if index == 1:
if index == 3 or index == 4:
produced_code[produced_code_index] = ReturnCode.READER_NOT_MATCHED
elif index == 2:
elif index == 1:
produced_code[produced_code_index] = ReturnCode.INCOMPATIBLE_QOS
elif index == 2:
produced_code[produced_code_index] = ReturnCode.PUB_UNSUPPORTED_FEATURE
elif index == 0:
# In the case that the option -w is selected, the Publisher
# saves the samples sent in order, so the Subscriber can check
Expand All @@ -324,15 +351,19 @@ def run_publisher_shape_main(
if '-w ' in parameters or parameters.endswith('-w'):
# Step 5: Check whether the writer sends the samples
index = child_pub.expect([
'\[[0-9]+\]', # index = 0
r'\[[0-9]+\]', # index = 0
'on_offered_deadline_missed()', # index = 1
pexpect.TIMEOUT # index = 2
re.compile('not supported', re.IGNORECASE), # index = 2
pexpect.TIMEOUT, # index = 3
pexpect.EOF # index == 4
],
timeout)
if index == 1:
produced_code[produced_code_index] = ReturnCode.DEADLINE_MISSED
elif index == 2:
elif index == 3 or index == 4:
produced_code[produced_code_index] = ReturnCode.DATA_NOT_SENT
elif index == 2:
produced_code[produced_code_index] = ReturnCode.PUB_UNSUPPORTED_FEATURE
elif index == 0:
produced_code[produced_code_index] = ReturnCode.OK
log_message(f'Publisher {publisher_index}: Sending '
Expand All @@ -341,20 +372,24 @@ def run_publisher_shape_main(
for x in range(0, MAX_SAMPLES_SAVED, 1):
# At this point, at least one sample has been printed
# Therefore, that sample is added to samples_sent.
pub_string = re.search('[0-9]+ [0-9]+ \[[0-9]+\]',
pub_string = re.search(r'[0-9]+ [0-9]+ \[[0-9]+\]',
child_pub.before + child_pub.after)
last_sample = pub_string.group(0)
samples_sent.put(last_sample)
index = child_pub.expect([
'\[[0-9]+\]', # index = 0
r'\[[0-9]+\]', # index = 0
'on_offered_deadline_missed()', # index = 1
pexpect.TIMEOUT # index = 2
re.compile('not supported', re.IGNORECASE), # index = 2
pexpect.TIMEOUT # index = 3
],
timeout)
if index == 1:
produced_code[produced_code_index] = ReturnCode.DEADLINE_MISSED
break
elif index == 2:
produced_code[produced_code_index] = ReturnCode.PUB_UNSUPPORTED_FEATURE
break
elif index == 3:
produced_code[produced_code_index] = ReturnCode.DATA_NOT_SENT
break
last_sample_saved.put(last_sample)
Expand Down Expand Up @@ -811,7 +846,7 @@ def main():
raise RuntimeError('Cannot process function of '
f'test case: {test_case_name}')
else:
check_function = no_check
check_function = basic_check

assert(len(parameters) == len(expected_codes))

Expand Down
19 changes: 19 additions & 0 deletions rtps_test_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class ReturnCode(Enum):
DEADLINE_MISSED : Publisher/Subscriber missed the deadline period
ORDERED_ACCESS_INSTANCE : Subscriber reading with ordered access and access scope INSTANCE
ORDERED_ACCESS_TOPIC : Subscriber reading with ordered access and access scope TOPIC
PUB_UNSUPPORTED_FEATURE : The test requires a feature not supported by the publisher implementation
SUB_UNSUPPORTED_FEATURE : The test requires a feature not supported by the subscriber implementation
"""
OK = 0
TOPIC_NOT_CREATED = 1
Expand All @@ -44,6 +46,8 @@ class ReturnCode(Enum):
DEADLINE_MISSED = 14
ORDERED_ACCESS_INSTANCE = 15
ORDERED_ACCESS_TOPIC = 16
PUB_UNSUPPORTED_FEATURE = 17
SUB_UNSUPPORTED_FEATURE = 18

def log_message(message, verbosity):
if verbosity:
Expand All @@ -56,3 +60,18 @@ def remove_ansi_colors(text):

def no_check(child_sub, samples_sent, last_sample_saved, timeout):
return ReturnCode.OK

def basic_check(child_sub, samples_sent, last_sample_saved, timeout):
""" Only checks that the data is well formed and size is not zero."""
sub_string = re.search('\w\s+\w+\s+[0-9]+ [0-9]+ \[([0-9]+)\]',
child_sub.before + child_sub.after)

if sub_string is None:
return ReturnCode.DATA_NOT_RECEIVED

sample_size = int(sub_string.group(1))

if sample_size == 0:
return ReturnCode.DATA_NOT_CORRECT

return ReturnCode.OK
2 changes: 1 addition & 1 deletion run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ for i in $publisher; do
subscriber_name=$(basename "$j" _shape_main_linux)
echo "Testing Publisher $publisher_name --- Subscriber $subscriber_name"
extra_args=""
if [[ "${subscriber,,}" == *opendds* && "${publisher,,}" == *connext* ]]; then
if [[ "${subscriber_name,,}" == *opendds* && "${publisher_name,,}" == *connext_dds* ]]; then
extra_args="--periodic-announcement 5000"
fi;
if [[ -n $output ]]; then
Expand Down
89 changes: 89 additions & 0 deletions srcCxx/makefile_rti_connext_micro_linux
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
######################################################################
# To compile, type:
# make -f makefile_rti_connext_micro_linux
# To compile with the Debug option, use:
# make -f makefile_rti_connext_micro_linux DEBUG=1
#
# This makefile assumes that your build environment is already correctly
# configured. (For example, the correct version of your compiler and
# linker should be on your PATH.)
#
# You should set the environemnt variable RTIMEHOME to point to where
# RTI Connext Micro is installed.
#
######################################################################

# If undefined in the environment default RTIMEHOME to install dir
ifndef RTIMEHOME
$(error RTIMEHOME not defined)
endif

COMPILER_FLAGS = -m64
LINKER_FLAGS = -m64 -static-libgcc

split_path_name = $(subst /rti_, , $(RTIMEHOME))
# from connext_dds_micro-x.y.z remove _dds to get connext_micro-x.y.z
product_name = $(notdir $(split_path_name))
product_name := $(subst _dds,,$(product_name))

version_name = $(lastword $(product_name))
common_name = "_shape_main_linux"
executable_name = $(version_name)$(common_name)

RTIMEARCH = x64Linux4gcc7.3.0

ifndef COMPILER
COMPILER = g++
endif

ifndef LINKER
LINKER = g++
endif

SYSLIBS = -ldl -lnsl -lm -lpthread -lrt

ifeq ($(DEBUG),1)
COMPILER_FLAGS += -g -O0
LINKER_FLAGS += -g
LIBS = -L$(RTIMEHOME)/lib/$(RTIMEARCH) \
-lrti_me_cppzd -lrti_me_netiosdmzd \
-lrti_me_discdpdezd -lrti_me_ddsfilterzd -lrti_me_rhsmzd \
-lrti_me_whsmzd -lrti_mezd -lrti_me_ddsxtypeszd $(SYSLIBS)
else
# This option strips the executable symbols
LINKER_FLAGS += -s
LIBS = -L$(RTIMEHOME)/lib/$(RTIMEARCH) \
-lrti_me_cppz -lrti_me_netiosdmz \
-lrti_me_discdpdez -lrti_me_ddsfilterz -lrti_me_rhsmz \
-lrti_me_whsmz -lrti_mez -lrti_me_ddsxtypesz $(SYSLIBS)
endif

DEFINES = -DRTI_UNIX -DRTI_LINUX -DRTI_CONNEXT_MICRO

INCLUDES = -I. -I$(RTIMEHOME)/include -I$(RTIMEHOME)/include/rti_me

OBJDIR := objs/$(RTIMEARCH)_micro

CDRSOURCES := shape_bounded.idl
AUTOGENSOURCES := shape_boundedSupport.cxx shape_boundedPlugin.cxx shape_bounded.cxx

EXEC := $(executable_name)
AUTOGENOBJS := $(addprefix $(OBJDIR)/, $(AUTOGENSOURCES:%.cxx=%.o))

$(OBJDIR)/$(EXEC) : $(AUTOGENSOURCES) $(AUTOGENOBJS) $(OBJDIR)/shape_main.o
$(LINKER) $(LINKER_FLAGS) -o $@ $(OBJDIR)/shape_main.o $(AUTOGENOBJS) $(LIBS)

$(OBJDIR)/%.o : %.cxx
$(COMPILER) $(COMPILER_FLAGS) -o $@ $(DEFINES) $(INCLUDES) -c $<

shape_main.cxx : shape_configurator_rti_connext_micro.h

# Generate type-specific sources
$(AUTOGENSOURCES) : $(CDRSOURCES)
$(RTIMEHOME)/rtiddsgen/scripts/rtiddsgen $(CDRSOURCES) -replace -micro -language C++

$(AUTOGENOBJS): | objs/$(RTIMEARCH)_micro

objs/$(RTIMEARCH)_micro:
echo "Making directory objs/$(RTIMEARCH)_micro";
mkdir -p objs/$(RTIMEARCH)_micro
Loading