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

GH-45796: [C++] Add integration directory to Meson configuration #45797

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

WillAyd
Copy link
Contributor

@WillAyd WillAyd commented Mar 14, 2025

Rationale for this change

This continues to add features to the Meson build configuration

What changes are included in this PR?

The integration directory has been added

Are these changes tested?

Yes

Are there any user-facing changes?

No

Copy link

⚠️ GitHub issue #45796 has been automatically assigned in GitHub to PR creator.

Copy link

⚠️ GitHub issue #45796 has no components, please add labels for components.

exc = executable(
'arrow-json-integration-test',
sources: ['json_integration_test.cc'],
dependencies: [arrow_dep, rapidjson_dep, gflags_dep, gtest_dep],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kou there is some inconsistency in the tests here that you alluded to before. Most tests do not define a main function and therefore use gtest_main_dep as a dependency. However, this JSON integration test does define its own main, so you have to link just gtest_dep or you end up with duplicate main symbols.

I don't know the history of this test enough to know if it is intentional that some tests define their own main function while others do not. Does it make sense to have two different dependencies or should we consider removing main from this test module?

Copy link
Member

Choose a reason for hiding this comment

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

I think that this is intentional. The test is used for an unit test and an integration test with other implementations. If the test is used for an integration test with other implementations, we pass a custom --integration flag. So we have a custom main().

Could you use gtest_dep not gtest_main_dep here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good - yes this is already using gtest_dep :-)

@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Mar 14, 2025
else
rapidjson_dep = disabler()
endif
rapidjson_dep = dependency('rapidjson', include_type: 'system')
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need to remove the if needs_json check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The integration tests requires RapidJSON but does not require the JSON option to be set, so to get that to work without disabling the integration test I think this need to exist without branching

Copy link
Member

Choose a reason for hiding this comment

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

OK. Then can we use if needs_json or needs_integration instead of removing this condition?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem - done

exc = executable(
'arrow-json-integration-test',
sources: ['json_integration_test.cc'],
dependencies: [arrow_dep, rapidjson_dep, gflags_dep, gtest_dep],
Copy link
Member

Choose a reason for hiding this comment

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

I think that this is intentional. The test is used for an unit test and an integration test with other implementations. If the test is used for an integration test with other implementations, we pass a custom --integration flag. So we have a custom main().

Could you use gtest_dep not gtest_main_dep here?

@github-actions github-actions bot added awaiting changes Awaiting changes awaiting change review Awaiting change review and removed awaiting committer review Awaiting committer review awaiting changes Awaiting changes labels Mar 15, 2025
@WillAyd WillAyd force-pushed the meson-add-integration-directory branch from 467fc64 to 1311f6e Compare March 16, 2025 07:56
@WillAyd
Copy link
Contributor Author

WillAyd commented Mar 16, 2025

@github-actions crossbow submit *meson

Copy link

Revision: 1311f6e

Submitted crossbow builds: ursacomputing/crossbow @ actions-d35184ccea

Task Status
test-conda-cpp-meson GitHub Actions

@WillAyd
Copy link
Contributor Author

WillAyd commented Mar 18, 2025

@github-actions crossbow submit *meson

Copy link

Revision: d10ffa7

Submitted crossbow builds: ursacomputing/crossbow @ actions-c950246fa9

Task Status
test-conda-cpp-meson GitHub Actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants