Skip to content
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

chore: add bazel tests #1

Merged
merged 8 commits into from
May 9, 2024

Conversation

andrewkatson
Copy link
Collaborator

@andrewkatson andrewkatson commented May 1, 2024

This is just the initial commit to let @zaucy know that I am working on this module next. I am wondering on your thoughts on this error. I know what it is trying to say but afaik I am including the dependency right in the MODULE.bazel file and the test/MODULE.bazel file references the former correctly.

ERROR: Error computing the main repository mapping: in module dependency chain <root> -> boost.spirit@_ -> [email protected]: module not found in registries: [email protected]

Also this happens with every dependency. The top level builds just fine.

@zaucy
Copy link
Member

zaucy commented May 1, 2024

Is the error happening in the test module? If so it just looks like you're missing a .bazelrc in the test directory.

@andrewkatson
Copy link
Collaborator Author

Oh duh that was it. What do I do about there being no real test files with this module? There is test_headers/test.cpp but that doesn't seem like an actual test.

@andrewkatson
Copy link
Collaborator Author

Nevermind I read the jamfile more closely and know how to test it!

@andrewkatson
Copy link
Collaborator Author

Okay so here is the issue I need help solving. The way to test is to do a defines = ["BOOST_TEST_HEADER=include/boost/include/spirit/some_file.hpp"] in each cc_test rule so that the test.cpp file tries to include each header defined by the glob in the jamfile. The issue is that you can't do up level references like ../include/boost/include/spirit/some_file.hpp in the srcs attribute of each cc_test. I have uploaded what I have so far so let me know what you think!

@zaucy
Copy link
Member

zaucy commented May 3, 2024

Is there a reason BOOST_SPIRIT_HEADER_NAME can't be boost/include/spirit/some_file.hpp (removed the include/ prefix)? That way the header is already included by @boost.spirit//:boost.spirit in hdrs and you don't need to include it in the srcs.

@andrewkatson
Copy link
Collaborator Author

Oh yeah... Did that and it got me new errors so I will forge ahead. Thank you!

@andrewkatson
Copy link
Collaborator Author

@zaucy Can you add the CI workflow? Or is there a way I can add it?

@zaucy
Copy link
Member

zaucy commented May 7, 2024

Its the yaml file in the .githib folder. Ill be able to get to it today!

@andrewkatson
Copy link
Collaborator Author

Sounds good! Thank you for the pointer

@zaucy
Copy link
Member

zaucy commented May 8, 2024

CI added!

@andrewkatson
Copy link
Collaborator Author

All the tests pass now!

@zaucy zaucy changed the title Initial commit for boost.spirit chore: add bazel tests May 9, 2024
@zaucy zaucy merged commit da45753 into bazelboost:bazelboost-1.83.0 May 9, 2024
3 checks passed
@andrewkatson
Copy link
Collaborator Author

Let me know when you update the registry so I can move onto serialization.

@zaucy
Copy link
Member

zaucy commented May 10, 2024

its released!

@andrewkatson
Copy link
Collaborator Author

Thank you!

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.

2 participants