You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Raluca Miclea <rm...@cloudbasesolutions.com> on 2017/10/24 07:50:29 UTC
Review Request 63238: Ported and enabled Path Tests on Windows.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63238/
-----------------------------------------------------------
Review request for mesos and Andrew Schwartzmeyer.
Bugs: MESOS-3442
https://issues.apache.org/jira/browse/MESOS-3442
Repository: mesos
Description
-------
I checked #ifdefs in order to decide what tests to build and run on
Window and Posix systems respectively.
For Windows tests I mainly replaced the "slash" path separator with
"backslash".
I extracted common assertion before the #ifdef directive.
Diffs
-----
3rdparty/stout/tests/path_tests.cpp f8c14d5aefe0b49adb778da784143a328c96183d
Diff: https://reviews.apache.org/r/63238/diff/1/
Testing
-------
Thanks,
Raluca Miclea
Re: Review Request 63238: Ported and enabled Path Tests on Windows.
Posted by Raluca Miclea <rm...@cloudbasesolutions.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63238/
-----------------------------------------------------------
(Updated Oct. 26, 2017, 10:56 a.m.)
Review request for mesos and Andrew Schwartzmeyer.
Changes
-------
addressed review part 2
Bugs: MESOS-3442
https://issues.apache.org/jira/browse/MESOS-3442
Repository: mesos
Description (updated)
-------
Used path::join() to join them with the os:PATH_SEPARATOR, which is '\\'
on Windows and '/' elsewhere. When testing path::join() itself, I
constructed path strings using the os::PATH_SEPARATOR for portability.
Diffs (updated)
-----
3rdparty/stout/tests/path_tests.cpp f8c14d5aefe0b49adb778da784143a328c96183d
Diff: https://reviews.apache.org/r/63238/diff/3/
Changes: https://reviews.apache.org/r/63238/diff/2-3/
Testing
-------
Modified Tests:
TEST(PathTest, Basename)
TEST(PathTest, Dirname)
TEST(PathTest, Extension)
TEST(PathTest, Join)
Thanks,
Raluca Miclea
Re: Review Request 63238: Ported and enabled Path Tests on Windows.
Posted by Raluca Miclea <rm...@cloudbasesolutions.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63238/
-----------------------------------------------------------
(Updated Oct. 26, 2017, 10:33 a.m.)
Review request for mesos and Andrew Schwartzmeyer.
Changes
-------
addressed review
Bugs: MESOS-3442
https://issues.apache.org/jira/browse/MESOS-3442
Repository: mesos
Description
-------
I checked #ifdefs in order to decide what tests to build and run on
Window and Posix systems respectively.
For Windows tests I mainly replaced the "slash" path separator with
"backslash".
I extracted common assertion before the #ifdef directive.
Diffs (updated)
-----
3rdparty/stout/tests/flags_tests.cpp 88c8ee57c2bf328251513761498ef98d774be006
3rdparty/stout/tests/path_tests.cpp f8c14d5aefe0b49adb778da784143a328c96183d
Diff: https://reviews.apache.org/r/63238/diff/2/
Changes: https://reviews.apache.org/r/63238/diff/1-2/
Testing
-------
Modified Tests:
TEST(PathTest, Basename)
TEST(PathTest, Dirname)
TEST(PathTest, Extension)
TEST(PathTest, Join)
Thanks,
Raluca Miclea
Re: Review Request 63238: Ported and enabled Path Tests on Windows.
Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63238/#review189041
-----------------------------------------------------------
PASS: Mesos patch 63238 was successfully built and tested.
Reviews applied: `['63238']`
All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/63238
- Mesos Reviewbot Windows
On Oct. 24, 2017, 7:59 a.m., Raluca Miclea wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63238/
> -----------------------------------------------------------
>
> (Updated Oct. 24, 2017, 7:59 a.m.)
>
>
> Review request for mesos and Andrew Schwartzmeyer.
>
>
> Bugs: MESOS-3442
> https://issues.apache.org/jira/browse/MESOS-3442
>
>
> Repository: mesos
>
>
> Description
> -------
>
> I checked #ifdefs in order to decide what tests to build and run on
> Window and Posix systems respectively.
> For Windows tests I mainly replaced the "slash" path separator with
> "backslash".
> I extracted common assertion before the #ifdef directive.
>
>
> Diffs
> -----
>
> 3rdparty/stout/tests/path_tests.cpp f8c14d5aefe0b49adb778da784143a328c96183d
>
>
> Diff: https://reviews.apache.org/r/63238/diff/1/
>
>
> Testing
> -------
>
> Modified Tests:
> TEST(PathTest, Basename)
> TEST(PathTest, Dirname)
> TEST(PathTest, Extension)
> TEST(PathTest, Join)
>
>
> Thanks,
>
> Raluca Miclea
>
>
Re: Review Request 63238: Ported and enabled Path Tests on Windows.
Posted by Raluca Miclea <rm...@cloudbasesolutions.com>.
> On Oct. 24, 2017, 6:32 p.m., Andrew Schwartzmeyer wrote:
> > 3rdparty/stout/tests/path_tests.cpp
> > Lines 40-61 (original), 43-90 (patched)
> > <https://reviews.apache.org/r/63238/diff/1/?file=1866254#file1866254line43>
> >
> > Instead of using an `#ifdef` here, we can probably just use `path::join("a", "b")`, as that will join them with the [`os::PATH_SEPARATOR`](https://github.com/apache/mesos/blob/edba292659e05d7a0989eb122f7824e1c21db8fb/3rdparty/stout/include/stout/os/constants.hpp#L26) which is `\` on Windows and `/` elsewhere.
Will do.
> On Oct. 24, 2017, 6:32 p.m., Andrew Schwartzmeyer wrote:
> > 3rdparty/stout/tests/path_tests.cpp
> > Lines 101-134 (patched)
> > <https://reviews.apache.org/r/63238/diff/1/?file=1866254#file1866254line101>
> >
> > Ditto. We can halve the amount of code by using `path::join`, and for cases where we have intermittent slashes etc., use `os::PATH_SEPARATOR` (I'd probably save that into a short local variable as it'll get referenced a lot in some of these.)
Will do.
> On Oct. 24, 2017, 6:32 p.m., Andrew Schwartzmeyer wrote:
> > 3rdparty/stout/tests/path_tests.cpp
> > Lines 172-187 (patched)
> > <https://reviews.apache.org/r/63238/diff/1/?file=1866254#file1866254line172>
> >
> > Ditto.
Will do.
> On Oct. 24, 2017, 6:32 p.m., Andrew Schwartzmeyer wrote:
> > 3rdparty/stout/tests/path_tests.cpp
> > Lines 212-235 (patched)
> > <https://reviews.apache.org/r/63238/diff/1/?file=1866254#file1866254line212>
> >
> > Now this is where it gets especially annoying, since we can't use `path::join` to test itself. But I would take:
> >
> > ```
> > EXPECT_EQ("\a\b\c\", path::join("\a\", "\b\", "\c\"));
> > ```
> >
> > and make it:
> >
> > ```
> > const string sep = stringify(os::PATH_SEPARATOR);
> > EXPECT_EQ(sep + "a" + sep + "b" + sep + "c" + sep, path::join(sep + "a" + sep, sep + "b" + sep, sep + "c" + sep));
> > ```
> >
> > At least this code can be reused, such that if the test gets changed, tests for both platforms are then updated always at the same time.
Will do.
- Raluca
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63238/#review189063
-----------------------------------------------------------
On Oct. 24, 2017, 7:59 a.m., Raluca Miclea wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63238/
> -----------------------------------------------------------
>
> (Updated Oct. 24, 2017, 7:59 a.m.)
>
>
> Review request for mesos and Andrew Schwartzmeyer.
>
>
> Bugs: MESOS-3442
> https://issues.apache.org/jira/browse/MESOS-3442
>
>
> Repository: mesos
>
>
> Description
> -------
>
> I checked #ifdefs in order to decide what tests to build and run on
> Window and Posix systems respectively.
> For Windows tests I mainly replaced the "slash" path separator with
> "backslash".
> I extracted common assertion before the #ifdef directive.
>
>
> Diffs
> -----
>
> 3rdparty/stout/tests/path_tests.cpp f8c14d5aefe0b49adb778da784143a328c96183d
>
>
> Diff: https://reviews.apache.org/r/63238/diff/1/
>
>
> Testing
> -------
>
> Modified Tests:
> TEST(PathTest, Basename)
> TEST(PathTest, Dirname)
> TEST(PathTest, Extension)
> TEST(PathTest, Join)
>
>
> Thanks,
>
> Raluca Miclea
>
>
Re: Review Request 63238: Ported and enabled Path Tests on Windows.
Posted by Andrew Schwartzmeyer <an...@schwartzmeyer.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63238/#review189063
-----------------------------------------------------------
3rdparty/stout/tests/path_tests.cpp
Lines 40-61 (original), 43-90 (patched)
<https://reviews.apache.org/r/63238/#comment265971>
Instead of using an `#ifdef` here, we can probably just use `path::join("a", "b")`, as that will join them with the [`os::PATH_SEPARATOR`](https://github.com/apache/mesos/blob/edba292659e05d7a0989eb122f7824e1c21db8fb/3rdparty/stout/include/stout/os/constants.hpp#L26) which is `\` on Windows and `/` elsewhere.
3rdparty/stout/tests/path_tests.cpp
Lines 101-134 (patched)
<https://reviews.apache.org/r/63238/#comment265972>
Ditto. We can halve the amount of code by using `path::join`, and for cases where we have intermittent slashes etc., use `os::PATH_SEPARATOR` (I'd probably save that into a short local variable as it'll get referenced a lot in some of these.)
3rdparty/stout/tests/path_tests.cpp
Lines 172-187 (patched)
<https://reviews.apache.org/r/63238/#comment265973>
Ditto.
3rdparty/stout/tests/path_tests.cpp
Lines 212-235 (patched)
<https://reviews.apache.org/r/63238/#comment265974>
Now this is where it gets especially annoying, since we can't use `path::join` to test itself. But I would take:
```
EXPECT_EQ("\a\b\c\", path::join("\a\", "\b\", "\c\"));
```
and make it:
```
const string sep = stringify(os::PATH_SEPARATOR);
EXPECT_EQ(sep + "a" + sep + "b" + sep + "c" + sep, path::join(sep + "a" + sep, sep + "b" + sep, sep + "c" + sep));
```
At least this code can be reused, such that if the test gets changed, tests for both platforms are then updated always at the same time.
- Andrew Schwartzmeyer
On Oct. 24, 2017, 12:59 a.m., Raluca Miclea wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63238/
> -----------------------------------------------------------
>
> (Updated Oct. 24, 2017, 12:59 a.m.)
>
>
> Review request for mesos and Andrew Schwartzmeyer.
>
>
> Bugs: MESOS-3442
> https://issues.apache.org/jira/browse/MESOS-3442
>
>
> Repository: mesos
>
>
> Description
> -------
>
> I checked #ifdefs in order to decide what tests to build and run on
> Window and Posix systems respectively.
> For Windows tests I mainly replaced the "slash" path separator with
> "backslash".
> I extracted common assertion before the #ifdef directive.
>
>
> Diffs
> -----
>
> 3rdparty/stout/tests/path_tests.cpp f8c14d5aefe0b49adb778da784143a328c96183d
>
>
> Diff: https://reviews.apache.org/r/63238/diff/1/
>
>
> Testing
> -------
>
> Modified Tests:
> TEST(PathTest, Basename)
> TEST(PathTest, Dirname)
> TEST(PathTest, Extension)
> TEST(PathTest, Join)
>
>
> Thanks,
>
> Raluca Miclea
>
>
Re: Review Request 63238: Ported and enabled Path Tests on Windows.
Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63238/#review189044
-----------------------------------------------------------
Patch looks great!
Reviews applied: [63238]
Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh
- Mesos Reviewbot
On Oct. 24, 2017, 10:59 a.m., Raluca Miclea wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63238/
> -----------------------------------------------------------
>
> (Updated Oct. 24, 2017, 10:59 a.m.)
>
>
> Review request for mesos and Andrew Schwartzmeyer.
>
>
> Bugs: MESOS-3442
> https://issues.apache.org/jira/browse/MESOS-3442
>
>
> Repository: mesos
>
>
> Description
> -------
>
> I checked #ifdefs in order to decide what tests to build and run on
> Window and Posix systems respectively.
> For Windows tests I mainly replaced the "slash" path separator with
> "backslash".
> I extracted common assertion before the #ifdef directive.
>
>
> Diffs
> -----
>
> 3rdparty/stout/tests/path_tests.cpp f8c14d5aefe0b49adb778da784143a328c96183d
>
>
> Diff: https://reviews.apache.org/r/63238/diff/1/
>
>
> Testing
> -------
>
> Modified Tests:
> TEST(PathTest, Basename)
> TEST(PathTest, Dirname)
> TEST(PathTest, Extension)
> TEST(PathTest, Join)
>
>
> Thanks,
>
> Raluca Miclea
>
>
Re: Review Request 63238: Ported and enabled Path Tests on Windows.
Posted by Raluca Miclea <rm...@cloudbasesolutions.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63238/
-----------------------------------------------------------
(Updated Oct. 24, 2017, 7:59 a.m.)
Review request for mesos and Andrew Schwartzmeyer.
Bugs: MESOS-3442
https://issues.apache.org/jira/browse/MESOS-3442
Repository: mesos
Description
-------
I checked #ifdefs in order to decide what tests to build and run on
Window and Posix systems respectively.
For Windows tests I mainly replaced the "slash" path separator with
"backslash".
I extracted common assertion before the #ifdef directive.
Diffs
-----
3rdparty/stout/tests/path_tests.cpp f8c14d5aefe0b49adb778da784143a328c96183d
Diff: https://reviews.apache.org/r/63238/diff/1/
Testing (updated)
-------
Modified Tests:
TEST(PathTest, Basename)
TEST(PathTest, Dirname)
TEST(PathTest, Extension)
TEST(PathTest, Join)
Thanks,
Raluca Miclea