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
Wip cmake make check #7912
Wip cmake make check #7912
Conversation
@cbodley scrutanize away! |
[ -z "$CEPH_LIB" ] && CEPH_LIB=.libs | ||
[ -z $EC_PATH ] && EC_PATH=$CEPH_LIB | ||
[ -z $CS_PATH ] && CS_PATH=$CEPH_LIB | ||
[ -z $OBJCLASS_PATH ] && OBJCLASS_PATH=$CEPH_LIB |
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.
@jcsp here are the changes made to vstart.sh. A good place to look at where some of these variables are defined is cmake/modules/AddCephTest.cmake
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.
No objection from me to any of the vstart stuff here (I'm assuming you've tried it and it all works) -- can you separate it into its own commit and bring it over to #7908?
Might also be worth checking that none of the other regular cmake users (@oritwas @tchaikov perhaps?) have any comments on the change to build everything in bin/ and lib/ before we merge it in #7908
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.
I don't have any problem with building everything in bin/ and lib/
set_block_device_sandbox_dir(root); | ||
string root; | ||
if (i == 0) { | ||
string CEPH_ROOT = getenv("CEPH_ROOT"); |
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.
Protect against getenv
returning nullptr.
add_executable(ceph_test_cls_rbd | ||
test_cls_rbd.cc | ||
${CMAKE_SOURCE_DIR}/src/common/TextTable.cc | ||
${CMAKE_SOURCE_DIR}/src/common/secret.c |
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.
are these two not part of libcommon? we shouldn't have to recompile them here
The only thing that could break teuthology is if you change files in the qa directory or in what is found in the ceph packages. |
@alimaredia there are some linker errors with the test_librgw_file* targets with undefined references to heap profiler stuff they only try to build under |
@dachary qa/workunits/ceph-helpers.sh was changed to support out-of-tree builds (relative paths to binaries were replaced with environment variables). It was pointing to stuff in .libs (which wouldn't come from installed ceph packages), so I would assume that it isn't used by teuthology? |
the diff for src/test/CMakeLists.txt is too big for github, so comments here.. 464: 478: 481: 483: |
It is used by teuthology, reason why it is in qa/workunits: workunits/cephtool/test.sh:3:source $(dirname $0)/../ceph-helpers.sh |
de1619f
to
96ea965
Compare
Added a CMakeLists.txt into test/rgw. Signed-off-by: Ali Maredia <amaredia@redhat.com>
Added a CMakeLists.txt into test/system. Signed-off-by: Ali Maredia <amaredia@redhat.com>
Added src/librbd and test/librbd CMakeLists.txt's, various previously missing libraries and targets, revised unittest_librbd. Signed-off-by: Ali Maredia <amaredia@redhat.com>
Replaced relative paths in test/mon/osd-crush.sh with CEPH_VAR environment variables set in cmake. NOTE: test is not passing yet, possibly due to the filesystem. this commit is a work in progress Signed-off-by: Ali Maredia <amaredia@redhat.com>
Replaced relative paths in test/cephtool-test-rados.sh, qa/workunits/rados/test_rados_tool.sh, src/test/vstart_wrapper.sh, with CEPH_FOO environment variables set in cmake. Also edited the CMake path finding logic in vstart.sh with the CEPH_FOO variables. NOTE: test is not passing yet, possibly due to the filesystem. this commit is a work in progress Signed-off-by: Ali Maredia <amaredia@redhat.com>
Replaced relative paths in test/cephtool-test-mon.sh, qa/workunits/cephtool/test.sh, and test/cephtool-test-mon.sh to work with CEPH_FOO environment variables set in cmake. Signed-off-by: Ali Maredia <amaredia@redhat.com>
Replaced relative paths in unittest_bufferlist.sh to work with CEPH_FOO environment variables set in cmake. Signed-off-by: Ali Maredia <amaredia@redhat.com>
Replaced relative paths in shell scripts in test/ceph_objectstore_tool.py and init-ceph.in to work with CEPH_FOO environment variables set in cmake. Also added CEPH_BUILD_DIR environment variable set to CMAKE_BINARY_DIR. It is used in init-ceph and ceph_objectstore_tool.py. Signed-off-by: Ali Maredia <amaredia@redhat.com>
Replaced relative paths in test-erausure-eio.sh test-erasure-code.sh, and replaced .libs in erasure_code unittests with CEPH_VAR environment variables set in cmake. Signed-off-by: Ali Maredia <amaredia@redhat.com>
Replaced relative paths in test_objectstore_memstore.sh with CEPH_VAR environment variables set in cmake. Signed-off-by: Ali Maredia <amaredia@redhat.com>
Signed-off-by: Ali Maredia <amaredia@redhat.com>
Replaced .libs in TestClassHandler.cc with CEPH_LIB Signed-off-by: Ali Maredia <amaredia@redhat.com>
Added missing dependencies and link libraries for erasure-decode-non-regression.sh and added absolute paths to ceph_erasure_code_non_regression.cc. Signed-off-by: Ali Maredia <amaredia@redhat.com>
Signed-off-by: Ali Maredia <amaredia@redhat.com>
Replaced relative paths in test_pidfile.sh with CEPH_VAR environment variables set in cmake. Signed-off-by: Ali Maredia <amaredia@redhat.com>
Signed-off-by: Ali Maredia <amaredia@redhat.com>
Added rbd_mirror libraries, unit tests, executables Signed-off-by: Ali Maredia <amaredia@redhat.com>
Signed-off-by: Ali Maredia <amaredia@redhat.com>
Signed-off-by: Ali Maredia <amaredia@redhat.com>
Signed-off-by: Ali Maredia <amaredia@redhat.com>
Signed-off-by: Ali Maredia <amaredia@redhat.com>
Signed-off-by: Ali Maredia <amaredia@redhat.com>
Signed-off-by: Ali Maredia <amaredia@redhat.com>
c4d220c
to
8ddfcb1
Compare
) | ||
set_target_properties(ceph_test_rados_api_list PROPERTIES COMPILE_FLAGS | ||
${UNITTEST_CXX_FLAGS}) | ||
target_link_libraries(ceph_test_rados_api_list |
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.
need to link against "global", see 769c0af
see 769c0af Signed-off-by: Kefu Chai <kchai@redhat.com>
@alimaredia i am trying to get your branch to pass the build at http://gitbuilder.sepia.ceph.com/gitbuilder-ceph-tarball-trusty-amd64-cmake/#origin/wip-cmake-make-check, so i added my fix on top of yours, please feel free to squash it into your corresponding commit(s) (83ff750). |
DIR *dir = ::opendir(".libs"); | ||
const char* env = getenv("CEPH_LIB"); | ||
std::string CEPH_LIB(env ? env : "lib"); | ||
DIR *dir = ::opendir(CEPH_LIB.c_str()); | ||
if (dir == NULL) { |
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.
@alimaredia @cbodley Now if CEPH_LIB env is not set, "lib" is used instead of previously used ".libs". Was it intentionally?
% ./unittest_rbd_mirror
2016-04-18 09:10:23.392541 7fb9f8fdeb00 -1 WARNING: the following dangerous and experimental features are enabled: *
[==========] Running 58 tests from 11 test cases.
[----------] Global test environment set-up.
[----------] 1 test from TestMockImageReplayer
[ RUN ] TestMockImageReplayer.Blah
test/librados_test_stub/TestClassHandler.cc: In function 'void librados::TestClassHandler::open_all_classes()' thread 7fb9f8fdeb00 time 2016-04-18 09:10:23.500613
test/librados_test_stub/TestClassHandler.cc: 52: FAILED assert(false)
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.
@trociny This was done intentionally. ".libs" is an autotools convention and since we are moving toward using CMake. The "lib" was chosen because all the libraries in a CMake build go to ${CMAKE_BUILD_DIR}/lib.
I would love it if you transitioned to CMake and CTest (the environment variables are predefined there all you have to do is run ctest -V -R unittest_rbd_mirror
but I understand your concern.
One thing I can do is add a check for if opendir(".libs") is true i can set *dir to that to make sure this test and others with the similar revisions work without running make check in the automake build. How does that sound?
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.
@alimaredia If it is intentional, I am fine with it. Not sure it is necessary to do any additional checks for compatibility, it might only increase the transition period. A more useful thing I think is to announce the new way to developers. It may already be done and I just missed it? At least a message in ceph-dev would be nice.
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.
@trociny @alimaredia I added the automatic setting of CEPH_LIB using .libs in my pull request #8649 just for the ceph_objectstore_tool.py test.
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.
As long as these commit's don't break make check that jenkins runs, and the numerous other changes are agreed upon, there's no reason this CMake work shouldn't go be in ASAP