-
Notifications
You must be signed in to change notification settings - Fork 20
Pure-Java conformance tests #941
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,57 +1,40 @@ | ||
| # Running CEL-spec conformance tests against CEL-Java | ||
| # Running CEL-Spec conformance tests against CEL-Java | ||
|
|
||
| If your environment is already setup, just run the shell script | ||
| ```shell | ||
| ./run-conformance-tests.sh | ||
| ``` | ||
|
|
||
| ## Requirements & Setup | ||
| The CEL-Java conformance suite is a JUnit test suite that reads upstream CEL-Spec | ||
| simple testdata from the `submodules/cel-spec` Git submodule. | ||
|
|
||
| The CEL-spec conformance test suite is written in Go and uses the bazel build tool. | ||
| Run it with: | ||
|
|
||
| Required tools: | ||
| * [Bazel build tool](https://bazel.build/) (see [bazelisk](https://github.com/bazelbuild/bazelisk?tab=readme-ov-file#installation)) | ||
|
|
||
| See [Bazel web site](https://bazel.build/install) for installation instructions. | ||
| Do **not** use the `bazel-bootstrap` package on Ubuntu, because it comes with | ||
| pre-compiled classes that are built with Java 17 or newer, preventing it from | ||
| running bazel using older Java versions. | ||
| * gcc | ||
|
|
||
| On Ubuntu run `apt-get install gcc` | ||
| ```shell | ||
| ./gradlew :cel-conformance:test | ||
| ``` | ||
|
|
||
| Other required dependencies like "Go" will be managed by bazel. | ||
| The suite does not require Bazel, Go, a separate conformance server, or the old | ||
| upstream `simple_test` binary. | ||
|
|
||
| ## FAQ | ||
| ## Test selection | ||
|
|
||
| ### Bazel build hangs | ||
| The curated conformance file list and skip list live in: | ||
|
|
||
| If the bazel build does not start, i.e. it gets stuck with messages like | ||
| ``` | ||
| Starting local Bazel server and connecting to it... | ||
| ... still trying to connect to local Bazel server after 10 seconds ... | ||
| ... still trying to connect to local Bazel server after 20 seconds ... | ||
| ... still trying to connect to local Bazel server after 30 seconds ... | ||
| ```text | ||
| conformance/src/test/java/org/projectnessie/cel/conformance/SimpleConformanceTest.java | ||
| ``` | ||
| then kill all bazel processes make sure that Java 11 is the current one. It seems, that the | ||
| above *may* happen when with Java 8. | ||
|
|
||
| ### Bazel build fails from `./run-conformance-tests.sh` | ||
| Each skip uses the upstream conformance path: | ||
|
|
||
| If the bazel build fails with an error like this (note the `Failed to create temporary file`), | ||
| run the bazel build once from the console: | ||
|
|
||
| ```shell | ||
| cd submodules/cel-spec | ||
|
|
||
| bazel build ... | ||
| ```text | ||
| file/section/test | ||
| ``` | ||
|
|
||
| If the build still fails, try the following options: | ||
| or a whole-section path: | ||
|
|
||
| ```shell | ||
| bazel build ... --sandbox_writable_path="${HOME}/.ccache" --strategy=CppCompile=standalone | ||
| ```text | ||
| file/section | ||
| ``` | ||
|
|
||
| After the build succeeds once from that directory, you can use the `./run-conformance-tests.sh` | ||
| script. | ||
| Unmatched skips fail the test suite, so stale skips are visible when upstream | ||
| testdata changes. | ||
|
|
||
| Optional CEL-Spec files such as extension libraries, optionals, and type | ||
| deduction are intentionally not enabled by default. Add those separately with | ||
| explicit skip reasoning. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the last sentence a TODO ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, scope to follow-up work.