Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Bazel tests#1601

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
bcsgh wants to merge5 commits intoopen-source-parsers:master
base:master
Choose a base branch
Loading
frombcsgh:bcsgh/bazel-tests

Conversation

@bcsgh
Copy link
Contributor

@bcsghbcsgh commentedMar 17, 2025
edited
Loading

  • Tweakrunjsontests.py to allow passing single test case files (which s way easier to get than a dir name under Bazel).
  • Add tests to the Bazel builds.

Note:

  • This is on top ofMake the build configuration under Bazel more correct. #1600
  • Because Bazle doesn't allow directly referencing source file from test rules (the path they end up in is an implementation detail) it ends up harder to find the directory that contains the test cases than to find the path for a single test case. To deal with that, this PR creates one test rule per test case so that each command only need the actual file path. That ends up looking a little odd, but is has the collateral benefit of surfacing exactly what does, doesn't work.

Testing:

This pass with all 4 combinations:

foriintruefalse;doforeintruefalse;do    bazeltest --@//:use_exception=${e} --@//:has_int64=${i} ...donedone

While working on this, I intentionally broke a pass and fail test in each directory to be sure those resulted in a failing test rule, and they did.

…th defaults that match the existing Bazel build.Switch //:jsoncpp from using copts ro defines for JSON_USE_EXCEPTION and JSON_HAS_INT64 so that rules that depend on it get the same config.Make src/test_lib_json/fuzz.cpp respect JSON_USE_EXCEPTION.
Copy link
Contributor

@baylesjbaylesj left a comment

Choose a reason for hiding this comment

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

I know this is in Draft still but here's some early feedback.


bool_flag(
name="use_exception",
build_setting_default=False,
Copy link
Contributor

Choose a reason for hiding this comment

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

Exceptions should be on by default, I believe.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

As an abstract question, that's debatable (as in there are good arguments either way). But, given that the existing Bazel build has them off by default, I think backwards compatibility requires keeping them that way.

Thoughts?

Copy link
ContributorAuthor

@bcsghbcsghMar 19, 2025
edited
Loading

Choose a reason for hiding this comment

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

Also: probably a discussion that should be on the record of#1600 (unless you want to merge just this PR and not that one).

@bcsghbcsgh marked this pull request as ready for reviewMarch 19, 2025 01:16
@bcsgh
Copy link
ContributorAuthor

Poke? (but#1600 first)

@bcsghbcsgh marked this pull request as draftSeptember 1, 2025 21:07
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@baylesjbaylesjbaylesj left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@bcsgh@baylesj

[8]ページ先頭

©2009-2025 Movatter.jp