Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,29 @@ jobs:
--ignore=ratc/ \
--ignore=linktest/

java-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Download jeromq
run: |
curl -fsSL -o jeromq.jar https://repo1.maven.org/maven2/org/zeromq/jeromq/0.6.0/jeromq-0.6.0.jar

- name: Compile Java tests
run: |
javac -cp jeromq.jar concoredocker.java TestLiteralEval.java TestConcoredockerApi.java

- name: Run Java tests
run: |
java -cp .:jeromq.jar TestLiteralEval
java -cp .:jeromq.jar TestConcoredockerApi

docker-build:
runs-on: ubuntu-latest
steps:
Expand Down
10 changes: 9 additions & 1 deletion tests/protocol_fixtures/PROTOCOL_FIXTURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,12 @@ Phase-2 scope (mapping only):

- No runtime behavior changes.
- Adds a cross-runtime matrix to track per-case audit status and classification.
- Keeps CI non-blocking for non-Python runtimes by marking them as `not_audited` until adapters are added.
- Java runtime entries are tracked with observed status from the Java regression suite (`TestLiteralEval.java`, `TestConcoredockerApi.java`).
- Current baseline records Java as `observed_pass` for the listed phase-2 cases.
- Keeps CI non-blocking for non-Python runtimes that are not yet audited by marking them as `not_audited`.

Java conformance execution in CI:

- The `java-test` job in `.github/workflows/ci.yml` downloads `jeromq` for classpath compatibility.
- It compiles `concoredocker.java`, `TestLiteralEval.java`, and `TestConcoredockerApi.java`.
- It runs both Java test classes and records initial phase-2 matrix status as observed in CI.
31 changes: 31 additions & 0 deletions tests/protocol_fixtures/cross_runtime_matrix.phase2.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"runtimes": [
"python",
"cpp",
"java",
"matlab",
"octave",
"verilog"
Expand Down Expand Up @@ -35,6 +36,11 @@
"classification": "required",
"note": "Audit planned in phase 2."
},
"java": {
"status": "observed_pass",
"classification": "required",
"note": "Validated by TestLiteralEval.java and TestConcoredockerApi.java."
},
"matlab": {
"status": "not_audited",
"classification": "required",
Expand Down Expand Up @@ -66,6 +72,11 @@
"classification": "required",
"note": "Audit planned in phase 2."
},
"java": {
"status": "observed_pass",
"classification": "required",
"note": "Validated by TestLiteralEval.java and TestConcoredockerApi.java."
},
"matlab": {
"status": "not_audited",
"classification": "required",
Expand Down Expand Up @@ -97,6 +108,11 @@
"classification": "required",
"note": "Audit planned in phase 2."
},
"java": {
"status": "observed_pass",
"classification": "required",
"note": "Validated by TestLiteralEval.java and TestConcoredockerApi.java."
},
"matlab": {
"status": "not_audited",
"classification": "required",
Expand Down Expand Up @@ -128,6 +144,11 @@
"classification": "required",
"note": "Audit planned in phase 2."
},
"java": {
"status": "observed_pass",
"classification": "required",
"note": "Validated by TestLiteralEval.java and TestConcoredockerApi.java."
},
"matlab": {
"status": "not_audited",
"classification": "required",
Expand Down Expand Up @@ -159,6 +180,11 @@
"classification": "required",
"note": "Audit planned in phase 2."
},
"java": {
"status": "observed_pass",
"classification": "required",
"note": "Validated by TestLiteralEval.java and TestConcoredockerApi.java."
},
"matlab": {
"status": "not_audited",
"classification": "required",
Expand Down Expand Up @@ -190,6 +216,11 @@
"classification": "required",
"note": "Audit planned in phase 2."
},
"java": {
"status": "observed_pass",
"classification": "required",
"note": "Validated by TestLiteralEval.java and TestConcoredockerApi.java."
},
"matlab": {
"status": "not_audited",
"classification": "required",
Expand Down
13 changes: 12 additions & 1 deletion tests/test_protocol_conformance_phase2.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
PHASE1_CASES_PATH = FIXTURE_DIR / "python_phase1_cases.json"
PHASE2_MATRIX_PATH = FIXTURE_DIR / "cross_runtime_matrix.phase2.json"

EXPECTED_RUNTIMES = {"python", "cpp", "matlab", "octave", "verilog"}
EXPECTED_RUNTIMES = {"python", "cpp", "java", "matlab", "octave", "verilog"}
EXPECTED_CLASSIFICATIONS = {"required", "implementation_defined", "known_deviation"}
EXPECTED_STATUSES = {"observed_pass", "observed_fail", "not_audited"}

Expand All @@ -30,6 +30,8 @@ def test_phase2_matrix_metadata_and_enums():
assert doc["phase"] == "2"
assert doc["mode"] == "report_only"
assert doc["source_fixture"] == "python_phase1_cases.json"
assert "java" in doc["runtimes"]
assert len(doc["runtimes"]) == len(set(doc["runtimes"]))
assert set(doc["runtimes"]) == EXPECTED_RUNTIMES
assert set(doc["classifications"]) == EXPECTED_CLASSIFICATIONS
assert set(doc["statuses"]) == EXPECTED_STATUSES
Expand All @@ -55,3 +57,12 @@ def test_phase2_matrix_rows_have_consistent_shape():
assert isinstance(result["note"], str) and result["note"].strip()
if runtime == "python":
assert result["status"] == "observed_pass"


def test_phase2_matrix_java_status_is_recorded_for_each_case():
for row in _phase2_matrix()["cases"]:
java_result = row["runtime_results"]["java"]
assert java_result["status"] in EXPECTED_STATUSES
assert java_result["classification"] in EXPECTED_CLASSIFICATIONS
assert isinstance(java_result["note"], str) and java_result["note"].strip()
assert java_result["status"] == "observed_pass"
Loading