From 0ca84e3bc4bbaf49995dc5ca749e9f3a908b21c7 Mon Sep 17 00:00:00 2001 From: Nate Koenig Date: Fri, 18 Feb 2022 10:34:03 -0800 Subject: [PATCH 1/4] Minor typo in filesystem documentation (#313) Signed-off-by: Nate Koenig --- include/ignition/common/Filesystem.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ignition/common/Filesystem.hh b/include/ignition/common/Filesystem.hh index 42e95b327..71a2a4d83 100644 --- a/include/ignition/common/Filesystem.hh +++ b/include/ignition/common/Filesystem.hh @@ -241,7 +241,7 @@ namespace ignition /// files, by appending numbers to it (i.e. (0), (1), ...) /// \param[in] _pathAndName Full absolute path and file name up to the /// file extension. - /// \param[in] _extension File extension, such as "ddf". + /// \param[in] _extension File extension, such as "sdf". /// \return Full path with name and extension, which doesn't collide with /// existing files std::string IGNITION_COMMON_VISIBLE uniqueFilePath( From bde2937cb527d5f4a1a83a23f7bfc72ed050b8a8 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Fri, 25 Feb 2022 11:00:38 -0800 Subject: [PATCH 2/4] Add CI support for Jammy (#316) Signed-off-by: Michael Carroll Co-authored-by: Michael Carroll --- .github/workflows/ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e36175c3a..b2e5e6fff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,3 +23,13 @@ jobs: - name: Compile and test id: ci uses: ignition-tooling/action-ignition-ci@focal + jammy-ci: + runs-on: ubuntu-latest + name: Ubuntu Jammy CI + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Compile and test + id: ci + uses: ignition-tooling/action-ignition-ci@jammy + From ad0fc881354d4322ae1f8b61e806ee4e5fd39bc2 Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Thu, 3 Mar 2022 12:30:16 -0600 Subject: [PATCH 3/4] Add some tests for parentPath/basename (#309) Signed-off-by: Michael Carroll Signed-off-by: Louise Poubel Co-authored-by: Louise Poubel --- src/Filesystem_TEST.cc | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/Filesystem_TEST.cc b/src/Filesystem_TEST.cc index a193767f6..261621fd0 100644 --- a/src/Filesystem_TEST.cc +++ b/src/Filesystem_TEST.cc @@ -493,38 +493,71 @@ TEST_F(FilesystemTest, cwd_error) } ///////////////////////////////////////////////// -TEST_F(FilesystemTest, basename) +TEST_F(FilesystemTest, decomposition) { std::string absolute = joinPaths("", "home", "bob", "foo"); EXPECT_EQ(basename(absolute), "foo"); +#ifndef _WIN32 + EXPECT_EQ(parentPath(absolute), "/home/bob"); +#else + EXPECT_EQ(parentPath(absolute), "home\\bob"); +#endif std::string relative = joinPaths("baz", "foobar"); EXPECT_EQ(basename(relative), "foobar"); + EXPECT_EQ(parentPath(relative), "baz"); std::string bname = "bzzz"; EXPECT_EQ(basename(bname), "bzzz"); + EXPECT_EQ(parentPath(bname), "bzzz"); std::string nobase = joinPaths("baz", ""); EXPECT_EQ(basename(nobase), "baz"); +#ifndef _WIN32 + EXPECT_EQ(parentPath(nobase), "baz/"); +#else + EXPECT_EQ(parentPath(nobase), "baz"); +#endif std::string multiple_slash = separator("baz") + separator("") + separator("") + separator(""); EXPECT_EQ(basename(multiple_slash), "baz"); +#ifndef _WIN32 + EXPECT_EQ(parentPath(multiple_slash), "baz//"); +#else + EXPECT_EQ(parentPath(multiple_slash), "baz\\\\"); +#endif std::string multiple_slash_middle = separator("") + separator("home") + separator("") + separator("") + separator("bob") + separator("foo"); EXPECT_EQ(basename(multiple_slash_middle), "foo"); +#ifndef _WIN32 + EXPECT_EQ(parentPath(multiple_slash_middle), "/home///bob"); +#else + EXPECT_EQ(parentPath(multiple_slash_middle), "\\home\\\\\\bob"); +#endif std::string multiple_slash_start = separator("") + separator("") + separator("") + separator("home") + separator("bob") + separator("foo"); EXPECT_EQ(basename(multiple_slash_start), "foo"); +#ifndef _WIN32 + EXPECT_EQ(parentPath(multiple_slash_start), "///home/bob"); +#else + EXPECT_EQ(parentPath(multiple_slash_start), "\\\\\\home\\bob"); +#endif std::string slash_only = separator("") + separator(""); EXPECT_EQ(basename(slash_only), separator("")); + EXPECT_EQ(parentPath(slash_only), ""); std::string multiple_slash_only = separator("") + separator("") + separator("") + separator(""); EXPECT_EQ(basename(multiple_slash_only), separator("")); +#ifndef _WIN32 + EXPECT_EQ(parentPath(multiple_slash_only), "//"); +#else + EXPECT_EQ(parentPath(multiple_slash_only), "\\\\"); +#endif } ///////////////////////////////////////////////// From 7fad0b46319e4030f072d0d985789587c967e498 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Tue, 15 Mar 2022 21:25:30 -0700 Subject: [PATCH 4/4] packages.apt: don't install ruby-ronn (#324) This isn't needed anymore and has issues on Jammy. Signed-off-by: Steve Peters --- .github/ci/packages.apt | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/ci/packages.apt b/.github/ci/packages.apt index 764e85842..6c56e05b9 100644 --- a/.github/ci/packages.apt +++ b/.github/ci/packages.apt @@ -10,5 +10,4 @@ libignition-utils1-dev libswscale-dev libtinyxml2-dev pkg-config -ruby-ronn uuid-dev