Skip to content

ARROW-3254: [C++] Add SOURCES option to ADD_ARROW_TEST to be able to combine multiple test files into a single executable - #2704

Closed
wesm wants to merge 12 commits into
apache:masterfrom
wesm:ARROW-3254
Closed

wesm wants to merge 12 commits into
apache:masterfrom
wesm:ARROW-3254

Conversation

@wesm

@wesm wesm commented Oct 4, 2018

Copy link
Copy Markdown
Member

I also moved arrow/test-util.h to arrow/util/testing.h and moved some of the implementation of that file into arrow/util/testing.cc, so that many of these auxiliary test functions are only compiled once.

kou and others added 7 commits October 4, 2018 15:00
Author: Kouhei Sutou <kou@clear-code.com>

Closes apache#2701 from kou/add-workaround-missing-gemfile and squashes the following commits:

fc80d6e <Kouhei Sutou>  Add workaround to verify 0.11.0
It's helpful to setup test environment.

Author: Kouhei Sutou <kou@clear-code.com>

Closes apache#2702 from kou/c-glib-add-missing-gemfile-to-archive and squashes the following commits:

5c97dad <Kouhei Sutou>  Include Gemfile to archive
Author: Kouhei Sutou <kou@clear-code.com>

Closes apache#2703 from kou/expand-variables-in-commit-message and squashes the following commits:

da4f3bc <Kouhei Sutou>  Expand variables in commit message
Author: Pindikura Ravindra <ravindra@dremio.com>

Closes apache#2695 from pravindra/re2 and squashes the following commits:

4408b85 <Pindikura Ravindra> ARROW-3331:  Add re2 to toolchain
…est files into a single executable, inline fewer test functions

Change-Id: If3838fcdd9b88bec88f6b42e20432d05c339c7ff
Change-Id: I50b3384d0af57a68a8e99345fcabb722da2f629a
Change-Id: Ib54d5c247ede0980076ee0afded448be9d5602e1
endforeach()
else()
# No executable, just invoke the test (probably a script) directly.
set(TEST_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${REL_TEST_NAME})

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was unused

wesm added 3 commits October 4, 2018 08:14
Change-Id: Ic60b5baf3e19aa81a23bf864c861fb2992331f1b
Change-Id: Idadfc233439df77d8bda4e9cef6da1a5198340a7
Change-Id: I5d0197a648ea44ac615f1d31d67c4e51fa1c4809
@wesm

wesm commented Oct 4, 2018

Copy link
Copy Markdown
Member Author

I combined a bunch of semantically-related tests. Even with all this, with Gandiva now in the build we have 68 test executables. After the Gandiva patches get caught up, I will combine the semantically-related Gandiva tests to improve build times and reduce the amount of executables created

wesm added 2 commits October 4, 2018 10:52
Change-Id: I262aa01b3b7f1269acee13f2761bdfe3add338f7
Change-Id: Ia568443184cafc95d2a6e75444504d0e4715760f
@wesm

wesm commented Oct 4, 2018

Copy link
Copy Markdown
Member Author

Argh Windows is a constant source of problems. @pitrou apparently if you combine a DLL (like arrow.dll) with a static library (like the auxiliary testing static library I created here) it will gripe about duplicated inline symbols. I think we should revert to statically linking the tests on Windows to avoid this madness

@pitrou

pitrou commented Oct 4, 2018

Copy link
Copy Markdown
Member

I'd like to step back a bit:

  • having multiple test files allow parallelizing (an important feature when developing, especially now that Parquet tests have been added to the bunch - some of them are quite slow)
  • linking should be fast if Arrow is linked as a shared library
  • the test executables should be small if Arrow is linked as a shared library

The fact that we do/did static linking for tests is an anomaly, and is IMHO the real source of the slowness and disk consumption.

@wesm

wesm commented Oct 4, 2018

Copy link
Copy Markdown
Member Author

It appears that the issue is that the symbols in the DLL have dllimport linkage while in the static lib they have dllexport: https://akrzemi1.wordpress.com/2016/11/28/the-one-definition-rule/. I'm going to fire up my windows box and see if I can fix it

@wesm

wesm commented Oct 4, 2018

Copy link
Copy Markdown
Member Author

linking should be fast if Arrow is linked as a shared library

My understanding is that code coverage doesn't work if you don't statically link

@wesm

wesm commented Oct 4, 2018

Copy link
Copy Markdown
Member Author

Reading https://github.com/apache/kudu/blob/master/CMakeLists.txt#L422, it seems that maybe the coverage issue goes away if you use Clang

@pitrou

pitrou commented Oct 4, 2018

Copy link
Copy Markdown
Member

Do you mean codecov-generated code coverage results?

@wesm

wesm commented Oct 4, 2018

Copy link
Copy Markdown
Member Author

Yeah, apparently there is an issue with code coverage data generated when compiling with --coverage and using gcc. Read this commit message for more information about this apache/kudu@48799d3

@wesm

wesm commented Oct 4, 2018

Copy link
Copy Markdown
Member Author

I opened https://issues.apache.org/jira/browse/ARROW-3442. I still think it's a good idea to be able to split a unit test suite between multiple files, but I'll roll back my changes that combine a bunch of the existing tests

@wesm

wesm commented Nov 19, 2018

Copy link
Copy Markdown
Member Author

I'll revisit this after #2997 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants