New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nosetests: use /usr/bin/env to find nosetests #12091
Conversation
|
||
[ ! -z $CEPH_ROOT ] || exit 1 | ||
|
||
PYBIND=$CEPH_ROOT/src/pybind /usr/local/bin/nosetests --stop $CEPH_ROOT/src/test/pybind/test_ceph_argparse.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test_ceph_argparse.py
does not use ${PYBIND}, i think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tchaikov
Eh, that could be that case.
I first did the daemon case, and then copied the wrapper.
Even considered make it a generic one in taking arg0 and rewrite it to basename + .py.
What is your preference: ONE generic one, or that I check PYBIND usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tchaikov
Could you please indicate which solution you prefer here?
I'll fix, and submit, so this one can be merged..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wjwithagen i think the root cause might be that the shebang line in src/test/pybind/test_ceph_daemon.py
assume that nosetests
is located in /usr/bin
. while on your FreeBSD installation, it's not the case.
as to PYBIND
, it's not necessary. as the cmake function add_ceph_test()
takes care of the pybinding path already by setting PYTHONPATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cython_modules/lib.${PYTHON${PYTHON_VERSION}_VERSION_MAJOR}:${CMAKE_SOURCE_DIR}/src/pybind
.
instead of using #!/usr/bin/nosetest --nocapture
, probably we can just use #!/usr/bin/env nosetests
. because shebang line does not support more than two or more parameters. i guess it's safe to remove the --nocapture
option. it does not hurt to read the captured message sent to stdout along with the error message. @dachary what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tchaikov I agree that it is safe to remove the --nocapture option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wjwithagen I agree with @tchaikov, it would be better to just use #!/usr/bin/env nosetest to resolve that issue. It is simpler and looks like it would work for FreeBSD as well.
|
||
[ ! -z $CEPH_ROOT ] || exit 1 | ||
|
||
PYBIND=$CEPH_ROOT/src/pybind /usr/local/bin/nosetests --stop $CEPH_ROOT/src/test/pybind/test_ceph_argparse.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tchaikov I agree that it is safe to remove the --nocapture option
|
||
[ ! -z $CEPH_ROOT ] || exit 1 | ||
|
||
PYBIND=$CEPH_ROOT/src/pybind /usr/local/bin/nosetests --stop $CEPH_ROOT/src/test/pybind/test_ceph_argparse.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wjwithagen I agree with @tchaikov, it would be better to just use #!/usr/bin/env nosetest to resolve that issue. It is simpler and looks like it would work for FreeBSD as well.
- Option nocapture is not really required so no problem with the fact that FreeBSD env does not work for params for nosetests Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
92396f3
to
89a61ae
Compare
Reviewed-by: once jenkins is back and green. |
the latest change addressed the comment.
Signed-off-by: Willem Jan Withagen wjw@digiware.nl