Skip to content

CMake: iree check test functions - #1289

Closed
GMNGeoffrey wants to merge 12 commits into
iree-org:masterfrom
GMNGeoffrey:cmake_iree_check_test
Closed

GMNGeoffrey wants to merge 12 commits into
iree-org:masterfrom
GMNGeoffrey:cmake_iree_check_test

Conversation

@GMNGeoffrey

@GMNGeoffrey GMNGeoffrey commented Mar 27, 2020 •

Copy link
Copy Markdown
Member

Add a CMake function for creating iree-check-module tests. This adds CMake support for the test runner I've been working on (more details in #1308).

Getting test dependencies setup correctly turns out to be quite tricky in CMake. I think this is reasonable for now, but I think we should probably break cc_embed_data out of iree_bytecode_module and make the latter a proper target.

@GMNGeoffrey

Copy link
Copy Markdown
Member Author

I got something working running the check test binary with cmake, but it seems cmake's handling of generated files is...poor. I inlined iree_bytecode_module for testing things out. I have read many blog posts now. The main thing I don't like about this is that it seems to require adding the iree_bytecode_module gen to ALL. Of course when I'm creating it I can wrap it in TESTONLY, but it just feels like quite a pile of hacks instead of having a proper dependency graph between tests and their dependencies. Any advice on how to do this properly would be appreciated.

@GMNGeoffrey
GMNGeoffrey force-pushed the cmake_iree_check_test branch from 18a1488 to 326b690 Compare March 28, 2020 02:50
@GMNGeoffrey GMNGeoffrey changed the title Cmake iree check test CMake: iree check test functions Mar 28, 2020
@GMNGeoffrey
GMNGeoffrey marked this pull request as ready for review March 28, 2020 03:23
@GMNGeoffrey

Copy link
Copy Markdown
Member Author

@benvanik @marbre This is ready for review now, PTAL.

Comment thread build_tools/cmake/iree_check_test.cmake Resolved
Comment thread build_tools/cmake/iree_check_test.cmake Resolved
Comment thread build_tools/cmake/iree_check_test.cmake Resolved
Comment thread build_tools/cmake/iree_check_test.cmake Resolved
@marbre

marbre commented Mar 30, 2020

Copy link
Copy Markdown
Member

I actually do not have a better proposal who to handle the generated sources... The tests all pass on my machine. So I am definitly good to go with this changes 👍 Only some minor remarks.

@GMNGeoffrey
GMNGeoffrey requested a review from marbre March 30, 2020 17:39
@GMNGeoffrey
GMNGeoffrey force-pushed the cmake_iree_check_test branch from 1015c9d to 0266776 Compare March 30, 2020 17:55
@GMNGeoffrey
GMNGeoffrey force-pushed the cmake_iree_check_test branch from 0266776 to 596485a Compare March 30, 2020 22:48

@marbre marbre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Except for the Bazel build errors, we can got forward with this 👍

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