Skip to content

Commit b372805

Browse files
committed
Added option to modify the periodic announcements and changed the CFT for Connext
1 parent cdac979 commit b372805

File tree

7 files changed

+143
-54
lines changed

7 files changed

+143
-54
lines changed

.github/workflows/1_run_interoperability_tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,12 @@ jobs:
5858
for publisher in connext_dds-* ; do \
5959
if [ -e "$publisher" ]; then \
6060
for subscriber in * ; do \
61+
extra_args=""; \
62+
if [[ "${subscriber,,}" == *opendds* ]]; then \
63+
extra_args="--periodic-announcements 5000"; \
64+
fi; \
6165
echo "Testing Publisher $publisher --- Subscriber $subscriber"; \
62-
python3 ./../interoperability_report.py -P ./$publisher -S ./$subscriber -o=./../junit_interoperability_report.xml; \
66+
python3 ./../interoperability_report.py -P ./$publisher -S ./$subscriber -o=./../junit_interoperability_report.xml $extra_args; \
6367
if [ -d "./OpenDDS-durable-data-dir" ]; then \
6468
echo Deleting OpenDDS-durable-data-dir; \
6569
rm -rf ./OpenDDS-durable-data-dir; \

README.md

Lines changed: 44 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ The Shape application allows the following parameters:
191191
Default: 33ms
192192
--read-period <ms> : waiting period between 'read()' or 'take()' operations
193193
in ms. Default: 100ms
194-
--time-filter <interval> : apply 'time based filter' with interval
194+
--time-filter <interval> : apply 'time based filter' with interval
195195
in ms [0: OFF]
196196
--lifespan <int> : indicates the lifespan of a sample in ms
197197
--num-iterations <int>: indicates the number of iterations of the main loop
@@ -225,7 +225,8 @@ The Shape application allows the following parameters:
225225
large data)
226226
--take-read : uses take()/read() instead of take_next_instance()
227227
read_next_instance()
228-
228+
--periodic-announcement <ms> : indicates the periodic participant
229+
announcement period in ms. Default 0 (off)
229230
~~~
230231

231232
## Return Code
@@ -356,62 +357,72 @@ The `interoperability_report.py` may configure the following options:
356357
$ python3 interoperability_report.py -h
357358
358359
usage: interoperability_report.py [-h] -P publisher_executable_name -S subscriber_executable_name
359-
[-v] [-s test_suite_dictionary_file]
360-
[-t test_cases [test_cases ...] | -d
361-
test_cases_disabled
362-
[test_cases_disabled ...]] [-o filename]
360+
[-v] [-x {1,2}] [-a periodic_announcement_period]
361+
[-s test_suite_dictionary_file]
362+
[-t test_cases [test_cases ...] | -d test_cases_disabled [test_cases_disabled ...]]
363+
[-o filename]
363364
364-
Validation of interoperability of products compliant with OMG DDS-RTPS
365-
standard. This script generates automatically the verification between two
366-
shape_main executables. It also generates an XML report in JUnit format.
365+
Validation of interoperability of products compliant with OMG DDS-RTPS standard.
366+
This script generates automatically the verification between two shape_main
367+
executables. It also generates an XML report in JUnit format.
367368
368369
optional arguments:
369370
-h, --help show this help message and exit
370371
371372
general options:
372373
-P publisher_executable_name, --publisher publisher_executable_name
373-
Path to the Publisher shape_main application. It may
374-
be absolute or relative path. Example: if the
375-
executable is in the same folder as the script: "-P
376-
./rti_connext_dds-6.1.1_shape_main_linux".
374+
Path to the Publisher shape_main application. It may be
375+
absolute or relative path. Example: if the executable is
376+
in the same folder as the script:
377+
"-P ./rti_connext_dds-6.1.1_shape_main_linux".
377378
-S subscriber_executable_name, --subscriber subscriber_executable_name
378-
Path to the Subscriber shape_main application. It may
379-
be absolute or relative path. Example: if the
380-
executable is in the same folder as the script: "-S
381-
./rti_connext_dds-6.1.1_shape_main_linux".
379+
Path to the Subscriber shape_main application. It may be
380+
absolute or relative path. Example: if the executable is
381+
in the same folder as the script:
382+
"-S ./rti_connext_dds-6.1.1_shape_main_linux".
382383
383384
optional parameters:
384385
-v, --verbose Print debug information to stdout. This option also
385386
shows the shape_main application output in case of
386-
error. If this option is not used, only the test
387-
results are printed in the stdout. (Default: False).
387+
error. If this option is not used, only the test results
388+
are printed in the stdout.
389+
Default: False.
390+
-x {1,2}, --data-representation {1,2}
391+
Data Representation used if no provided when running the
392+
shape_main application. If this application already sets
393+
the data representation, this parameter is not used. The
394+
potential values are 1 for XCDR1 and 2 for XCDR2.
395+
Default value 2.
396+
-a periodic_announcement_period, --periodic-announcement periodic_announcement_ms
397+
Indicates the periodic participant announcement period in ms.
398+
Default: 0 (off).
388399
389400
Test Case and Test Suite:
390401
-s test_suite_dictionary_file, --suite test_suite_dictionary_file
391402
Test Suite that is going to be tested. Test Suite is a
392403
file with a Python dictionary defined. It must be
393-
located on the same directory as
394-
interoperability_report. This value should not contain
395-
the extension ".py", only the name of the file. It
396-
will run all the dictionaries defined in the file.
397-
(Default: test_suite).
404+
located on the same directory as interoperability_report.
405+
This value should not contain the extension ".py", only
406+
the name of the file. It will run all the dictionaries
407+
defined in the file.
408+
Default: test_suite.
398409
-t test_cases [test_cases ...], --test test_cases [test_cases ...]
399410
Test Case that the script will run. This option is not
400411
supported with --disable-test. This allows to set
401-
multiple values separated by a space. (Default: run
402-
all Test Cases from the Test Suite.)
412+
multiple values separated by a space.
413+
Default: run all Test Cases from the Test Suite.
403414
-d test_cases_disabled [test_cases_disabled ...], --disable-test test_cases_disabled [test_cases_disabled ...]
404-
Test Case that the script will skip. This allows to
405-
set multiple values separated by a space. This option
406-
is not supported with --test. (Default: None)
415+
Test Case that the script will skip. This allows to set
416+
multiple values separated by a space. This option is not
417+
supported with --test.
418+
Default: None
407419
408420
output options:
409421
-o filename, --output-name filename
410422
Name of the xml report that will be generated. If the
411-
file passed already exists, it will add the new
412-
results to it. In other case it will create a new
413-
file. (Default:
414-
<publisher_name>-<subscriber_name>-date.xml)
423+
file passed already exists, it will add the new results
424+
to it. In other case it will create a new file.
425+
Default: <publisher_name>-<subscriber_name>-date.xml
415426
```
416427

417428

doc/test_description.template.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ product versions.
6060

6161
* Content Filtered Topic expression created with single quotes around strings
6262
values
63+
* Content Filtered Topic uses MATCH operator for string comparisons.
64+
* Increased the periodic discovery announcements to 5s in the tests where
65+
the subscriber is OpenDDS and the publisher is Connext DDS.
6366

6467
* **FastDDS**:
6568

interoperability_report.py

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -635,18 +635,27 @@ def parser():
635635
help='Print debug information to stdout. This option also shows the '
636636
'shape_main application output in case of error. '
637637
'If this option is not used, only the test results are printed '
638-
'in the stdout. (Default: False).')
638+
'in the stdout. '
639+
'Default: False')
639640
optional.add_argument('-x','--data-representation',
640641
default="2",
641642
required=None,
642643
type=str,
643644
choices=["1","2"],
644645
help='Data Representation used if no provided when running the '
645646
'shape_main application. If this application already sets the '
646-
'data representation, this parameter is not used.'
647+
'data representation, this parameter is not used. '
647648
'The potential values are 1 for XCDR1 and 2 for XCDR2.'
648649
'Default value 2.')
649650

651+
optional.add_argument('-a', '--periodic-announcement',
652+
default=0,
653+
required=False,
654+
type=int,
655+
metavar='periodic_announcement_ms',
656+
help='Indicates the periodic participant announcement period in ms. '
657+
'Default: 0 (off).')
658+
650659
tests = parser.add_argument_group(title='Test Case and Test Suite')
651660
tests.add_argument('-s', '--suite',
652661
default='test_suite',
@@ -659,7 +668,7 @@ def parser():
659668
'This value should not contain the extension ".py", '
660669
'only the name of the file. '
661670
'It will run all the dictionaries defined in the file. '
662-
'(Default: test_suite).')
671+
'Default: test_suite.')
663672

664673
enable_disable = tests.add_mutually_exclusive_group(required=False)
665674
enable_disable.add_argument('-t', '--test',
@@ -671,7 +680,7 @@ def parser():
671680
help='Test Case that the script will run. '
672681
'This option is not supported with --disable-test. '
673682
'This allows to set multiple values separated by a space. '
674-
'(Default: run all Test Cases from the Test Suite.)')
683+
'Default: run all Test Cases from the Test Suite.')
675684
enable_disable.add_argument('-d', '--disable-test',
676685
nargs='+',
677686
default=None,
@@ -680,7 +689,8 @@ def parser():
680689
metavar='test_cases_disabled',
681690
help='Test Case that the script will skip. '
682691
'This allows to set multiple values separated by a space. '
683-
'This option is not supported with --test. (Default: None)')
692+
'This option is not supported with --test. '
693+
'Default: None')
684694

685695
out_opts = parser.add_argument_group(title='output options')
686696
out_opts.add_argument('-o', '--output-name',
@@ -691,7 +701,7 @@ def parser():
691701
'If the file passed already exists, it will add '
692702
'the new results to it. In other case it will create '
693703
'a new file. '
694-
'(Default: <publisher_name>-<subscriber_name>-date.xml)')
704+
'Default: <publisher_name>-<subscriber_name>-date.xml')
695705

696706
return parser
697707

@@ -718,6 +728,7 @@ def main():
718728
'test_cases': args.test,
719729
'test_cases_disabled': args.disable_test,
720730
'data_representation': args.data_representation,
731+
'periodic_announcement_ms': args.periodic_announcement,
721732
}
722733

723734
# The executables's names are supposed to follow the pattern: name_shape_main
@@ -807,6 +818,9 @@ def main():
807818
for element in parameters:
808819
if not '-x ' in element:
809820
element += f'-x {options["data_representation"]}'
821+
if options['periodic_announcement_ms'] > 0 \
822+
and not '--periodic-announcement ' in element:
823+
element += f' --periodic-announcement {options["periodic_announcement_ms"]}'
810824

811825
case = junitparser.TestCase(f'{test_suite_name}_{test_case_name}')
812826
now_test_case = datetime.now()

srcCxx/makefile_rti_connext_dds_linux

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ ifndef NDDSHOME
1818
$(error NDDSHOME not defined)
1919
endif
2020

21+
ifndef CONNEXTDDS_ARCH
22+
$(error CONNEXTDDS_ARCH not defined)
23+
endif
24+
2125
COMPILER_FLAGS = -m64
2226
LINKER_FLAGS = -m64 -static-libgcc
2327

@@ -27,7 +31,7 @@ version_name = $(lastword $(split_path_name))
2731
common_name = "_shape_main_linux"
2832
executable_name = $(version_name)$(common_name)
2933

30-
TARGET_ARCH = x64Linux4gcc7.3.0
34+
TARGET_ARCH = $(CONNEXTDDS_ARCH)
3135

3236
ifndef COMPILER
3337
COMPILER = g++

srcCxx/shape_configurator_rti_connext_dds.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,15 @@ const char *get_qos_policy_name(DDS_QosPolicyId_t policy_id)
1414
{
1515
return DDS_QosPolicyId_to_string(policy_id); // not standard...
1616
}
17+
18+
void configure_participant_announcements_period(
19+
DDS::DomainParticipantQos &dp_qos,
20+
useconds_t announcement_period_us) {
21+
if (announcement_period_us == 0) {
22+
return;
23+
}
24+
dp_qos.discovery_config.participant_liveliness_assert_period.sec =
25+
announcement_period_us / 1000000;
26+
dp_qos.discovery_config.participant_liveliness_assert_period.nanosec =
27+
(announcement_period_us % 1000000) * 1000;
28+
}

0 commit comments

Comments
 (0)