Skip to content

Commit c27b42e

Browse files
committed
Address comments
1 parent 8bc4770 commit c27b42e

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

.github/workflows/linux-x64-build-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
npm test
7575
npm run clean
7676
77-
- name: Test with IDL ROS messages
77+
- name: Test with IDL ROS messages against rolling
7878
if: ${{ matrix.ros_distribution == 'rolling' }}
7979
run: |
8080
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash

rosidl_gen/index.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,14 @@ function getInstalledPackagePaths() {
2929
}
3030

3131
async function generateInPath(path) {
32-
let pkgs = null;
3332
let pkgsInfo = null;
3433
if (!useIDL) {
35-
pkgs = await packages.findPackagesInDirectory(path);
36-
pkgsInfo = Array.from(pkgs.values());
34+
pkgsInfo = Array.from(
35+
(await packages.findPackagesInDirectory(path)).values()
36+
);
3737
} else {
3838
const idlPkgs = await packages.findPackagesInDirectory(path, useIDL);
39-
const exist = await fse.exists(idlPath);
40-
if (!exist) {
41-
fse.mkdirSync(idlPath);
42-
}
39+
await fse.ensureDir(idlPath);
4340
const promises = [];
4441
idlPkgs.forEach((pkg) => {
4542
pkg.idls.forEach((idl) => {

rosidl_gen/packages.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ async function findPackagesInDirectory(dir, useIDL) {
243243
if (!ignore) {
244244
if (useIDL) {
245245
if (path.extname(file.name) === '.idl') {
246-
addInterfaceInfo(interfaceInfo, 'idl', pkgMap);
246+
addInterfaceInfo(interfaceInfo, 'idls', pkgMap);
247247
}
248248
} else {
249249
if (path.extname(file.name) === '.msg') {

test/test-message-type.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ describe('Rclnodejs message type testing', function () {
105105
'String_channel',
106106
(msg) => {
107107
publisher.kill('SIGINT');
108+
node.destroySubscription(subscription);
108109
assert.deepStrictEqual(typeof msg.data, 'string');
109110
assert.deepStrictEqual(msg.data, 'RCL String');
110111
done();

0 commit comments

Comments
 (0)