diff --git a/crates/horizon-client/Cargo.toml b/crates/horizon-client/Cargo.toml index c0296cc1c6..3008727650 100644 --- a/crates/horizon-client/Cargo.toml +++ b/crates/horizon-client/Cargo.toml @@ -85,6 +85,11 @@ mods = ["horizon-mods/runtime"] # Records the call sites of mob random draws (`mob_ai_probe` traces). rng-trace = ["horizon-core/rng-trace"] +# Its own name, not `probe`: Cargo copies every crate's examples into one target//examples. +[[example]] +name = "client_probe" +path = "examples/probe/main.rs" + [lints] workspace = true diff --git a/crates/horizon-client/examples/probe/dispatch.rs b/crates/horizon-client/examples/probe/dispatch.rs index b40cf1a6e4..8754e944d9 100644 --- a/crates/horizon-client/examples/probe/dispatch.rs +++ b/crates/horizon-client/examples/probe/dispatch.rs @@ -41,7 +41,7 @@ pub fn main(names: &[&str], run: fn(&str) -> Option) -> ExitCode { let name = std::env::args().nth(1).unwrap_or_default(); run(&name).unwrap_or_else(|| { eprintln!( - "usage: probe [arguments...]\nprobes: {}", + "usage: client_probe [arguments...]\nprobes: {}", names.join(" ") ); ExitCode::from(2) diff --git a/crates/horizon-protocol/Cargo.toml b/crates/horizon-protocol/Cargo.toml index 05655e8af8..71b93a1fe1 100644 --- a/crates/horizon-protocol/Cargo.toml +++ b/crates/horizon-protocol/Cargo.toml @@ -17,5 +17,10 @@ sha1 = "0.10" # Secure chat: SHA256withRSA message signatures. sha2 = "0.10" +# Its own name, not `probe`: Cargo copies every crate's examples into one target//examples. +[[example]] +name = "protocol_probe" +path = "examples/probe.rs" + [lints] workspace = true diff --git a/crates/horizon-protocol/examples/probe.rs b/crates/horizon-protocol/examples/probe.rs index 005be919f4..63fc0f9d3a 100644 --- a/crates/horizon-protocol/examples/probe.rs +++ b/crates/horizon-protocol/examples/probe.rs @@ -2,7 +2,7 @@ //! seconds, reporting packet counts and any decode failures. A differential //! check of the codecs against a real vanilla server: //! -//! cargo run -p horizon-protocol --example probe -- 127.0.0.1:25565 [seconds] [registries.json] +//! cargo run -p horizon-protocol --example protocol_probe -- 127.0.0.1:25565 [seconds] [registries.json] use horizon_protocol::{ PROTOCOL_VERSION, State, connection::Connection, diff --git a/crates/horizon-world/Cargo.toml b/crates/horizon-world/Cargo.toml index 3a86212434..89f82bbe24 100644 --- a/crates/horizon-world/Cargo.toml +++ b/crates/horizon-world/Cargo.toml @@ -25,5 +25,10 @@ path = "src/main.rs" name = "horizon-worldgen-parity" path = "src/bin/worldgen_parity.rs" +# Its own name, not `probe`: Cargo copies every crate's examples into one target//examples. +[[example]] +name = "world_probe" +path = "examples/probe/main.rs" + [lints] workspace = true diff --git a/crates/horizon-world/examples/probe/dispatch.rs b/crates/horizon-world/examples/probe/dispatch.rs index 0b396edabf..80b875eef7 100644 --- a/crates/horizon-world/examples/probe/dispatch.rs +++ b/crates/horizon-world/examples/probe/dispatch.rs @@ -32,7 +32,7 @@ pub fn main(names: &[&str], run: fn(&str) -> Option) -> ExitCode { let name = std::env::args().nth(1).unwrap_or_default(); run(&name).unwrap_or_else(|| { eprintln!( - "usage: probe [arguments...]\nprobes: {}", + "usage: world_probe [arguments...]\nprobes: {}", names.join(" ") ); ExitCode::from(2) diff --git a/docs/parity-workflow.md b/docs/parity-workflow.md index a2cd105849..1b00080e70 100644 --- a/docs/parity-workflow.md +++ b/docs/parity-workflow.md @@ -26,7 +26,7 @@ Vanilla oracle runs are reused as well. `tools/parity_shim.py` stands in for `ja Probes build into `.local/parity-target/` with release optimisation but no LTO and 16 codegen units. On ludodesktop that rebuilds every `horizon-world` probe in 3 seconds after a one-line change, against 122 seconds with the release profile. Rust gives these settings identical results (no fast-math; overflow checks as in release), and the full harness suite passes under them. Probes that harnesses build in the dev profile get `opt-level = 3` too, keeping their overflow checks and debug assertions. Harnesses must locate binaries through `cargo metadata` or `lab.cargo_target()`, never a hard-coded `target/`. -The probes of `horizon-world` and of `horizon-client` are one binary per crate, `cargo build --release -p --example probe`: a harness runs `probe [arguments]`, and `` is a module in `crates//examples/probe/` (add it to the `mod` list and the `probes!` list in its `main.rs`; read arguments with `crate::args()` or `crate::args_os()`, which drop the name). Code several probes share goes in `examples/probe/support/` or a module of its own. Linking one binary instead of ~250 examples is most of what a probe build used to cost. The runner counts only the probes a harness ran, the probes and support modules they name, their own subdirectories and `dispatch.rs` as its dependencies, not `main.rs`, which only lists the probes: editing one probe reruns only its harnesses, and adding one reruns none. +The probes of `horizon-world` and of `horizon-client` are one binary per crate, `world_probe` and `client_probe` (`cargo build --release -p horizon-world --example world_probe`): a harness runs `world_probe [arguments]`, and `` is a module in `crates//examples/probe/` (add it to the `mod` list and the `probes!` list in its `main.rs`; read arguments with `crate::args()` or `crate::args_os()`, which drop the name). Code several probes share goes in `examples/probe/support/` or a module of its own. Linking one binary instead of ~250 examples is most of what a probe build used to cost. Each crate's probe has its own target name (set in its `Cargo.toml`, `protocol_probe` too): Cargo copies every crate's examples into one `/examples/` directory, and with one shared name a harness could run the binary another harness had just copied there. The runner counts only the probes a harness ran, the probes and support modules they name, their own subdirectories and `dispatch.rs` as its dependencies, not `main.rs`, which only lists the probes: editing one probe reruns only its harnesses, and adding one reruns none. Passes are shared between worktrees. A harness's key depends only on the content of its dependencies, not on where they are, so every pass is also written to `parity-shared/` beside the shared vanilla data (`PARITY_SHARED` overrides it). A worktree whose files match those a harness passed with, in any worktree, counts that pass without running the harness: after merging the integration branch, an agent's gate only runs the harnesses its own changes affect. diff --git a/tests/test_parity_runner.py b/tests/test_parity_runner.py index 633163bf57..eac664c89b 100644 --- a/tests/test_parity_runner.py +++ b/tests/test_parity_runner.py @@ -50,7 +50,8 @@ class ParityRunnerTests(unittest.TestCase): ]) def test_a_probe_binary_depends_only_on_the_probes_it_ran(self): - commands = [["/t/release/examples/probe", "a_fixture", "/dir"], ["cargo", "run", "--example", "probe", "--", "b_fixture"]] + commands = [["/t/release/examples/world_probe", "a_fixture", "/dir"], + ["cargo", "run", "-p", "horizon-client", "--example", "client_probe", "--", "b_fixture"]] self.assertEqual(parity.probes_run(commands), {"a_fixture", "b_fixture"}) with tempfile.TemporaryDirectory() as temp, mock.patch.object(parity, "ROOT", Path(temp)): probe = Path(temp, "crates/w/examples/probe") @@ -67,6 +68,40 @@ class ParityRunnerTests(unittest.TestCase): ["crates/w/src/lib.rs", *paths[:2], *paths[3:6], paths[8]]) self.assertEqual(parity.only_probes_run(paths, set()), paths) + def test_probe_names_are_each_crates_own_target(self): + self.assertEqual(parity.probes_run([ + ["C:/t/debug/examples/client_probe.exe", "a_fixture"], + ["cargo", "run", "--release", "--example=world_probe", "--", "b_fixture", "x"], + ["/t/release/examples/probe", "old_fixture"], # the shared name before 2026-10-24 + ["cargo", "run", "--example", "probe", "--", "old_fixture"], + ["/t/release/examples/mod_port_probe", "not_a_fixture"], + ["cargo", "run", "--example", "mod_port_probe", "--", "not_a_fixture"], + ["cargo", "build", "--example", "world_probe"], + ]), {"a_fixture", "b_fixture"}) + + def test_records_of_the_shared_probe_name_build_their_crates_probe(self): + record = {"dependencies": ["crates/horizon-world/examples/probe/a_fixture.rs", "crates/horizon-world/src/lib.rs"], + "artifacts": [["example", "probe", "release", ["-p", "horizon-client"], True], + ["example", "probe", "release"], # no selection: the crate of its probe sources + ["example", "probe", "release", ["-p", "horizon-core", "-p", "horizon-world"], True], + ["bin", "horizon-world", "release", ["-p", "horizon-world"], False]]} + artifacts = parity.recorded_artifacts(record) + self.assertEqual(artifacts, [["example", "client_probe", "release", ["-p", "horizon-client"], True], + ["example", "world_probe", "release"], + ["example", "world_probe", "release", ["-p", "horizon-core", "-p", "horizon-world"], True], + ["bin", "horizon-world", "release", ["-p", "horizon-world"], False]]) + packages = {("example", "client_probe"): "horizon-client", ("example", "world_probe"): "horizon-world", + ("bin", "horizon-world"): "horizon-world"} + self.assertEqual(parity.prebuild_commands(artifacts, packages), [ + ["cargo", "build", "--locked", "--profile", "release", "-p", "horizon-client", "--example", "client_probe"], + ["cargo", "build", "--locked", "--profile", "release", "-p", "horizon-core", "-p", "horizon-world", + "--example", "world_probe"], + ["cargo", "build", "--locked", "--profile", "release", "-p", "horizon-world", "--bin", "horizon-world"], + ["cargo", "build", "--locked", "--profile", "release", "-p", "horizon-world", "--example", "world_probe"], + ]) + self.assertEqual(parity.recorded_artifacts({"artifacts": [["example", "probe", "release"]]}), + [["example", "probe", "release"]]) # no crate to tell: left to its harness + def test_java_sources_include_classes_pulled_from_the_sourcepath(self): with tempfile.TemporaryDirectory() as temp: sources, classes = Path(temp, "src"), Path(temp, "classes") diff --git a/tools/audio_harness.py b/tools/audio_harness.py index 1d5908fe0a..99c432d119 100644 --- a/tools/audio_harness.py +++ b/tools/audio_harness.py @@ -65,9 +65,9 @@ def run_harness(name, oracle, example, inputs_text, extra_sources=(), java_args= dependencies = os.pathsep.join(map(str, [jars['client'], *libraries])) run(['javac', '--release', lock['minecraft']['java_major'], '-proc:none', '-sourcepath', lab.ROOT / 'mods/horizon/src/test/java', '-cp', dependencies, '-d', classes, oracle_path], 'compile-java') - run(['cargo', 'build', '--locked', '-p', 'horizon-client', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--locked', '-p', 'horizon-client', '--example', 'client_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) - binary = Path(metadata['target_directory']) / 'debug/examples' / ('probe.exe' if os.name == 'nt' else 'probe') + binary = Path(metadata['target_directory']) / 'debug/examples' / ('client_probe.exe' if os.name == 'nt' else 'client_probe') run([binary, example, *rust_args, inputs, build / 'rust.txt'], 'rust') env = dict(os.environ, ALSOFT_DRIVERS='null') run(['java', '-Xmx1G', '-cp', str(classes) + os.pathsep + dependencies, f'dev.horizonlab.parity.{oracle}', *java_args, inputs, build / 'client.txt'], diff --git a/tools/block_update_harness.py b/tools/block_update_harness.py index 852c013d55..b352836fec 100644 --- a/tools/block_update_harness.py +++ b/tools/block_update_harness.py @@ -133,7 +133,7 @@ def execute(name, cases, args, facts, origin_of=None): '-cp', dependencies, '-d', str(classes), str(java_root / 'dev/horizonlab/parity/VanillaBlockUpdateOracle.java')]) run(['java', '-Xmx2G', '-cp', str(classes) + os.pathsep + dependencies, 'dev.horizonlab.parity.VanillaBlockUpdateOracle', str(resources), str(work / 'cases.jsonl'), str(work / 'native.txt')]) - run(['cargo', 'run', '-q', '--release', '-p', 'horizon-world', '--example', 'probe', '--', + run(['cargo', 'run', '-q', '--release', '-p', 'horizon-world', '--example', 'world_probe', '--', 'block_update_fixture', str(resources), str(work / 'cases.jsonl'), str(work / 'rust.txt')], cwd=lab.ROOT, env={**os.environ, 'CARGO_BUILD_JOBS': '3'}) ignore = tuple(prefix + ' ' for prefix in args.ignore.split(',') if prefix) native = split_cases((work / 'native.txt').read_text(), ignore) diff --git a/tools/interaction_lab.py b/tools/interaction_lab.py index bc574b73d9..894a6d1c4d 100644 --- a/tools/interaction_lab.py +++ b/tools/interaction_lab.py @@ -50,7 +50,8 @@ def cargo_example(package, example, *args, profile=None): command = ['cargo', 'run', '-q', '-j3'] if profile: command += ['--profile', profile] - command += ['-p', package, '--example', 'probe', '--', example, *map(str, args)] + probe = package.removeprefix('horizon-') + '_probe' # each crate's probe example: client_probe, world_probe + command += ['-p', package, '--example', probe, '--', example, *map(str, args)] subprocess.run(command, check=True, cwd=lab.ROOT) diff --git a/tools/oracle_harness.py b/tools/oracle_harness.py index c6f45553f5..92e2a26a2c 100644 --- a/tools/oracle_harness.py +++ b/tools/oracle_harness.py @@ -32,12 +32,12 @@ def compile_oracle(build, oracle_name, jars, libraries, java_major): def build_probe(build, example): """Build the horizon-client probe binary; returns the command that runs probe `example`.""" - run_logged(['cargo', 'build', '--locked', '-p', 'horizon-client', '--example', 'probe'], + run_logged(['cargo', 'build', '--locked', '-p', 'horizon-client', '--example', 'client_probe'], build, 'compile-rust-' + example, env=dict(os.environ, CARGO_BUILD_JOBS='3')) import json metadata = json.loads(subprocess.check_output( ['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) - return [Path(metadata['target_directory']) / 'debug/examples/probe', example] + return [Path(metadata['target_directory']) / 'debug/examples/client_probe', example] def java_run(build, classes, dependencies, main_class, args, name, jvm=()): diff --git a/tools/parity.py b/tools/parity.py index a1a9f41330..4ed75f5ef5 100644 --- a/tools/parity.py +++ b/tools/parity.py @@ -466,22 +466,44 @@ def narrow_rust_sources(sources, scope): PROBE_SOURCE = re.compile(r"/examples/probe/(?:(support)/)?(\w+)\.rs$") +# Each crate's probe example (crates//examples/probe) and its target name. Until 2026-10-24 they were all +# `probe`, and Cargo copies every crate's examples into one /examples/: a harness could run the binary +# another harness had just copied there. +PROBE_TARGETS = {"horizon-client": "client_probe", "horizon-protocol": "protocol_probe", "horizon-world": "world_probe"} +OLD_PROBE_SOURCE = re.compile(r"crates/([\w-]+)/examples/probe[/.]") def probes_run(commands): - """The probes a harness ran through a crate's probe binary: `probe ...`, or - `cargo run --example probe -- ...`.""" + """The probes a harness ran through a crate's probe binary: `world_probe ...`, or + `cargo run --example world_probe -- ...`.""" names = set() for arguments in commands: - program = Path(arguments[0]).name if arguments else "" - if program in ("probe", "probe.exe") and len(arguments) > 1: + program = Path(arguments[0]).name.removesuffix(".exe") if arguments else "" + if program in PROBE_TARGETS.values() and len(arguments) > 1: names.add(arguments[1]) - elif program == "cargo" and "--" in arguments and "probe" in arguments[:arguments.index("--")] \ - and len(arguments) > arguments.index("--") + 1: + elif program == "cargo" and "--" in arguments and len(arguments) > arguments.index("--") + 1 \ + and any(kind == "example" and name in PROBE_TARGETS.values() for kind, name, *_ in artifacts_of(arguments)): names.add(arguments[arguments.index("--") + 1]) return names +def recorded_artifacts(record): + """A harness record's artifacts, with the shared `probe` target of records from before 2026-10-24 renamed to + its crate's own (PROBE_TARGETS): the crate the record's `-p` selection names, else the one whose probe sources + the harness depended on. The prebuild would otherwise drop them as targets that no longer exist.""" + artifacts = [] + for artifact in record.get("artifacts", []): + if artifact[:2] != ["example", "probe"]: + artifacts.append(artifact) + continue + selection = artifact[3] if len(artifact) > 3 else [] + crates = [value for flag, value in zip(selection, selection[1:]) if flag == "-p" and value in PROBE_TARGETS] \ + or sorted({match.group(1) for path in record.get("dependencies", []) + if (match := OLD_PROBE_SOURCE.match(path)) and match.group(1) in PROBE_TARGETS}) + artifacts += [["example", PROBE_TARGETS[crate], *artifact[2:]] for crate in crates] or [artifact] + return artifacts + + def only_probes_run(paths, names): """A probe binary's dep-info lists every probe in it. Keep those the harness ran, the probes they include! or name (crate::) and the shared support modules they name (support::), so that editing one probe @@ -1323,7 +1345,7 @@ def main(): if not record or "artifacts" not in record: template = SHARED / "dependencies" / f"{name}.json" record = json.loads(template.read_text(encoding="utf-8")) if template.exists() else {} - for artifact in record.get("artifacts", []): + for artifact in recorded_artifacts(record): if artifact not in artifacts: artifacts.append(artifact) config = host_config() diff --git a/tools/port_regen.py b/tools/port_regen.py index c47e7cc357..8ce639f214 100644 --- a/tools/port_regen.py +++ b/tools/port_regen.py @@ -229,9 +229,9 @@ def gen_vanilla_order(root, version, store, build): "dev.horizonlab.parity.VanillaCommandParseOracle", "tree", build], build) env = dict(os.environ, CARGO_TARGET_DIR=str(root / ".local" / "port-target")) jobs = os.environ.get("FLEET_LOAD_JOBS") - run(["cargo", "build", "-p", "horizon-client", "--example", "probe", + run(["cargo", "build", "-p", "horizon-client", "--example", "client_probe", *(["-j", jobs] if jobs else [])], root, env=env) - fixture = root / ".local/port-target/debug/examples/probe" + fixture = root / ".local/port-target/debug/examples/client_probe" run([fixture, "command_parse_fixture", "tree", build / "rust_tree.json"], root) return [python(), "tools/generate_command_order.py", build / "tree.json", build / "rust_tree.json"] diff --git a/tools/test_active_effect_tick_parity.py b/tools/test_active_effect_tick_parity.py index dcb34ae218..58c24511a1 100644 --- a/tools/test_active_effect_tick_parity.py +++ b/tools/test_active_effect_tick_parity.py @@ -72,9 +72,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaActiveEffectTickOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') references=[] for side,jar in jars.items(): java(side,side,build) diff --git a/tools/test_active_effects_parity.py b/tools/test_active_effects_parity.py index 926c2ecf80..10750d43ab 100644 --- a/tools/test_active_effects_parity.py +++ b/tools/test_active_effects_parity.py @@ -61,9 +61,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaActiveEffectsOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') references=[] for side,jar in jars.items(): java(side,side,build) diff --git a/tools/test_anchor_parity.py b/tools/test_anchor_parity.py index 19b8f6e4be..842a8517e1 100644 --- a/tools/test_anchor_parity.py +++ b/tools/test_anchor_parity.py @@ -53,9 +53,9 @@ def main(): with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) dependency_path=os.pathsep.join(map(str,libraries)) run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"anchor_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_arrow_parity.py b/tools/test_arrow_parity.py index 72692eb55f..ab6e690bec 100644 --- a/tools/test_arrow_parity.py +++ b/tools/test_arrow_parity.py @@ -241,9 +241,9 @@ def main(): expected = 3 * operations + len(fixtures) (build / 'inputs.txt').write_text(''.join(json.dumps(f, separators=(',', ':')) + '\n' for f in fixtures)) input_hash = lab.digest(build / 'inputs.txt', 'sha256') - run(['cargo', 'build', '--locked', '-p', 'horizon-client', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--locked', '-p', 'horizon-client', '--example', 'client_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) - binary = Path(metadata['target_directory']) / 'debug/examples' / ('probe.exe' if os.name=='nt' else 'probe') + binary = Path(metadata['target_directory']) / 'debug/examples' / ('client_probe.exe' if os.name=='nt' else 'client_probe') run([binary, 'arrow_probe',resources, build, '--describe'], 'describe') references = [] for side, jar in jars.items(): diff --git a/tools/test_attribute_health_parity.py b/tools/test_attribute_health_parity.py index eaf06d8575..56ace79729 100644 --- a/tools/test_attribute_health_parity.py +++ b/tools/test_attribute_health_parity.py @@ -59,9 +59,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaAttributeHealthOracle',mode,path],side+'-'+mode) java('server','export',build);states=json.loads((build/'catalog.json').read_text());fixtures=list(corpus(states));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs,build/'catalog.json'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'attribute_health_fixture',build],'rust');run([binary,'attribute_health_fixture',build,'live'],'rust-live');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_attribute_map_queries_parity.py b/tools/test_attribute_map_queries_parity.py index ca222a07c4..06048bf7b6 100644 --- a/tools/test_attribute_map_queries_parity.py +++ b/tools/test_attribute_map_queries_parity.py @@ -82,9 +82,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaAttributeMapQueriesOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') references=[] for side,jar in jars.items(): java(side,side,build) diff --git a/tools/test_attribute_parity.py b/tools/test_attribute_parity.py index 02051188de..d65486c216 100644 --- a/tools/test_attribute_parity.py +++ b/tools/test_attribute_parity.py @@ -89,9 +89,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaAttributeOracle',mode,path],side+'-'+mode) java('server','export',build);states=json.loads((build/'attributes.json').read_text());fixtures=list(corpus(states));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs,build/'attributes.json'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'attribute_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_attribute_updates_parity.py b/tools/test_attribute_updates_parity.py index cc4f70d1af..3cd33a4d67 100644 --- a/tools/test_attribute_updates_parity.py +++ b/tools/test_attribute_updates_parity.py @@ -70,9 +70,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaAttributeUpdatesOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') references=[] for side,jar in jars.items(): java(side,side,build) diff --git a/tools/test_basic_feature_parity.py b/tools/test_basic_feature_parity.py index 2de93cd1a1..69612bedb5 100644 --- a/tools/test_basic_feature_parity.py +++ b/tools/test_basic_feature_parity.py @@ -71,9 +71,9 @@ def main(): fixture_paths.append(path) if json.loads((build/"facts-client.json").read_text())!=json.loads((build/"facts-server.json").read_text()):raise ValueError("reference feature block states differ") tested_fixtures=base.source_hashes(fixture_paths) - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"basic_feature_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_biome_chunk_parity.py b/tools/test_biome_chunk_parity.py index f24370455e..a431036ff8 100644 --- a/tools/test_biome_chunk_parity.py +++ b/tools/test_biome_chunk_parity.py @@ -57,9 +57,9 @@ def main(): with (build/(name+".log")).open("w",encoding="utf-8") as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) dependency_path=os.pathsep.join(map(str,libraries)) run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"biome_chunk_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_biome_generation_parity.py b/tools/test_biome_generation_parity.py index 67c6425855..7124cd7422 100644 --- a/tools/test_biome_generation_parity.py +++ b/tools/test_biome_generation_parity.py @@ -76,9 +76,9 @@ def main(): registries=build/'registries.json';registries.write_text(json.dumps(bundle,separators=(',',':')),encoding='utf-8') fixtures=list(corpus(bundle));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(f,separators=(',',':'))+'\n' for f in fixtures),encoding='utf-8') fixture_paths=[inputs,registries,*exports];tested_fixtures=base.source_hashes(fixture_paths) - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"biome_generation_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_biome_placement_parity.py b/tools/test_biome_placement_parity.py index caf99b7c95..8250cecb52 100644 --- a/tools/test_biome_placement_parity.py +++ b/tools/test_biome_placement_parity.py @@ -53,9 +53,9 @@ def main(): with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) dependency_path=os.pathsep.join(map(str,libraries)) run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-sourcepath',str(lab.ROOT/'mods/horizon/src/test/java'),'-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,helper],'compile-java') - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'biome_placement_fixture',build],'rust');references=[] for side,jar in jars.items(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jar),dependency_path]),'dev.horizonlab.parity.VanillaBiomePlacementOracle',side,build],side) diff --git a/tools/test_biome_source_codec_parity.py b/tools/test_biome_source_codec_parity.py index 9363378af4..c40b1c84e4 100644 --- a/tools/test_biome_source_codec_parity.py +++ b/tools/test_biome_source_codec_parity.py @@ -95,9 +95,9 @@ def main(): fixtures=list(corpus(bundle));inputs=build/'inputs.txt';inputs.write_text('\n'.join(fixtures)+'\n',encoding='utf-8') (build/'positions.json').write_text(json.dumps(positions(),separators=(',',':')),encoding='utf-8') fixture_paths=[inputs,*exports,build/'positions.json',*[build/(name+'.json') for name in bundle]];tested_fixtures=base.source_hashes(fixture_paths) - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"biome_source_codec_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_biome_source_parity.py b/tools/test_biome_source_parity.py index 7616f7545a..6969e85622 100644 --- a/tools/test_biome_source_parity.py +++ b/tools/test_biome_source_parity.py @@ -44,9 +44,9 @@ def main(): with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) dependency_path=os.pathsep.join(map(str,libraries)) run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"biome_source_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_biome_temperature_parity.py b/tools/test_biome_temperature_parity.py index af8d75976a..e4c07c03a0 100644 --- a/tools/test_biome_temperature_parity.py +++ b/tools/test_biome_temperature_parity.py @@ -82,9 +82,9 @@ def main(): with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) dependency_path=os.pathsep.join(map(str,libraries)) run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"biome_temperature_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_block_collision_scan_parity.py b/tools/test_block_collision_scan_parity.py index a59bfd8f97..86dc4fc5df 100644 --- a/tools/test_block_collision_scan_parity.py +++ b/tools/test_block_collision_scan_parity.py @@ -68,9 +68,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaBlockCollisionScanOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'block_collision_scan_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_block_entity_anim_parity.py b/tools/test_block_entity_anim_parity.py index b0c462aeec..41f0484364 100755 --- a/tools/test_block_entity_anim_parity.py +++ b/tools/test_block_entity_anim_parity.py @@ -279,7 +279,7 @@ def main(): *(PARITY / f'{n}.java' for n in ('ParityData', 'VanillaBlockEntityAnimOracle'))], 'compile-java') run(['java', '-Xmx2G', '-cp', str(classes) + os.pathsep + dependencies, 'dev.horizonlab.parity.VanillaBlockEntityAnimOracle', inputs, build / 'vanilla.txt'], 'vanilla') - run(['cargo', 'run', '--quiet', '--profile', 'fast', '-p', 'horizon-client', '--example', 'probe', '--', + run(['cargo', 'run', '--quiet', '--profile', 'fast', '-p', 'horizon-client', '--example', 'client_probe', '--', 'block_entity_anim_fixture', resources, inputs, build / 'rust.txt'], 'rust') def split(path): diff --git a/tools/test_block_entity_render_parity.py b/tools/test_block_entity_render_parity.py index 901f4300fc..27e7401917 100644 --- a/tools/test_block_entity_render_parity.py +++ b/tools/test_block_entity_render_parity.py @@ -303,7 +303,7 @@ def main(): vanilla = [json.loads(l) for l in (build / 'vanilla.jsonl').read_text().splitlines()] textures = sorted({s['texture'] for v in vanilla for s in v.get('submits', []) if 'texture' in s}) (build / 'textures.txt').write_text(''.join(t + '\n' for t in textures)) - run(['cargo', 'run', '--quiet', '--profile', 'fast', '-p', 'horizon-client', '--example', 'probe', '--', + run(['cargo', 'run', '--quiet', '--profile', 'fast', '-p', 'horizon-client', '--example', 'client_probe', '--', 'block_entity_render_fixture', resources, inputs, build / 'textures.txt', build / 'rust.jsonl'], 'rust') rust = [json.loads(l) for l in (build / 'rust.jsonl').read_text().splitlines()] assert len(vanilla) == len(rust), (len(vanilla), len(rust)) diff --git a/tools/test_block_entity_storage_parity.py b/tools/test_block_entity_storage_parity.py index a1f378f318..5d9acd9668 100644 --- a/tools/test_block_entity_storage_parity.py +++ b/tools/test_block_entity_storage_parity.py @@ -75,9 +75,9 @@ def main(): with (build/(name+'.log')).open('w') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) dependencies=os.pathsep.join(map(str,libraries)) run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-sourcepath',str(lab.ROOT/'mods/horizon/src/test/java'),'-cp',str(jars['server'])+os.pathsep+dependencies,'-d',classes,oracle],'compile-java') - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'block_entity_storage_fixture',inputs,build/'rust.txt'],'rust') references=[] for side,jar in jars.items(): diff --git a/tools/test_block_entity_tickers_parity.py b/tools/test_block_entity_tickers_parity.py index 66a84cf48f..d8e19c7409 100644 --- a/tools/test_block_entity_tickers_parity.py +++ b/tools/test_block_entity_tickers_parity.py @@ -120,7 +120,7 @@ def main(): run(['java', '-Xmx1G', '-cp', str(classes) + os.pathsep + dependencies, 'dev.horizonlab.parity.VanillaBlockEntityTickerOracle', inputs, build / 'vanilla.txt'], 'vanilla') run(['cargo', 'run', '--quiet', '--profile', 'fast', '-p', 'horizon-client', '--example', - 'probe', '--', 'block_entity_tickers_fixture', inputs, build / 'rust.txt'], 'rust') + 'client_probe', '--', 'block_entity_tickers_fixture', inputs, build / 'rust.txt'], 'rust') matched = base.compare(build / 'vanilla.txt', build / 'rust.txt') ticks = sum(1 for line in lines if line == 'tick') listed = sum(len(line.split()) - 1 for line in (build / 'vanilla.txt').read_text().splitlines()) diff --git a/tools/test_block_landing_parity.py b/tools/test_block_landing_parity.py index 822ff16146..33789992a5 100644 --- a/tools/test_block_landing_parity.py +++ b/tools/test_block_landing_parity.py @@ -69,8 +69,8 @@ def main(): with (build/'inputs.txt').open('w') as output: for f in corpus(states,definitions):output.write(json.dumps(f,separators=(',',':'))+'\n');count+=1 fixture_paths=[build/n for n in ['inputs.txt','landing-states.json','landing-definitions.json','movement-properties.nbt','block-registry.nbt','cached-collision.nbt']];fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--locked','--release','-p','horizon-world','--example','probe'],'compile-rust') - metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT));binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + run(['cargo','build','--locked','--release','-p','horizon-world','--example','world_probe'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT));binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'block_landing_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side);matched=base.compare(build/(side+'.txt'),build/'rust.txt');references.append(dict(side=side,jar_sha256=lab.digest(jar,'sha256'),output_sha256=lab.digest(build/(side+'.txt'),'sha256'),matched_output_lines=matched));print(f'{side}: {matched:,} registered block landing lines match',flush=True) diff --git a/tools/test_block_properties_parity.py b/tools/test_block_properties_parity.py index 28cd2832c9..bca33c11c2 100644 --- a/tools/test_block_properties_parity.py +++ b/tools/test_block_properties_parity.py @@ -57,9 +57,9 @@ def main(): java('server','export',build) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs,build/'block-registry.nbt',build/'cached-collision.nbt',build/'block-properties.nbt'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'block_properties_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_block_push_parity.py b/tools/test_block_push_parity.py index 986a3b1c9e..6c752b98c8 100644 --- a/tools/test_block_push_parity.py +++ b/tools/test_block_push_parity.py @@ -53,9 +53,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaBlockPushOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'block_push_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_block_state_codec_parity.py b/tools/test_block_state_codec_parity.py index e6db508607..ca05c92d9d 100644 --- a/tools/test_block_state_codec_parity.py +++ b/tools/test_block_state_codec_parity.py @@ -60,9 +60,9 @@ def main(): if len(facts['states'])!=35723:raise ValueError('incomplete pinned state registry') fixtures=list(corpus(facts));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs,build/'facts-client.json',build/'facts-server.json'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'block_state_codec_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_block_support_parity.py b/tools/test_block_support_parity.py index 928f099d17..7b3b772743 100644 --- a/tools/test_block_support_parity.py +++ b/tools/test_block_support_parity.py @@ -35,9 +35,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaBlockSupportOracle',mode,path],side+'-'+mode) java('server','export',build) fixture_paths=[build/'block-registry.nbt',build/'cached-support.nbt'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'block_support_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_block_survival_parity.py b/tools/test_block_survival_parity.py index 2d99db9e28..7eca89332a 100644 --- a/tools/test_block_survival_parity.py +++ b/tools/test_block_survival_parity.py @@ -236,9 +236,9 @@ def main(): output.write(json.dumps(fixture,separators=(',',':'))+'\n');fixture_count+=1 fixture_paths=[inputs,build/'survival-extra-definitions.json',build/'fluid-tags.json',build/'survival-placement-classes.json',build/'survival-support-tags.json',build/'facts.json',build/'survival-classes.json',build/'survival-rules.json',build/'tags.json',build/'block-registry.nbt',build/'cached-collision.nbt',build/'block-properties.nbt',build/'cached-support.nbt'] tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') base.ensure_sources_unchanged(sources,tested_sources) checkpoint={'schema':1,'environment':environment,'sources_sha256':tested_sources,'fixtures_sha256':{str(lab.ROOT/name):digest for name,digest in tested_fixtures.items()},'artifacts_sha256':{str(path):lab.digest(path,'sha256') for path in [binary,*sorted(classes.rglob('*.class'))]},'binary':str(binary),'counts':{'supported_blocks':len(definitions),'supported_states':sum(state['id'] in definitions for state in facts['states']),'survival_rules':len(set(definitions.values())),'survival_rule_kinds':len({rule.split(':',1)[0] for rule in definitions.values()}),'fluid_tag_files':len(fluid_tags),'fixtures':fixture_count},'outputs':{}} save_checkpoint(checkpoint_path,checkpoint) diff --git a/tools/test_blocking_item_damage_parity.py b/tools/test_blocking_item_damage_parity.py index b8b3ea251b..ea313c3da0 100644 --- a/tools/test_blocking_item_damage_parity.py +++ b/tools/test_blocking_item_damage_parity.py @@ -60,9 +60,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaBlockingItemDamageOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'blocking_item_damage_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_blocking_rules_parity.py b/tools/test_blocking_rules_parity.py index 2ff5763d6c..95141670a3 100644 --- a/tools/test_blocking_rules_parity.py +++ b/tools/test_blocking_rules_parity.py @@ -60,9 +60,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaBlockingRulesOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'blocking_rules_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_bulk_section_parity.py b/tools/test_bulk_section_parity.py index b9a9ae3a81..9364e29b66 100644 --- a/tools/test_bulk_section_parity.py +++ b/tools/test_bulk_section_parity.py @@ -70,9 +70,9 @@ def main(): (build/"tags.json").write_text(json.dumps(tags,separators=(",",":")),encoding="utf-8") fixture_paths=[inputs,build/"tags.json",build/"facts-client.json",build/"facts-server.json"] tested_fixtures=base.source_hashes(fixture_paths) - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"bulk_section_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_bundle_weight_parity.py b/tools/test_bundle_weight_parity.py index c509e08a19..7d3047dabe 100644 --- a/tools/test_bundle_weight_parity.py +++ b/tools/test_bundle_weight_parity.py @@ -64,9 +64,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaBundleWeightOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'bundle_weight_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_canyon_carver_parity.py b/tools/test_canyon_carver_parity.py index 25fbc30de7..2122000a3f 100644 --- a/tools/test_canyon_carver_parity.py +++ b/tools/test_canyon_carver_parity.py @@ -65,9 +65,9 @@ def main(): with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) dependency_path=os.pathsep.join(map(str,libraries)) run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,helper],"compile-java") - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"canyon_carver_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_carving_geometry_parity.py b/tools/test_carving_geometry_parity.py index e69331bbed..42275cc155 100644 --- a/tools/test_carving_geometry_parity.py +++ b/tools/test_carving_geometry_parity.py @@ -72,9 +72,9 @@ def main(): with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) dependency_path=os.pathsep.join(map(str,libraries)) run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"carving_geometry_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_carving_mask_parity.py b/tools/test_carving_mask_parity.py index 15dacf52e8..873d5bb07a 100644 --- a/tools/test_carving_mask_parity.py +++ b/tools/test_carving_mask_parity.py @@ -65,9 +65,9 @@ def main(): with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) dependency_path=os.pathsep.join(map(str,libraries)) run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"carving_mask_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_cave_carver_parity.py b/tools/test_cave_carver_parity.py index d79914762b..8edefb42e9 100644 --- a/tools/test_cave_carver_parity.py +++ b/tools/test_cave_carver_parity.py @@ -60,9 +60,9 @@ def main(): with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) dependency_path=os.pathsep.join(map(str,libraries)) run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,helper],"compile-java") - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"cave_carver_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_chunk_generation_parity.py b/tools/test_chunk_generation_parity.py index 6951e4355e..1cd495eb64 100644 --- a/tools/test_chunk_generation_parity.py +++ b/tools/test_chunk_generation_parity.py @@ -71,9 +71,9 @@ class Oracle: def rust_binary(): - subprocess.run(['cargo', 'build', '--release', '-q', '-p', 'horizon-world', '--example', 'probe'], check=True, cwd=lab.ROOT) + subprocess.run(['cargo', 'build', '--release', '-q', '-p', 'horizon-world', '--example', 'world_probe'], check=True, cwd=lab.ROOT) metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--no-deps', '--format-version', '1'], cwd=lab.ROOT, text=True)) - return Path(metadata['target_directory']) / 'release/examples/probe' + return Path(metadata['target_directory']) / 'release/examples/world_probe' def run_rust(binary, out, seed, dimension, rects, scan=False): diff --git a/tools/test_chunk_stage_parity.py b/tools/test_chunk_stage_parity.py index b8aaa6153d..691bab709a 100644 --- a/tools/test_chunk_stage_parity.py +++ b/tools/test_chunk_stage_parity.py @@ -73,9 +73,9 @@ def main(): (build/"tags.json").write_text(json.dumps(tags,separators=(",",":")),encoding="utf-8") fixture_paths=[inputs,build/"tags.json",build/"facts-client.json",build/"facts-server.json"] tested_fixtures=base.source_hashes(fixture_paths) - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"chunk_stage_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_chunk_status_parity.py b/tools/test_chunk_status_parity.py index 17c3d65ed3..b6f45a5395 100644 --- a/tools/test_chunk_status_parity.py +++ b/tools/test_chunk_status_parity.py @@ -42,9 +42,9 @@ def main(): with (build/(name+'.log')).open('w') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) dependencies=os.pathsep.join(map(str,libraries)) run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-sourcepath',str(lab.ROOT/'mods/horizon/src/test/java'),'-cp',str(jars['server'])+os.pathsep+dependencies,'-d',classes,oracle],'compile-java') - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'chunk_status_fixture',inputs,build/'rust.txt'],'rust') references=[] for side,jar in jars.items(): diff --git a/tools/test_climbing_parity.py b/tools/test_climbing_parity.py index 7b54fc4fb7..1b61b1142e 100644 --- a/tools/test_climbing_parity.py +++ b/tools/test_climbing_parity.py @@ -54,7 +54,7 @@ def main(): with (build/'inputs.txt').open('w') as output: for f in corpus(info):output.write(json.dumps(f,separators=(',',':'))+'\n');count+=1 fixture_paths=[build/n for n in ['inputs.txt','info.json','block-registry.nbt','tags.json']];fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--locked','--release','-p','horizon-world','--example','probe'],'compile-rust');metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT));binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe');run([binary,'climbing_fixture',build],'rust');references=[] + run(['cargo','build','--locked','--release','-p','horizon-world','--example','world_probe'],'compile-rust');metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT));binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe');run([binary,'climbing_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side);matched=base.compare(build/(side+'.txt'),build/'rust.txt');references.append(dict(side=side,jar_sha256=lab.digest(jar,'sha256'),output_sha256=lab.digest(build/(side+'.txt'),'sha256'),matched_output_lines=matched));print(f'{side}: {matched:,} climbing output lines match Rust',flush=True) base.ensure_sources_unchanged(sources,tested);base.ensure_sources_unchanged(fixture_paths,fixtures) diff --git a/tools/test_collision_context_parity.py b/tools/test_collision_context_parity.py index da1f382dbd..a0178725b5 100644 --- a/tools/test_collision_context_parity.py +++ b/tools/test_collision_context_parity.py @@ -59,9 +59,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaCollisionContextOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'collision_context_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_collision_parity.py b/tools/test_collision_parity.py index 3031e47b2b..ad99ab9604 100644 --- a/tools/test_collision_parity.py +++ b/tools/test_collision_parity.py @@ -51,9 +51,9 @@ def main(): result.check_returncode() return result.stdout expected = counts(java("server", "generate")) - test_rust_parity.run(["cargo", "build", "--release", "-p", "horizon-world", "--example", "probe"]) + test_rust_parity.run(["cargo", "build", "--release", "-p", "horizon-world", "--example", "world_probe"]) metadata = json.loads(subprocess.check_output(["cargo", "metadata", "--no-deps", "--format-version", "1"], cwd=lab.ROOT, text=True)) - binary = Path(metadata["target_directory"]) / "release/examples" / ("probe.exe" if os.name=="nt" else "probe") + binary = Path(metadata["target_directory"]) / "release/examples" / ("world_probe.exe" if os.name=="nt" else "world_probe") actual = counts(subprocess.check_output([str(binary), "collision_fixture", str(base)], cwd=lab.ROOT, text=True)) if actual != expected: raise AssertionError(f"Collision coverage differs: vanilla={expected}, Rust={actual}") diff --git a/tools/test_combat_rules_parity.py b/tools/test_combat_rules_parity.py index 642c0603d9..389f075ae1 100644 --- a/tools/test_combat_rules_parity.py +++ b/tools/test_combat_rules_parity.py @@ -57,9 +57,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaCombatRulesOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'combat_rules_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_command_parse_parity.py b/tools/test_command_parse_parity.py index c43e66b54b..620fb548de 100644 --- a/tools/test_command_parse_parity.py +++ b/tools/test_command_parse_parity.py @@ -64,9 +64,9 @@ def main(): registries = json.loads((build / 'registries.json').read_text()) corpus = corpus_module.corpus(tree, registries) (build / 'corpus.txt').write_text(''.join(line + '\n' for line in corpus), encoding='utf-8') - run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'client_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--no-deps', '--format-version', '1'], cwd=lab.ROOT, text=True)) - binary = Path(metadata['target_directory']) / 'release/examples' / ('probe.exe' if os.name=='nt' else 'probe') + binary = Path(metadata['target_directory']) / 'release/examples' / ('client_probe.exe' if os.name=='nt' else 'client_probe') resources = lab.RESOURCES total_failures = 0 summary = [] diff --git a/tools/test_component_durability_parity.py b/tools/test_component_durability_parity.py index e912fa80ba..f786f98974 100644 --- a/tools/test_component_durability_parity.py +++ b/tools/test_component_durability_parity.py @@ -71,9 +71,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaComponentDurabilityOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'component_durability_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_component_patch_parity.py b/tools/test_component_patch_parity.py index bae69bb566..f578686138 100644 --- a/tools/test_component_patch_parity.py +++ b/tools/test_component_patch_parity.py @@ -57,9 +57,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaComponentPatchOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'component_patch_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_consumable_emission_parity.py b/tools/test_consumable_emission_parity.py index 7e8085087a..267aae3ecb 100644 --- a/tools/test_consumable_emission_parity.py +++ b/tools/test_consumable_emission_parity.py @@ -55,9 +55,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaConsumableEmissionOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'consumable_emission_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_consumable_parity.py b/tools/test_consumable_parity.py index 083ff810f8..3bb8fc4ebe 100644 --- a/tools/test_consumable_parity.py +++ b/tools/test_consumable_parity.py @@ -61,9 +61,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaConsumableOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'consumable_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_consume_effect_parity.py b/tools/test_consume_effect_parity.py index 4f4037073f..38820beeab 100644 --- a/tools/test_consume_effect_parity.py +++ b/tools/test_consume_effect_parity.py @@ -55,9 +55,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaConsumeEffectOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'consume_effect_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_contextual_collision_parity.py b/tools/test_contextual_collision_parity.py index bbfe45b023..bd82be1ca9 100644 --- a/tools/test_contextual_collision_parity.py +++ b/tools/test_contextual_collision_parity.py @@ -48,9 +48,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars['server']),dependency_path]),'dev.horizonlab.parity.VanillaCollisionOracle','generate',build],'export') fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs,build/'block-registry.nbt',build/'cached-collision.nbt'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'collision_context_fixture',build],'rust');references=[] for side,jar in jars.items(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jar),dependency_path]),'dev.horizonlab.parity.VanillaContextualCollisionAudit',side,build],side+'-audit') diff --git a/tools/test_damage_immunity_parity.py b/tools/test_damage_immunity_parity.py index d68277dd84..b788ca464b 100644 --- a/tools/test_damage_immunity_parity.py +++ b/tools/test_damage_immunity_parity.py @@ -57,9 +57,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaDamageImmunityOracle',mode,path],side+'-'+mode) java('server','export',build);fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs,build/'slots.json'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'damage_immunity_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_damage_reduction_parity.py b/tools/test_damage_reduction_parity.py index 06c827dcf3..bdb5266151 100644 --- a/tools/test_damage_reduction_parity.py +++ b/tools/test_damage_reduction_parity.py @@ -65,9 +65,9 @@ def main(): java('server','export',build) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs,build/'slots.json'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'damage_reduction_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_damage_source_parity.py b/tools/test_damage_source_parity.py index 75f3608227..2c8b6d228c 100644 --- a/tools/test_damage_source_parity.py +++ b/tools/test_damage_source_parity.py @@ -56,9 +56,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaDamageSourceOracle',mode,path],side+'-'+mode) java('server','export',build);catalog=json.loads((build/'catalog.json').read_text());fixtures=list(corpus(catalog));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs,build/'catalog.json',build/'types.json',build/'tags.json'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'damage_source_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_datafix_parity.py b/tools/test_datafix_parity.py index dc5a2495b8..cfaa5c2b45 100644 --- a/tools/test_datafix_parity.py +++ b/tools/test_datafix_parity.py @@ -72,11 +72,11 @@ def java_classpath(): def build_rust(): - subprocess.run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'probe'], + subprocess.run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'world_probe'], cwd=ROOT, check=True) meta = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=ROOT)) - return Path(meta['target_directory']) / 'release' / 'examples' / 'probe' + return Path(meta['target_directory']) / 'release' / 'examples' / 'world_probe' def run_vanilla(classpath, world, out, target=None): diff --git a/tools/test_decoration_parity.py b/tools/test_decoration_parity.py index ae8c7ce025..3958b4d909 100644 --- a/tools/test_decoration_parity.py +++ b/tools/test_decoration_parity.py @@ -75,9 +75,9 @@ def main(): with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) dependency_path=os.pathsep.join(map(str,libraries)) run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-sourcepath',str(lab.ROOT/'mods/horizon/src/test/java'),'-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,helper],'compile-java') - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'decoration_fixture',build],'rust');references=[] for side,jar in jars.items(): run(['java','-Xmx768M','-cp',os.pathsep.join([str(classes),str(jar),dependency_path]),'dev.horizonlab.parity.VanillaDecorationOracle',side,build],side) diff --git a/tools/test_decoration_region_parity.py b/tools/test_decoration_region_parity.py index c91ab86e86..5e31d1e1aa 100644 --- a/tools/test_decoration_region_parity.py +++ b/tools/test_decoration_region_parity.py @@ -73,9 +73,9 @@ def main(): (build/"tags.json").write_text(json.dumps(tags,separators=(",",":")),encoding="utf-8") fixture_paths=[inputs,build/"tags.json",build/"facts-client.json",build/"facts-server.json"] tested_fixtures=base.source_hashes(fixture_paths) - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"decoration_region_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_dynamic_support_parity.py b/tools/test_dynamic_support_parity.py index 76beb65c8c..9ee27d5af1 100644 --- a/tools/test_dynamic_support_parity.py +++ b/tools/test_dynamic_support_parity.py @@ -82,9 +82,9 @@ def main(): if len(states)!=199:raise ValueError('incomplete uncached support registry') fixtures=list(collision_corpus(facts,states));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs,build/'facts.json',build/'uncached-states.json',build/'block-registry.nbt',build/'cached-collision.nbt'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'dynamic_support_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_edge_backoff_parity.py b/tools/test_edge_backoff_parity.py index 58d5ba8dd5..b273ab26b4 100644 --- a/tools/test_edge_backoff_parity.py +++ b/tools/test_edge_backoff_parity.py @@ -56,9 +56,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaEdgeBackoffOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'edge_backoff_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_effect_attribute_modifiers_parity.py b/tools/test_effect_attribute_modifiers_parity.py index 9fd9694aa4..5d0a4dacda 100644 --- a/tools/test_effect_attribute_modifiers_parity.py +++ b/tools/test_effect_attribute_modifiers_parity.py @@ -123,9 +123,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaEffectAttributeModifiersOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'effect_attribute_modifiers_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_effect_notifications_parity.py b/tools/test_effect_notifications_parity.py index e39258a8b2..7f11af36fd 100644 --- a/tools/test_effect_notifications_parity.py +++ b/tools/test_effect_notifications_parity.py @@ -76,9 +76,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaEffectNotificationsOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') references=[] for side,jar in jars.items(): java(side,side,build) diff --git a/tools/test_effect_sync_parity.py b/tools/test_effect_sync_parity.py index 5aeeae09b4..76227970fd 100644 --- a/tools/test_effect_sync_parity.py +++ b/tools/test_effect_sync_parity.py @@ -129,9 +129,9 @@ def main(): inputs.write_text(''.join(json.dumps(row, separators=(',', ':')) + '\n' for row in fixtures), encoding='utf-8') fixture_paths = [inputs, build / 'catalog.json', build / 'catalog-client.json', build / 'catalog-server.json'] tested_fixtures = base.source_hashes(fixture_paths) - run(['cargo', 'build', '--release', '-p', 'horizon-world', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--release', '-p', 'horizon-world', '--example', 'world_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--no-deps', '--format-version', '1'], cwd=lab.ROOT, text=True)) - binary = Path(metadata['target_directory']) / 'release/examples' / ('probe.exe' if os.name=='nt' else 'probe') + binary = Path(metadata['target_directory']) / 'release/examples' / ('world_probe.exe' if os.name=='nt' else 'world_probe') references = [] for side, jar in jars.items(): java(side, side) diff --git a/tools/test_enchanting_parity.py b/tools/test_enchanting_parity.py index 9f5f5647fd..35f0777c89 100644 --- a/tools/test_enchanting_parity.py +++ b/tools/test_enchanting_parity.py @@ -56,9 +56,9 @@ def main(): with (build / (name + '.log')).open('w', encoding='utf-8') as log: base.run(list(map(str, command)), stdout=log, stderr=subprocess.STDOUT) run(['javac', '--release', lock['minecraft']['java_major'], '-proc:none','-sourcepath',str(lab.ROOT/'mods/horizon/src/test/java'), '-cp', str(jars['server']) + os.pathsep + deps, '-d', classes, oracle], 'compile-java') - run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'client_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--no-deps', '--format-version', '1'], cwd=lab.ROOT, text=True)) - binary = Path(metadata['target_directory']) / 'release/examples' / ('probe.exe' if os.name=='nt' else 'probe') + binary = Path(metadata['target_directory']) / 'release/examples' / ('client_probe.exe' if os.name=='nt' else 'client_probe') run([binary, 'enchanting_fixture',resources, inputs, build / 'rust.txt'], 'rust') references = [] for side in ['server']: diff --git a/tools/test_entity_attribute_parity.py b/tools/test_entity_attribute_parity.py index 045488ee36..ba7b627485 100644 --- a/tools/test_entity_attribute_parity.py +++ b/tools/test_entity_attribute_parity.py @@ -54,9 +54,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaEntityAttributeOracle',mode,path],side+'-'+mode) java('server','export',build);states=json.loads((build/'catalog.json').read_text());fixtures=list(corpus(states));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs,build/'catalog.json'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'entity_attribute_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_entity_collision_parity.py b/tools/test_entity_collision_parity.py index 6fe12a7aa0..5a632cfa55 100644 --- a/tools/test_entity_collision_parity.py +++ b/tools/test_entity_collision_parity.py @@ -65,9 +65,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaEntityCollisionOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'entity_collision_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_entity_death_loot_parity.py b/tools/test_entity_death_loot_parity.py index b0f77cbfda..07c77b0b81 100644 --- a/tools/test_entity_death_loot_parity.py +++ b/tools/test_entity_death_loot_parity.py @@ -139,9 +139,9 @@ def main(): '-cp', str(jars['server']) + os.pathsep + deps, '-d', classes, oracle], 'compile-java') run(['java', '-Xmx2G', '-cp', os.pathsep.join([str(classes), str(jars['server']), deps]), 'dev.horizonlab.parity.VanillaEntityDeathLootOracle', inputs, build / 'server.txt'], 'server') - run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'client_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--no-deps', '--format-version', '1'], cwd=lab.ROOT, text=True)) - binary = Path(metadata['target_directory']) / 'release/examples/probe' + binary = Path(metadata['target_directory']) / 'release/examples/client_probe' run([binary, 'entity_death_loot_fixture', resources, inputs, build / 'rust.txt'], 'rust') errors = [l for l in (build / 'server.txt').read_text().splitlines() if l.startswith('error ')] if errors: diff --git a/tools/test_entity_fluid_parity.py b/tools/test_entity_fluid_parity.py index 712db03b5e..b37a3e11dc 100644 --- a/tools/test_entity_fluid_parity.py +++ b/tools/test_entity_fluid_parity.py @@ -79,9 +79,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaEntityFluidOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'entity_fluid_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_entity_fluid_tick_parity.py b/tools/test_entity_fluid_tick_parity.py index 58380bd035..1aa2cf839f 100644 --- a/tools/test_entity_fluid_tick_parity.py +++ b/tools/test_entity_fluid_tick_parity.py @@ -64,9 +64,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaEntityFluidOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'entity_fluid_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_entity_model_parity.py b/tools/test_entity_model_parity.py index ba54797fab..0cfc509f31 100644 --- a/tools/test_entity_model_parity.py +++ b/tools/test_entity_model_parity.py @@ -364,7 +364,7 @@ def main(): run(['javac', '--release', lock['minecraft']['java_major'], '-proc:none', '-cp', dependencies, '-d', classes, oracle], 'compile-java') run(['java', '-Xmx1G', '-cp', str(classes) + os.pathsep + dependencies, 'dev.horizonlab.parity.VanillaEntityAnimOracle', inputs, build / 'vanilla.jsonl', jars['client']], 'vanilla') - run(['cargo', 'run', '--quiet', '--profile', 'fast', '-p', 'horizon-client', '--example', 'probe', '--', + run(['cargo', 'run', '--quiet', '--profile', 'fast', '-p', 'horizon-client', '--example', 'client_probe', '--', 'entity_anim_fixture', resources, build / 'vanilla.jsonl', build / 'rust.jsonl'], 'rust') vanilla = [json.loads(l) for l in (build / 'vanilla.jsonl').read_text().splitlines()] rust = [json.loads(l) for l in (build / 'rust.jsonl').read_text().splitlines()] diff --git a/tools/test_entity_move_parity.py b/tools/test_entity_move_parity.py index d17bb2444c..5d8f0814b8 100644 --- a/tools/test_entity_move_parity.py +++ b/tools/test_entity_move_parity.py @@ -56,9 +56,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaEntityMoveOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'entity_move_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_entity_obstruction_parity.py b/tools/test_entity_obstruction_parity.py index 210c2080f9..d600904c02 100644 --- a/tools/test_entity_obstruction_parity.py +++ b/tools/test_entity_obstruction_parity.py @@ -61,9 +61,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaEntityObstructionOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'entity_obstruction_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_environment_render_parity.py b/tools/test_environment_render_parity.py index 893a1c70d6..50d14337df 100755 --- a/tools/test_environment_render_parity.py +++ b/tools/test_environment_render_parity.py @@ -66,7 +66,7 @@ def main(): '-cp', str(jars['server']) + os.pathsep + deps, '-d', classes, oracle], 'compile-java') run(['java', '-Xmx1G', '-cp', os.pathsep.join([str(classes), str(jars['server']), deps]), 'dev.horizonlab.parity.VanillaEnvironmentOracle', inputs, build / 'vanilla.jsonl'], 'vanilla') - run(['cargo', 'run', '--quiet', '--profile', 'fast', '-p', 'horizon-client', '--example', 'probe', '--', + run(['cargo', 'run', '--quiet', '--profile', 'fast', '-p', 'horizon-client', '--example', 'client_probe', '--', 'environment_fixture', resources, inputs, build / 'rust.jsonl'], 'rust') vanilla = [json.loads(l) for l in (build / 'vanilla.jsonl').read_text().splitlines()] rust = [json.loads(l) for l in (build / 'rust.jsonl').read_text().splitlines()] diff --git a/tools/test_extra_items_parity.py b/tools/test_extra_items_parity.py index 83752e5155..b2dcfb17c3 100644 --- a/tools/test_extra_items_parity.py +++ b/tools/test_extra_items_parity.py @@ -67,9 +67,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaExtraItemsOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'extra_items_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_face_support_parity.py b/tools/test_face_support_parity.py index ad6db89223..3a8ae8783e 100644 --- a/tools/test_face_support_parity.py +++ b/tools/test_face_support_parity.py @@ -61,9 +61,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaFaceSupportOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'face_support_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_face_visibility_parity.py b/tools/test_face_visibility_parity.py index fa8c6696a1..c63526ff64 100644 --- a/tools/test_face_visibility_parity.py +++ b/tools/test_face_visibility_parity.py @@ -71,9 +71,9 @@ def main(): for a,b in pairs(definitions):output.write(f'{a} {b}\n');pair_count+=1 fixture_paths = [build/name for name in ['pairs.txt','block-registry.nbt','occlusion.nbt','definitions.json','tags.json']] fixtures = base.source_hashes(fixture_paths) - run(['cargo','build','--locked','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--locked','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata = json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT)) - binary = Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary = Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'face_visibility_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side) diff --git a/tools/test_fall_damage_parity.py b/tools/test_fall_damage_parity.py index 585084eb48..7b78c8e462 100644 --- a/tools/test_fall_damage_parity.py +++ b/tools/test_fall_damage_parity.py @@ -57,9 +57,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaFallDamageOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'fall_damage_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_feature_catalog_parity.py b/tools/test_feature_catalog_parity.py index 52a19a6525..5a8b4aac72 100644 --- a/tools/test_feature_catalog_parity.py +++ b/tools/test_feature_catalog_parity.py @@ -100,9 +100,9 @@ def main(): fixture_paths.append(path) if json.loads((build/"facts-client.json").read_text())!=json.loads((build/"facts-server.json").read_text()):raise ValueError("reference feature block states differ") tested_fixtures=base.source_hashes(fixture_paths) - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"feature_catalog_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_feature_graph_parity.py b/tools/test_feature_graph_parity.py index 553baaf09a..96d066771f 100644 --- a/tools/test_feature_graph_parity.py +++ b/tools/test_feature_graph_parity.py @@ -83,9 +83,9 @@ def main(): fixture_paths.append(path) if json.loads((build/"facts-client.json").read_text())!=json.loads((build/"facts-server.json").read_text()):raise ValueError("reference feature block states differ") tested_fixtures=base.source_hashes(fixture_paths) - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"feature_graph_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_feature_placement_parity.py b/tools/test_feature_placement_parity.py index 58dc3167a9..6230fc20c0 100644 --- a/tools/test_feature_placement_parity.py +++ b/tools/test_feature_placement_parity.py @@ -87,9 +87,9 @@ def main(): with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) dependency_path=os.pathsep.join(map(str,libraries)) run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,helper],"compile-java") - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"feature_placement_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_feature_region_parity.py b/tools/test_feature_region_parity.py index 2cc8d78a7e..c1f1bf5d8c 100644 --- a/tools/test_feature_region_parity.py +++ b/tools/test_feature_region_parity.py @@ -107,9 +107,9 @@ def main(): height_inputs=build/'heights.json';height_inputs.write_text(json.dumps(heights,separators=(',',':'))) fixture_paths=[height_inputs,zone_inputs,inputs,build/"tags.json",build/"fluid-tags.json",build/"facts-client.json",build/"facts-server.json"] tested_fixtures=base.source_hashes(fixture_paths) - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"feature_region_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_feature_sort_parity.py b/tools/test_feature_sort_parity.py index 6c0e4a44e1..351e846aad 100644 --- a/tools/test_feature_sort_parity.py +++ b/tools/test_feature_sort_parity.py @@ -64,9 +64,9 @@ def main(): with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) dependency_path=os.pathsep.join(map(str,libraries)) run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-sourcepath',str(lab.ROOT/'mods/horizon/src/test/java'),'-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'feature_sort_fixture',build],'rust');references=[] for side,jar in jars.items(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jar),dependency_path]),'dev.horizonlab.parity.VanillaFeatureSortOracle',side,build],side) diff --git a/tools/test_fill_layer_parity.py b/tools/test_fill_layer_parity.py index b23521d021..1ca2593d54 100644 --- a/tools/test_fill_layer_parity.py +++ b/tools/test_fill_layer_parity.py @@ -60,9 +60,9 @@ def main(): fixtures=list(corpus(facts));inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") fixture_paths.append(inputs) tested_fixtures=base.source_hashes(fixture_paths) - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"fill_layer_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_finalize_spawn_parity.py b/tools/test_finalize_spawn_parity.py index c3130d380c..7d581fefc0 100644 --- a/tools/test_finalize_spawn_parity.py +++ b/tools/test_finalize_spawn_parity.py @@ -148,9 +148,9 @@ def main(): print(f'{len(vanilla)} oracle lines') return halloween = vanilla[0].split()[1] - run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'client_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--no-deps', '--format-version', '1'], cwd=lab.ROOT, text=True)) - binary = Path(metadata['target_directory']) / 'release/examples/probe' + binary = Path(metadata['target_directory']) / 'release/examples/client_probe' run([binary, 'finalize_spawn_fixture', resources, inputs, build / 'rust.txt', halloween], 'rust') rust = (build / 'rust.txt').read_text().splitlines() bad = [(a, b) for a, b in zip(vanilla, rust) if a != b] diff --git a/tools/test_fluid_box_parity.py b/tools/test_fluid_box_parity.py index 1b4e7743cf..0f1385d52c 100644 --- a/tools/test_fluid_box_parity.py +++ b/tools/test_fluid_box_parity.py @@ -58,9 +58,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaFluidBoxOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'fluid_box_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_fluid_flow_parity.py b/tools/test_fluid_flow_parity.py index ef1606d91b..c8efeea0de 100644 --- a/tools/test_fluid_flow_parity.py +++ b/tools/test_fluid_flow_parity.py @@ -67,9 +67,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaFluidFlowOracle',mode,path],side+'-'+mode) java('server','export',build);states=json.loads((build/'fluid-states.json').read_text());fixtures=list(corpus(states));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs,build/'fluid-states.json'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'fluid_flow_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_fluid_occupancy_parity.py b/tools/test_fluid_occupancy_parity.py index 90af340d30..ebb19fad87 100644 --- a/tools/test_fluid_occupancy_parity.py +++ b/tools/test_fluid_occupancy_parity.py @@ -57,7 +57,7 @@ def main(): with (build/'inputs.txt').open('w') as output: for f in corpus(info):output.write(json.dumps(f,separators=(',',':'))+'\n');count+=1 fixture_paths=[build/n for n in ['inputs.txt','info.json','block-registry.nbt']];fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--locked','--release','-p','horizon-world','--example','probe'],'compile-rust');metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT));binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe');run([binary,'fluid_occupancy_fixture',build],'rust');references=[] + run(['cargo','build','--locked','--release','-p','horizon-world','--example','world_probe'],'compile-rust');metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT));binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe');run([binary,'fluid_occupancy_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side);matched=base.compare(build/(side+'.txt'),build/'rust.txt');references.append(dict(side=side,jar_sha256=lab.digest(jar,'sha256'),output_sha256=lab.digest(build/(side+'.txt'),'sha256'),matched_output_lines=matched));print(f'{side}: {matched:,} fluid-occupancy output lines match Rust',flush=True) base.ensure_sources_unchanged(sources,tested);base.ensure_sources_unchanged(fixture_paths,fixtures) diff --git a/tools/test_fluid_parity.py b/tools/test_fluid_parity.py index 3acfc37020..b113f2294f 100644 --- a/tools/test_fluid_parity.py +++ b/tools/test_fluid_parity.py @@ -62,9 +62,9 @@ def main(): fixtures=list(corpus(facts));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') codec_inputs=build/'codec-inputs.txt';codec_fixtures=list(codec_corpus());codec_inputs.write_text(''.join(json.dumps(v,separators=(',',':'))+'\n' for v in codec_fixtures),encoding='utf-8') fixture_paths=[inputs,codec_inputs,build/'facts-client.json',build/'facts-server.json'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'fluid_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_fluid_shape_parity.py b/tools/test_fluid_shape_parity.py index 1378d33a57..ee4793709c 100644 --- a/tools/test_fluid_shape_parity.py +++ b/tools/test_fluid_shape_parity.py @@ -48,9 +48,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaFluidShapeOracle',mode,path],side+'-'+mode) java('server','export',build);states=json.loads((build/'fluid-states.json').read_text());fixtures=list(corpus(states));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs,build/'fluid-states.json'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'fluid_shape_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_food_parity.py b/tools/test_food_parity.py index c2e451fd06..6428815afc 100644 --- a/tools/test_food_parity.py +++ b/tools/test_food_parity.py @@ -68,9 +68,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaFoodOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'food_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_food_properties_parity.py b/tools/test_food_properties_parity.py index 950c19ee3c..62f62508a8 100644 --- a/tools/test_food_properties_parity.py +++ b/tools/test_food_properties_parity.py @@ -57,9 +57,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaFoodPropertiesOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'food_properties_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_food_storage_parity.py b/tools/test_food_storage_parity.py index aeedde587c..605b40d2f0 100644 --- a/tools/test_food_storage_parity.py +++ b/tools/test_food_storage_parity.py @@ -52,9 +52,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaFoodStorageOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'food_storage_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_free_space_parity.py b/tools/test_free_space_parity.py index a81fb0fe7f..2c8379bac7 100644 --- a/tools/test_free_space_parity.py +++ b/tools/test_free_space_parity.py @@ -94,9 +94,9 @@ def main(): fixture_paths = [build/name for name in ['inputs.txt', 'facts.json', 'definitions.json', 'block-registry.nbt', 'cached-collision.nbt', 'tags.json']] fixtures = base.source_hashes(fixture_paths) - run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'world_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) - binary = Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary = Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary, 'registry_collision_scan_fixture', build], 'rust');references = [] for side, jar in jars.items(): java(side, side) diff --git a/tools/test_ground_support_parity.py b/tools/test_ground_support_parity.py index 4393daf215..88bbf00a8f 100644 --- a/tools/test_ground_support_parity.py +++ b/tools/test_ground_support_parity.py @@ -78,10 +78,10 @@ def main(): for f in corpus():output.write(json.dumps(f,separators=(',',':'))+'\n');count+=1 counts[name]=count;fixture_paths.append(path) fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--locked','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--locked','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT)) for group,name in zip(['selection','state'],names): - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe');run([binary,name,build/group],'rust-'+group) + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe');run([binary,name,build/group],'rust-'+group) references=[] for side,jar in jars.items(): results=[] diff --git a/tools/test_height_provider_parity.py b/tools/test_height_provider_parity.py index 4f63c80cd3..fad696b0a2 100644 --- a/tools/test_height_provider_parity.py +++ b/tools/test_height_provider_parity.py @@ -73,9 +73,9 @@ def main(): with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) dependency_path=os.pathsep.join(map(str,libraries)) run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,helper],"compile-java") - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"height_provider_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_heightmap_parity.py b/tools/test_heightmap_parity.py index 502f165ab8..e565fc04db 100644 --- a/tools/test_heightmap_parity.py +++ b/tools/test_heightmap_parity.py @@ -100,9 +100,9 @@ def main(): (build/"tags.json").write_text(json.dumps(tags,separators=(",",":")),encoding="utf-8") fixture_paths=[inputs,build/"tags.json",build/"facts-client.json",build/"facts-server.json"] tested_fixtures=base.source_hashes(fixture_paths) - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"heightmap_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_held_drop_parity.py b/tools/test_held_drop_parity.py index d2f215050f..a5cfe90099 100644 --- a/tools/test_held_drop_parity.py +++ b/tools/test_held_drop_parity.py @@ -35,7 +35,7 @@ def main(): 'dev.horizonlab.parity.VanillaHeldDropOracle', str(build / 'vanilla.txt')], check=True) with (build / 'rust.txt').open('w') as out: subprocess.run(['cargo', 'run', '--quiet', '-p', 'horizon-client', '--example', - 'probe', '--', 'held_drop_fixture'], cwd=lab.ROOT, stdout=out, check=True) + 'client_probe', '--', 'held_drop_fixture'], cwd=lab.ROOT, stdout=out, check=True) matched = base.compare(build / 'vanilla.txt', build / 'rust.txt') print(f'Held drop parity passed: {matched} inventory/drop/swing/packet snapshots match vanilla') diff --git a/tools/test_hud_parity.py b/tools/test_hud_parity.py index 4dcd19a7b0..2b306f563a 100644 --- a/tools/test_hud_parity.py +++ b/tools/test_hud_parity.py @@ -114,7 +114,7 @@ def main(): *(PARITY / f'{n}.java' for n in ('ParityData', 'ParityFont', 'VanillaHudOracle'))], 'compile-java') run(['java', '-Xmx2G', '-cp', str(classes) + os.pathsep + dependencies, 'dev.horizonlab.parity.VanillaHudOracle', inputs, build / 'vanilla.jsonl'], 'vanilla') - run(['cargo', 'run', '--quiet', '--profile', 'fast', '-p', 'horizon-client', '--example', 'probe', '--', + run(['cargo', 'run', '--quiet', '--profile', 'fast', '-p', 'horizon-client', '--example', 'client_probe', '--', 'hud_fixture', resources, inputs, build / 'rust.jsonl'], 'rust') vanilla = [json.loads(l) for l in (build / 'vanilla.jsonl').read_text().splitlines()] rust = [json.loads(l) for l in (build / 'rust.jsonl').read_text().splitlines()] diff --git a/tools/test_interaction_shape_parity.py b/tools/test_interaction_shape_parity.py index d40ca2c0b3..ab21840c0c 100644 --- a/tools/test_interaction_shape_parity.py +++ b/tools/test_interaction_shape_parity.py @@ -47,9 +47,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaInteractionShapeOracle',mode,path],side+'-'+mode) java('server','export',build);info=json.loads((build/'info.json').read_text());fixtures=list(corpus(info));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs,build/'info.json',build/'block-registry.nbt',build/'interaction-shapes.nbt'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'interaction_shape_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_inventory_pickup_parity.py b/tools/test_inventory_pickup_parity.py index a3172f4726..9c413dcc86 100644 --- a/tools/test_inventory_pickup_parity.py +++ b/tools/test_inventory_pickup_parity.py @@ -72,9 +72,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaInventoryPickupOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'inventory_pickup_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_inventory_tick_parity.py b/tools/test_inventory_tick_parity.py index 2dd34b76fe..6a23d3be46 100644 --- a/tools/test_inventory_tick_parity.py +++ b/tools/test_inventory_tick_parity.py @@ -60,9 +60,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaInventoryTickOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'inventory_tick_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_inventory_use_parity.py b/tools/test_inventory_use_parity.py index 925567c3f8..4bb1d658bf 100644 --- a/tools/test_inventory_use_parity.py +++ b/tools/test_inventory_use_parity.py @@ -55,9 +55,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaInventoryUseOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'inventory_use_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_inventory_use_start_parity.py b/tools/test_inventory_use_start_parity.py index 67e282c060..c57bd88da1 100644 --- a/tools/test_inventory_use_start_parity.py +++ b/tools/test_inventory_use_start_parity.py @@ -55,9 +55,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaInventoryUseStartOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'inventory_use_start_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_item_after_use_parity.py b/tools/test_item_after_use_parity.py index 4aa5258f9f..860d633d06 100644 --- a/tools/test_item_after_use_parity.py +++ b/tools/test_item_after_use_parity.py @@ -54,9 +54,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaItemAfterUseOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'item_after_use_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_item_blocking_parity.py b/tools/test_item_blocking_parity.py index 08d8dce24e..8c149eabc7 100644 --- a/tools/test_item_blocking_parity.py +++ b/tools/test_item_blocking_parity.py @@ -58,9 +58,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaItemBlockingOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'item_blocking_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_item_cooldowns_parity.py b/tools/test_item_cooldowns_parity.py index 807c576dcf..3b368b657f 100644 --- a/tools/test_item_cooldowns_parity.py +++ b/tools/test_item_cooldowns_parity.py @@ -64,9 +64,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaItemCooldownsOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'item_cooldowns_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_item_durability_parity.py b/tools/test_item_durability_parity.py index e3cdebb071..ec76cd60aa 100644 --- a/tools/test_item_durability_parity.py +++ b/tools/test_item_durability_parity.py @@ -61,9 +61,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaItemDurabilityOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'item_durability_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_item_particles_parity.py b/tools/test_item_particles_parity.py index 0e030a3b36..5b2f5b5f94 100644 --- a/tools/test_item_particles_parity.py +++ b/tools/test_item_particles_parity.py @@ -53,9 +53,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaItemParticlesOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'item_particles_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_item_stack_storage_parity.py b/tools/test_item_stack_storage_parity.py index 953dc8300c..e3071207d4 100644 --- a/tools/test_item_stack_storage_parity.py +++ b/tools/test_item_stack_storage_parity.py @@ -59,9 +59,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaItemStackStorageOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'item_stack_storage_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_item_template_parity.py b/tools/test_item_template_parity.py index 837465bb3b..efc4dd0940 100644 --- a/tools/test_item_template_parity.py +++ b/tools/test_item_template_parity.py @@ -58,9 +58,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaItemTemplateOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'item_template_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_item_use_catalog_parity.py b/tools/test_item_use_catalog_parity.py index 38664bd030..afffa5f6d4 100644 --- a/tools/test_item_use_catalog_parity.py +++ b/tools/test_item_use_catalog_parity.py @@ -63,9 +63,9 @@ def main(): if exports[0]!=exports[1]:raise RuntimeError('native item catalogs differ') catalog_path=build/'catalog.json';lab.write_json(catalog_path,exports[0]);fixtures=list(corpus(exports[0]));inputs=build/'inputs.txt' ;inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs,catalog_path];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'item_use_catalog_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_item_use_lifecycle_parity.py b/tools/test_item_use_lifecycle_parity.py index 0c3c4ee6e4..da98d029f8 100644 --- a/tools/test_item_use_lifecycle_parity.py +++ b/tools/test_item_use_lifecycle_parity.py @@ -57,9 +57,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaItemUseLifecycleOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'item_use_lifecycle_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_item_use_parity.py b/tools/test_item_use_parity.py index f69d49e355..b05a2056e8 100644 --- a/tools/test_item_use_parity.py +++ b/tools/test_item_use_parity.py @@ -66,9 +66,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaItemUseOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'item_use_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_item_use_start_parity.py b/tools/test_item_use_start_parity.py index e59945e82f..f65589b2be 100644 --- a/tools/test_item_use_start_parity.py +++ b/tools/test_item_use_start_parity.py @@ -57,9 +57,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaItemUseStartOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'item_use_start_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_java_hash_map_parity.py b/tools/test_java_hash_map_parity.py index 5ae1cce415..3147a5ed3a 100644 --- a/tools/test_java_hash_map_parity.py +++ b/tools/test_java_hash_map_parity.py @@ -73,9 +73,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaJavaHashMapOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'java_hash_map_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_java_identity_map_parity.py b/tools/test_java_identity_map_parity.py index 9e9f04c1dc..97300b98d4 100644 --- a/tools/test_java_identity_map_parity.py +++ b/tools/test_java_identity_map_parity.py @@ -67,9 +67,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaJavaIdentityMapOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') references=[] for side,jar in jars.items(): java(side,side,build) diff --git a/tools/test_level_place_parity.py b/tools/test_level_place_parity.py index 18e90e348a..0089c0ef5e 100644 --- a/tools/test_level_place_parity.py +++ b/tools/test_level_place_parity.py @@ -105,7 +105,7 @@ def main(): subprocess.run(['java', '-Xmx2G', '-cp', str(classes) + os.pathsep + dependencies, 'dev.horizonlab.parity.VanillaBlockPlacementOracle', str(resources), str(work / 'cases.jsonl'), str(work / 'native.txt')], check=True) - subprocess.run(['cargo', 'run', '-q', '-j2', '--release', '-p', 'horizon-world', '--example', 'probe', '--', + subprocess.run(['cargo', 'run', '-q', '-j2', '--release', '-p', 'horizon-world', '--example', 'world_probe', '--', 'level_place_fixture', str(resources), str(work / 'cases.jsonl'), str(work / 'rust.txt')], check=True, cwd=lab.ROOT) native = (work / 'native.txt').read_text().splitlines() rust = (work / 'rust.txt').read_text().splitlines() diff --git a/tools/test_level_shape_parity.py b/tools/test_level_shape_parity.py index c86f51fe63..8a5d7de485 100644 --- a/tools/test_level_shape_parity.py +++ b/tools/test_level_shape_parity.py @@ -80,7 +80,7 @@ def main(): subprocess.run(['java', '-Xmx2G', '-cp', str(classes) + os.pathsep + dependencies, 'dev.horizonlab.parity.VanillaLevelShapeOracle', str(resources), str(work / 'cases.jsonl'), str(work / 'native.txt')], check=True) - subprocess.run(['cargo', 'run', '-q', '-j2', '--release', '-p', 'horizon-world', '--example', 'probe', '--', + subprocess.run(['cargo', 'run', '-q', '-j2', '--release', '-p', 'horizon-world', '--example', 'world_probe', '--', 'level_shape_fixture', str(resources), str(work / 'cases.jsonl'), str(work / 'rust.txt')], check=True, cwd=lab.ROOT) native = (work / 'native.txt').read_text().splitlines() rust = (work / 'rust.txt').read_text().splitlines() diff --git a/tools/test_light_parity.py b/tools/test_light_parity.py index 3ed2351faf..bcac482da5 100755 --- a/tools/test_light_parity.py +++ b/tools/test_light_parity.py @@ -92,7 +92,7 @@ def main(): dimension = run / 'world' for extra in (['--chunks', '0', '0', '2', '3'], ['--incremental', '100']): status = subprocess.run(['cargo', 'run', '--quiet', '--profile', 'fast', '-p', 'horizon-client', - '--example', 'probe', '--', 'light_parity', str(RESOURCES), str(dimension), *extra], + '--example', 'client_probe', '--', 'light_parity', str(RESOURCES), str(dimension), *extra], cwd=ROOT).returncode if status: sys.exit('light mismatch against vanilla') diff --git a/tools/test_liquid_collision_parity.py b/tools/test_liquid_collision_parity.py index 6a4ca638bb..ab926d3296 100644 --- a/tools/test_liquid_collision_parity.py +++ b/tools/test_liquid_collision_parity.py @@ -70,9 +70,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaCollisionContextOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'collision_context_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_live_attribute_updates_parity.py b/tools/test_live_attribute_updates_parity.py index 1e05f4bae1..d1af165696 100644 --- a/tools/test_live_attribute_updates_parity.py +++ b/tools/test_live_attribute_updates_parity.py @@ -160,9 +160,9 @@ def main(): inputs.write_text(''.join(json.dumps(row, separators=(',', ':')) + '\n' for row in fixtures), encoding='utf-8') fixture_paths = [inputs, build / 'catalog.json', build / 'catalog-client.json', build / 'catalog-server.json'] tested_fixtures = base.source_hashes(fixture_paths) - run(['cargo', 'build', '--release', '-p', 'horizon-world', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--release', '-p', 'horizon-world', '--example', 'world_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--no-deps', '--format-version', '1'], cwd=lab.ROOT, text=True)) - binary = Path(metadata['target_directory']) / 'release/examples' / ('probe.exe' if os.name=='nt' else 'probe') + binary = Path(metadata['target_directory']) / 'release/examples' / ('world_probe.exe' if os.name=='nt' else 'world_probe') references = [] for side, jar in jars.items(): java(side, side) diff --git a/tools/test_live_attributes_parity.py b/tools/test_live_attributes_parity.py index f221fa27ee..ead22f8253 100644 --- a/tools/test_live_attributes_parity.py +++ b/tools/test_live_attributes_parity.py @@ -132,9 +132,9 @@ def main(): inputs.write_text(''.join(json.dumps(row, separators=(',', ':')) + '\n' for row in fixtures), encoding='utf-8') fixture_paths = [inputs, build / 'catalog.json', build / 'catalog-client.json', build / 'catalog-server.json'] tested_fixtures = base.source_hashes(fixture_paths) - run(['cargo', 'build', '--release', '-p', 'horizon-world', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--release', '-p', 'horizon-world', '--example', 'world_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--no-deps', '--format-version', '1'], cwd=lab.ROOT, text=True)) - binary = Path(metadata['target_directory']) / 'release/examples' / ('probe.exe' if os.name=='nt' else 'probe') + binary = Path(metadata['target_directory']) / 'release/examples' / ('world_probe.exe' if os.name=='nt' else 'world_probe') references = [] for side, jar in jars.items(): java(side, side) diff --git a/tools/test_living_air_parity.py b/tools/test_living_air_parity.py index 4d837f02a8..3a2b61b000 100644 --- a/tools/test_living_air_parity.py +++ b/tools/test_living_air_parity.py @@ -81,9 +81,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaLivingAirOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'living_air_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_living_damage_parity.py b/tools/test_living_damage_parity.py index ae97c46864..a98fde0282 100644 --- a/tools/test_living_damage_parity.py +++ b/tools/test_living_damage_parity.py @@ -57,9 +57,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaLivingDamageOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'living_damage_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_living_fall_parity.py b/tools/test_living_fall_parity.py index db55b57287..0f0638a17c 100644 --- a/tools/test_living_fall_parity.py +++ b/tools/test_living_fall_parity.py @@ -59,9 +59,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaLivingFallOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'living_fall_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_living_fluid_parity.py b/tools/test_living_fluid_parity.py index 19748fef2c..fdda42e8ce 100644 --- a/tools/test_living_fluid_parity.py +++ b/tools/test_living_fluid_parity.py @@ -77,9 +77,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaLivingFluidOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'living_fluid_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_living_health_parity.py b/tools/test_living_health_parity.py index ab97d00618..c083e2ae59 100644 --- a/tools/test_living_health_parity.py +++ b/tools/test_living_health_parity.py @@ -59,9 +59,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaLivingHealthOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'living_health_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_living_hurt_parity.py b/tools/test_living_hurt_parity.py index 38ade5720f..6d6bb2a2dd 100644 --- a/tools/test_living_hurt_parity.py +++ b/tools/test_living_hurt_parity.py @@ -61,9 +61,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaLivingHurtOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'living_hurt_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_living_landing_parity.py b/tools/test_living_landing_parity.py index eb65800da0..c6fcae689a 100644 --- a/tools/test_living_landing_parity.py +++ b/tools/test_living_landing_parity.py @@ -66,9 +66,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaLivingLandingOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'living_landing_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_living_motion_parity.py b/tools/test_living_motion_parity.py index 39935303c9..fb054b65fa 100644 --- a/tools/test_living_motion_parity.py +++ b/tools/test_living_motion_parity.py @@ -80,9 +80,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaLivingMotionOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'living_motion_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_local_input_parity.py b/tools/test_local_input_parity.py index adfea1a4bc..c50087138e 100644 --- a/tools/test_local_input_parity.py +++ b/tools/test_local_input_parity.py @@ -44,9 +44,9 @@ def main(): classes=build/'classes';classes.mkdir(exist_ok=True) dependencies=os.pathsep.join(map(str,[jars['client'],*libraries])) run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-sourcepath',str(lab.ROOT/'mods/horizon/src/test/java'),'-cp',dependencies,'-d',classes,oracle],'compile-java') - run(['cargo','build','--locked','-p','horizon-client','--example','probe'],'compile-rust') + run(['cargo','build','--locked','-p','horizon-client','--example','client_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT)) - binary=Path(metadata['target_directory'])/'debug/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'debug/examples'/('client_probe.exe' if os.name=='nt' else 'client_probe') run([binary,'input_probe',inputs,build/'rust.txt'],'rust') run(['java','-Xmx768M','-cp',str(classes)+os.pathsep+dependencies,'dev.horizonlab.parity.VanillaLocalInputOracle',inputs,build/'client.txt'],'client') matched=base.compare(build/'client.txt',build/'rust.txt') diff --git a/tools/test_material_condition_parity.py b/tools/test_material_condition_parity.py index adddd336b4..414ce3b976 100644 --- a/tools/test_material_condition_parity.py +++ b/tools/test_material_condition_parity.py @@ -293,9 +293,9 @@ def main(): with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) dependency_path=os.pathsep.join(map(str,libraries)) run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,anchor_oracle,biome_oracle],"compile-java") - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"material_condition_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_material_extension_parity.py b/tools/test_material_extension_parity.py index 4036ecc37e..66debf9739 100644 --- a/tools/test_material_extension_parity.py +++ b/tools/test_material_extension_parity.py @@ -67,8 +67,8 @@ def main(): with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) dependencies=os.pathsep.join(map(str,libraries)) run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-sourcepath',str(lab.ROOT/'mods/horizon/src/test/java'),'-cp',str(jars['server'])+os.pathsep+dependencies,'-d',classes,*oracles],'compile-java') - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') - metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True));binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe');run([binary,'material_extension_fixture',build],'rust');references=[] + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True));binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe');run([binary,'material_extension_fixture',build],'rust');references=[] for side,jar in jars.items(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jar),dependencies]),'dev.horizonlab.parity.VanillaMaterialExtensionOracle',side,build],side) reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt');references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched});print(f'{side}: {matched:,} material-extension output lines match Rust',flush=True) diff --git a/tools/test_material_rule_library_parity.py b/tools/test_material_rule_library_parity.py index 1e9b82357e..6b4b26c634 100644 --- a/tools/test_material_rule_library_parity.py +++ b/tools/test_material_rule_library_parity.py @@ -79,8 +79,8 @@ def main(): if facts!=json.loads((build/'facts-client.json').read_text()):raise ValueError('reference block metadata differs') fixtures=list(corpus(bundle['rules'],bundle['biomes']));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(f,separators=(',',':'))+'\n' for f in fixtures),encoding='utf-8') fixture_paths=[inputs,build/'facts-client.json',build/'facts-server.json',*[build/(field+'.json') for field in bundle]];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') - metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True));binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True));binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'material_condition_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,'VanillaMaterialConditionOracle',side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_material_stage_parity.py b/tools/test_material_stage_parity.py index 46bb4649bb..a22f686972 100644 --- a/tools/test_material_stage_parity.py +++ b/tools/test_material_stage_parity.py @@ -132,7 +132,7 @@ def main(): f['top_queries']=top_queries(f);f['carving']=carving_fixture(f,facts) inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(f,separators=(',',':'))+'\n' for f in fixtures),encoding='utf-8') fixture_paths=[inputs,*preset_exports,build/'facts-client.json',build/'facts-server.json',*[build/(name+'.json') for name in bundle]];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust');metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True));binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe');run([binary,'material_stage_fixture',build],'rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust');metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True));binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe');run([binary,'material_stage_fixture',build],'rust') with (build/'rust.txt').open() as stream: if any((line.startswith('surface ') or line.startswith('top ') or line.startswith('carving ') or line.startswith('generatedcarving ')) and line.endswith(' error\n') for line in stream):raise AssertionError('valid surface fixture failed; inspect private Rust log') references=[] diff --git a/tools/test_material_surface_parity.py b/tools/test_material_surface_parity.py index 120decbe7f..b4fa34f6df 100644 --- a/tools/test_material_surface_parity.py +++ b/tools/test_material_surface_parity.py @@ -52,9 +52,9 @@ def main(): with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) dependency_path=os.pathsep.join(map(str,libraries)) run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"material_surface_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_mob_ai_parity.py b/tools/test_mob_ai_parity.py index ccc50b302b..bd88021435 100644 --- a/tools/test_mob_ai_parity.py +++ b/tools/test_mob_ai_parity.py @@ -477,7 +477,7 @@ def main(): 'dev.horizonlab.parity.VanillaMobAiOracle', inputs, build / 'vanilla.txt', world], build, 'vanilla', timeout=3600) if not args.java_only: - command = ['cargo', 'build', '--locked', '--release', '-p', 'horizon-client', '--example', 'probe'] + command = ['cargo', 'build', '--locked', '--release', '-p', 'horizon-client', '--example', 'client_probe'] target, env = lab.cargo_target(), None if args.trace: target = lab.LOCAL / 'mob-ai-trace-target' @@ -485,7 +485,7 @@ def main(): env = dict(os.environ, CARGO_TARGET_DIR=str(target), CARGO_PROFILE_RELEASE_DEBUG='line-tables-only', CARGO_PROFILE_RELEASE_LTO='false', CARGO_PROFILE_RELEASE_CODEGEN_UNITS='16') oracle_harness.run_logged(command, build, 'compile-rust', env=env) - binary = target / 'release/examples/probe' + binary = target / 'release/examples/client_probe' oracle_harness.run_logged([binary, 'mob_ai_probe', lab.RESOURCES, inputs, build / 'horizon.txt'], build, 'horizon') if args.java_only: return diff --git a/tools/test_mob_attributes_parity.py b/tools/test_mob_attributes_parity.py index 6cefdc4b81..7fa1df5e61 100755 --- a/tools/test_mob_attributes_parity.py +++ b/tools/test_mob_attributes_parity.py @@ -62,8 +62,8 @@ def main(): subprocess.run(list(map(str, cmd)), cwd=lab.ROOT, check=True, timeout=3600, stdout=log, stderr=subprocess.STDOUT) run(['javac', '--release', lock['minecraft']['java_major'], '-proc:none', '-cp', str(jars['server']) + os.pathsep + deps, '-d', classes, oracle], 'compile-java') run(['java', '-Xmx1G', '-cp', os.pathsep.join([str(classes), str(jars['server']), deps]), 'dev.horizonlab.parity.VanillaMobAttributesOracle', build / 'vanilla.txt'], 'java') - run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'probe'], 'compile-rust') - binary = lab.cargo_target() / 'release/examples/probe' + run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'client_probe'], 'compile-rust') + binary = lab.cargo_target() / 'release/examples/client_probe' resources = lab.RESOURCES run([binary, 'mob_attributes_fixture', resources, build / 'rust.txt'], 'rust') vanilla, rust = parse(build / 'vanilla.txt'), parse(build / 'rust.txt') diff --git a/tools/test_movement_emission_parity.py b/tools/test_movement_emission_parity.py index 7db2c16d05..5307cd600b 100644 --- a/tools/test_movement_emission_parity.py +++ b/tools/test_movement_emission_parity.py @@ -57,9 +57,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaMovementEmissionOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'movement_emission_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_movement_registry_parity.py b/tools/test_movement_registry_parity.py index 190c34d37f..732664f3a4 100644 --- a/tools/test_movement_registry_parity.py +++ b/tools/test_movement_registry_parity.py @@ -69,9 +69,9 @@ def main(): fixture_paths = [build/name for name in ['inputs.txt', 'registry-info.json', 'movement-properties.nbt', 'block-registry.nbt', 'tags.json']] fixtures = base.source_hashes(fixture_paths) - run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'world_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) - binary = Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary = Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary, 'movement_registry_fixture', build], 'rust');references = [] for side, jar in jars.items(): java(side, side) diff --git a/tools/test_movement_support_parity.py b/tools/test_movement_support_parity.py index 793804a9ec..1d6a53c1f8 100644 --- a/tools/test_movement_support_parity.py +++ b/tools/test_movement_support_parity.py @@ -59,9 +59,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaMovementSupportOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'movement_support_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_native_scene_collision.py b/tools/test_native_scene_collision.py index 8efc6946b2..2c292b28d9 100644 --- a/tools/test_native_scene_collision.py +++ b/tools/test_native_scene_collision.py @@ -82,9 +82,9 @@ def main(): dependencies = os.pathsep.join(map(str, libraries)) run(['javac', '--release', lock['minecraft']['java_major'], '-proc:none', '-cp', str(jars['server'])+os.pathsep+dependencies, '-d', classes, oracle, *helpers], 'compile-java') - run(['cargo', 'build', '--locked', '-p', 'horizon-client', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--locked', '-p', 'horizon-client', '--example', 'client_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) - executable = Path(metadata['target_directory'])/'debug/examples'/('probe.exe' if os.name=='nt' else 'probe') + executable = Path(metadata['target_directory'])/'debug/examples'/('client_probe.exe' if os.name=='nt' else 'client_probe') cases = [] for radius in [1, 2]: build = root/str(radius); build.mkdir(exist_ok=True) diff --git a/tools/test_native_scene_motion.py b/tools/test_native_scene_motion.py index a917d7337a..08af5330c6 100644 --- a/tools/test_native_scene_motion.py +++ b/tools/test_native_scene_motion.py @@ -807,9 +807,9 @@ def main(): damage_dir=build/'damage';damage_dir.mkdir(exist_ok=True) for target, source in [('types.json','damage-types.json'),('tags.json','damage-tags.json')]: (damage_dir/target).write_bytes((resources/source).read_bytes()) - run(['cargo','build','--locked','-p','horizon-client','--example','probe'],'compile-rust') + run(['cargo','build','--locked','-p','horizon-client','--example','client_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT)) - binary=Path(metadata['target_directory'])/'debug/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'debug/examples'/('client_probe.exe' if os.name=='nt' else 'client_probe') run([binary,'scene_motion_probe',resources,build,'--describe'],'describe') references=[] for side,jar in jars.items(): diff --git a/tools/test_natural_spawn_parity.py b/tools/test_natural_spawn_parity.py index 3c95e6ac29..50781eca7f 100644 --- a/tools/test_natural_spawn_parity.py +++ b/tools/test_natural_spawn_parity.py @@ -568,9 +568,9 @@ def main(): '-cp', str(jars['server']) + os.pathsep + deps, '-d', classes, oracle], 'compile-java') run(['java', '-Xmx3G', '-cp', os.pathsep.join([str(classes), str(jars['server']), deps]), 'dev.horizonlab.parity.VanillaNaturalSpawnOracle', inputs, build / 'server.txt'], 'server') - run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'client_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--no-deps', '--format-version', '1'], cwd=lab.ROOT, text=True)) - binary = Path(metadata['target_directory']) / 'release/examples/probe' + binary = Path(metadata['target_directory']) / 'release/examples/client_probe' run([binary, 'natural_spawn_fixture', resources, inputs, build / 'rust.txt'], 'rust') vanilla = (build / 'server.txt').read_text().splitlines() errors = [l for l in vanilla if ' error ' in l] diff --git a/tools/test_nether_portal_parity.py b/tools/test_nether_portal_parity.py index 71cbf7be81..0805c985c3 100644 --- a/tools/test_nether_portal_parity.py +++ b/tools/test_nether_portal_parity.py @@ -145,7 +145,7 @@ def main(): '-cp', dependencies, '-d', str(classes), str(java_root / 'dev/horizonlab/parity/VanillaPortalOracle.java')]) h.run(['java', '-Xmx3G', '-cp', str(classes) + os.pathsep + dependencies, 'dev.horizonlab.parity.VanillaPortalOracle', str(resources), str(work / 'cases.jsonl'), str(work / 'native.txt')]) - h.run(['cargo', 'run', '-q', '--release', '-p', 'horizon-world', '--example', 'probe', '--', + h.run(['cargo', 'run', '-q', '--release', '-p', 'horizon-world', '--example', 'world_probe', '--', 'portal_travel_fixture', str(resources), str(work / 'cases.jsonl'), str(work / 'rust.txt')], cwd=lab.ROOT) native = h.split_cases((work / 'native.txt').read_text(), ()) rust = h.split_cases((work / 'rust.txt').read_text(), ()) diff --git a/tools/test_object_open_map_parity.py b/tools/test_object_open_map_parity.py index 72bafc1a46..1dc7d255f6 100644 --- a/tools/test_object_open_map_parity.py +++ b/tools/test_object_open_map_parity.py @@ -128,9 +128,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaObjectOpenMapOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'object_open_map_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_object_open_set_parity.py b/tools/test_object_open_set_parity.py index 3801cdb601..3eda39fe8e 100644 --- a/tools/test_object_open_set_parity.py +++ b/tools/test_object_open_set_parity.py @@ -77,9 +77,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaObjectOpenSetOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'object_open_set_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_pack_selection_parity.py b/tools/test_pack_selection_parity.py index 9af372d1e9..0bca824fa3 100644 --- a/tools/test_pack_selection_parity.py +++ b/tools/test_pack_selection_parity.py @@ -71,7 +71,7 @@ def main(): *(PARITY / f'{n}.java' for n in ('ParityData', 'VanillaPackSelectionOracle'))], 'compile-java') run(['java', '-Xmx1G', '-cp', str(classes) + os.pathsep + dependencies, 'dev.horizonlab.parity.VanillaPackSelectionOracle', inputs, build / 'vanilla.jsonl'], 'vanilla') - run(['cargo', 'run', '--quiet', '--profile', 'fast', '-p', 'horizon-client', '--example', 'probe', '--', + run(['cargo', 'run', '--quiet', '--profile', 'fast', '-p', 'horizon-client', '--example', 'client_probe', '--', 'pack_selection_fixture', inputs, build / 'rust.jsonl'], 'rust') vanilla = [json.loads(l) for l in (build / 'vanilla.jsonl').read_text().splitlines()] rust = [json.loads(l) for l in (build / 'rust.jsonl').read_text().splitlines()] diff --git a/tools/test_piston_movement_parity.py b/tools/test_piston_movement_parity.py index 82bcd09ca2..cfed8950ab 100644 --- a/tools/test_piston_movement_parity.py +++ b/tools/test_piston_movement_parity.py @@ -60,9 +60,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaPistonMovementOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'piston_movement_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_piston_shape_parity.py b/tools/test_piston_shape_parity.py index 74ae48e393..85fdac770f 100644 --- a/tools/test_piston_shape_parity.py +++ b/tools/test_piston_shape_parity.py @@ -63,9 +63,9 @@ def main(): if len(facts['states'])!=35723:raise ValueError('incomplete pinned registry') fixtures=list(corpus(facts));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs,build/'facts.json',build/'block-registry.nbt',build/'cached-collision.nbt'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'piston_shape_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_placement_parity.py b/tools/test_placement_parity.py index d4e84eaf8c..f02daac8ec 100644 --- a/tools/test_placement_parity.py +++ b/tools/test_placement_parity.py @@ -108,9 +108,9 @@ def main(): with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) dependency_path=os.pathsep.join(map(str,libraries)) run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"placement_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_player_equipment_parity.py b/tools/test_player_equipment_parity.py index 5f2499eab0..4b2408e5db 100644 --- a/tools/test_player_equipment_parity.py +++ b/tools/test_player_equipment_parity.py @@ -62,9 +62,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaPlayerEquipmentOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'player_equipment_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_player_food_parity.py b/tools/test_player_food_parity.py index ff38abe392..e94de7644a 100644 --- a/tools/test_player_food_parity.py +++ b/tools/test_player_food_parity.py @@ -59,9 +59,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaPlayerFoodOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'player_food_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_player_health_parity.py b/tools/test_player_health_parity.py index 256ffdf46b..ff5a795eff 100644 --- a/tools/test_player_health_parity.py +++ b/tools/test_player_health_parity.py @@ -58,9 +58,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaPlayerHealthOracle',mode,path],side+'-'+mode) java('server','export',build);states=json.loads((build/'catalog.json').read_text());fixtures=list(corpus(states));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs,build/'catalog.json',build/'ids.json'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'player_health_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_player_hurt_parity.py b/tools/test_player_hurt_parity.py index 34ce6a9ddf..23100bcab0 100644 --- a/tools/test_player_hurt_parity.py +++ b/tools/test_player_hurt_parity.py @@ -82,9 +82,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaPlayerHurtOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'player_hurt_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_player_inventory_parity.py b/tools/test_player_inventory_parity.py index 10f6af8123..3447eb7d0b 100644 --- a/tools/test_player_inventory_parity.py +++ b/tools/test_player_inventory_parity.py @@ -68,9 +68,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaPlayerInventoryOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'player_inventory_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_player_travel_parity.py b/tools/test_player_travel_parity.py index 9b96ba8e87..193c290e5a 100644 --- a/tools/test_player_travel_parity.py +++ b/tools/test_player_travel_parity.py @@ -66,9 +66,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaPlayerTravelOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'player_travel_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_powder_snow_collision_parity.py b/tools/test_powder_snow_collision_parity.py index 10c287cc5f..edca02018c 100644 --- a/tools/test_powder_snow_collision_parity.py +++ b/tools/test_powder_snow_collision_parity.py @@ -62,9 +62,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaCollisionContextOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'collision_context_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_raid_parity.py b/tools/test_raid_parity.py index be1ed7e252..4928c9715e 100644 --- a/tools/test_raid_parity.py +++ b/tools/test_raid_parity.py @@ -335,9 +335,9 @@ def main(): '-cp', str(jars['server']) + os.pathsep + deps, '-d', classes, oracle], 'compile-java') run(['java', '-Xmx3G', '-cp', os.pathsep.join([str(classes), str(jars['server']), deps]), 'dev.horizonlab.parity.VanillaRaidOracle', inputs, build / 'server.txt'], 'server') - run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'client_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--no-deps', '--format-version', '1'], cwd=lab.ROOT, text=True)) - binary = Path(metadata['target_directory']) / 'release/examples/probe' + binary = Path(metadata['target_directory']) / 'release/examples/client_probe' run([binary, 'raid_fixture', resources, inputs, build / 'rust.txt'], 'rust') vanilla = (build / 'server.txt').read_text().splitlines() errors = [l for l in vanilla if ' error ' in l] diff --git a/tools/test_registered_entity_fluid_parity.py b/tools/test_registered_entity_fluid_parity.py index ff7a83eb6c..47970f63e1 100644 --- a/tools/test_registered_entity_fluid_parity.py +++ b/tools/test_registered_entity_fluid_parity.py @@ -67,7 +67,7 @@ def main(): with (build/'inputs.txt').open('w') as output: for f in corpus(info):output.write(json.dumps(f,separators=(',',':'))+'\n');count+=1 fixture_paths=[build/n for n in ['inputs.txt','facts.json','fluid-info.json','block-registry.nbt','cached-support.nbt','tags.json']];fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--locked','--release','-p','horizon-world','--example','probe'],'compile-rust');metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT));binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe');run([binary,'entity_fluid_fixture',build],'rust');references=[] + run(['cargo','build','--locked','--release','-p','horizon-world','--example','world_probe'],'compile-rust');metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT));binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe');run([binary,'entity_fluid_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side);matched=base.compare(build/(side+'.txt'),build/'rust.txt');references.append(dict(side=side,jar_sha256=lab.digest(jar,'sha256'),output_sha256=lab.digest(build/(side+'.txt'),'sha256'),matched_output_lines=matched));print(f'{side}: {matched:,} registered entity fluid output lines match Rust',flush=True) base.ensure_sources_unchanged(sources,tested);base.ensure_sources_unchanged(fixture_paths,fixtures) diff --git a/tools/test_registered_player_combat_parity.py b/tools/test_registered_player_combat_parity.py index eecb6e6cfe..c1f0c502b4 100644 --- a/tools/test_registered_player_combat_parity.py +++ b/tools/test_registered_player_combat_parity.py @@ -59,9 +59,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaRegisteredPlayerCombatOracle',mode,path],side+'-'+mode) java('server','export',build);states=json.loads((build/'catalog.json').read_text());damage=json.loads((damage_dir/'catalog.json').read_text());fixtures=list(corpus(states,damage));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs,build/'catalog.json',build/'ids.json',build/'slots.json',build/'head.json',damage_dir/'catalog.json',damage_dir/'types.json',damage_dir/'tags.json'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'registered_player_combat_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_registry_collision_scan_parity.py b/tools/test_registry_collision_scan_parity.py index 5b40d72856..bd6b4ce233 100644 --- a/tools/test_registry_collision_scan_parity.py +++ b/tools/test_registry_collision_scan_parity.py @@ -96,9 +96,9 @@ def main(): fixture_paths = [build/name for name in ['inputs.txt', 'facts.json', 'definitions.json', 'block-registry.nbt', 'cached-collision.nbt', 'tags.json']] fixtures = base.source_hashes(fixture_paths) - run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'world_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) - binary = Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary = Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary, 'registry_collision_scan_fixture', build], 'rust');references = [] for side, jar in jars.items(): java(side, side) diff --git a/tools/test_registry_fall_ray_parity.py b/tools/test_registry_fall_ray_parity.py index a7639c3abb..dbd560dc54 100644 --- a/tools/test_registry_fall_ray_parity.py +++ b/tools/test_registry_fall_ray_parity.py @@ -61,7 +61,7 @@ def main(): with (build/'inputs.txt').open('w') as output: for f in corpus(info):output.write(json.dumps(f,separators=(',',':'))+'\n');count+=1 fixture_paths=[build/n for n in ['inputs.txt','info.json','block-registry.nbt','interaction-shapes.nbt','tags.json','fluid-tags.json','bound-tags.json']];fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--locked','--release','-p','horizon-world','--example','probe'],'compile-rust');metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT));binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe');run([binary,'registry_fall_ray_fixture',build],'rust');references=[] + run(['cargo','build','--locked','--release','-p','horizon-world','--example','world_probe'],'compile-rust');metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT));binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe');run([binary,'registry_fall_ray_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side);matched=base.compare(build/(side+'.txt'),build/'rust.txt');references.append(dict(side=side,jar_sha256=lab.digest(jar,'sha256'),output_sha256=lab.digest(build/(side+'.txt'),'sha256'),matched_output_lines=matched));print(f'{side}: {matched:,} registered fall-ray output lines match Rust',flush=True) base.ensure_sources_unchanged(sources,tested);base.ensure_sources_unchanged(fixture_paths,fixtures) diff --git a/tools/test_registry_fluid_parity.py b/tools/test_registry_fluid_parity.py index fd0fb106b1..f767850cba 100644 --- a/tools/test_registry_fluid_parity.py +++ b/tools/test_registry_fluid_parity.py @@ -62,7 +62,7 @@ def main(): with (build/'inputs.txt').open('w') as output: for f in corpus(info):output.write(json.dumps(f,separators=(',',':'))+'\n');count+=1 fixture_paths=[build/n for n in ['inputs.txt','facts.json','fluid-info.json','block-registry.nbt','cached-support.nbt','tags.json']];fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--locked','--release','-p','horizon-world','--example','probe'],'compile-rust');metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT));binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe');run([binary,'registry_fluid_fixture',build],'rust');references=[] + run(['cargo','build','--locked','--release','-p','horizon-world','--example','world_probe'],'compile-rust');metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT));binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe');run([binary,'registry_fluid_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side);matched=base.compare(build/(side+'.txt'),build/'rust.txt');references.append(dict(side=side,jar_sha256=lab.digest(jar,'sha256'),output_sha256=lab.digest(build/(side+'.txt'),'sha256'),matched_output_lines=matched));print(f'{side}: {matched:,} registry_fluid output lines match Rust',flush=True) base.ensure_sources_unchanged(sources,tested);base.ensure_sources_unchanged(fixture_paths,fixtures) diff --git a/tools/test_replace_block_parity.py b/tools/test_replace_block_parity.py index e96bf4c728..84ab569994 100644 --- a/tools/test_replace_block_parity.py +++ b/tools/test_replace_block_parity.py @@ -68,9 +68,9 @@ def main(): fixtures=list(corpus(facts));inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") fixture_paths.append(inputs) tested_fixtures=base.source_hashes(fixture_paths) - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"replace_block_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_restitution_parity.py b/tools/test_restitution_parity.py index ada050a134..d5497e2d07 100644 --- a/tools/test_restitution_parity.py +++ b/tools/test_restitution_parity.py @@ -62,9 +62,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaRestitutionOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'restitution_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_retrogen_chunk_parity.py b/tools/test_retrogen_chunk_parity.py index 9a13e1303e..452d42d5b8 100644 --- a/tools/test_retrogen_chunk_parity.py +++ b/tools/test_retrogen_chunk_parity.py @@ -74,9 +74,9 @@ def main(): (build/"tags.json").write_text(json.dumps(tags,separators=(",",":")),encoding="utf-8") fixture_paths=[inputs,build/"tags.json",build/"facts-client.json",build/"facts-server.json"] tested_fixtures=base.source_hashes(fixture_paths) - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"chunk_stage_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_retrogen_data_parity.py b/tools/test_retrogen_data_parity.py index 242f3b5d31..6d03ab9a30 100644 --- a/tools/test_retrogen_data_parity.py +++ b/tools/test_retrogen_data_parity.py @@ -46,9 +46,9 @@ def main(): with (build/(name+'.log')).open('w') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) dependencies=os.pathsep.join(map(str,libraries)) run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-sourcepath',str(lab.ROOT/'mods/horizon/src/test/java'),'-cp',str(jars['server'])+os.pathsep+dependencies,'-d',classes,oracle],'compile-java') - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'retrogen_data_fixture',inputs,build/'rust.txt'],'rust') references=[] for side,jar in jars.items(): diff --git a/tools/test_rule_test_parity.py b/tools/test_rule_test_parity.py index 8fef86b95d..bb03397c12 100644 --- a/tools/test_rule_test_parity.py +++ b/tools/test_rule_test_parity.py @@ -73,9 +73,9 @@ def main(): if len(facts['states'])!=35723:raise ValueError('incomplete pinned state registry') fixtures=list(corpus(facts,tags));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs,build/'tags.json',build/'facts-client.json',build/'facts-server.json'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'rule_test_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_scaffolding_collision_parity.py b/tools/test_scaffolding_collision_parity.py index bebd630871..c71ffe7a3f 100644 --- a/tools/test_scaffolding_collision_parity.py +++ b/tools/test_scaffolding_collision_parity.py @@ -55,9 +55,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaCollisionContextOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'collision_context_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_scattered_ore_parity.py b/tools/test_scattered_ore_parity.py index 0cbb6fcac0..eba6723d2a 100644 --- a/tools/test_scattered_ore_parity.py +++ b/tools/test_scattered_ore_parity.py @@ -69,9 +69,9 @@ def main(): fixtures=list(corpus(facts));inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") fixture_paths.append(inputs) tested_fixtures=base.source_hashes(fixture_paths) - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"scattered_ore_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_scoreboard_parity.py b/tools/test_scoreboard_parity.py index db308d8618..b38dfb3015 100644 --- a/tools/test_scoreboard_parity.py +++ b/tools/test_scoreboard_parity.py @@ -250,9 +250,9 @@ def main(): inputs = build / 'inputs.jsonl' inputs.write_text(''.join(json.dumps(c, ensure_ascii=False) + '\n' for c in chosen), encoding='utf-8') run([*oracle, 'run', inputs, build / 'vanilla.jsonl'], 'vanilla') - run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'client_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--no-deps', '--format-version', '1'], cwd=lab.ROOT, text=True)) - binary = Path(metadata['target_directory']) / 'release/examples' / ('probe.exe' if os.name=='nt' else 'probe') + binary = Path(metadata['target_directory']) / 'release/examples' / ('client_probe.exe' if os.name=='nt' else 'client_probe') run([binary, 'scoreboard_fixture',build / 'registries.json', inputs, build / 'rust.jsonl', build / 'vanilla.jsonl'], 'rust') read = lambda p: [json.loads(l) for l in p.read_text(encoding='utf-8').splitlines()] vanilla, rust = read(build / 'vanilla.jsonl'), read(build / 'rust.jsonl') diff --git a/tools/test_section_mesh_parity.py b/tools/test_section_mesh_parity.py index 65878bc97c..a5471618f7 100644 --- a/tools/test_section_mesh_parity.py +++ b/tools/test_section_mesh_parity.py @@ -502,9 +502,9 @@ def main(): dependencies = os.pathsep.join(map(str, [jars['client'], *baking.client_libraries()])) run(['javac', '--release', lock['minecraft']['java_major'], '-proc:none','-sourcepath',str(lab.ROOT/'mods/horizon/src/test/java'), '-cp', dependencies, '-d', classes, oracle, *helpers], 'compile-java') env_jobs = os.environ.get('CARGO_BUILD_JOBS', '3') - run(['cargo', 'build', '--locked', '--profile', 'fast', '-j', env_jobs, '-p', 'horizon-client', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--locked', '--profile', 'fast', '-j', env_jobs, '-p', 'horizon-client', '--example', 'client_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) - binary = Path(metadata['target_directory']) / 'fast/examples' / ('probe.exe' if os.name=='nt' else 'probe') + binary = Path(metadata['target_directory']) / 'fast/examples' / ('client_probe.exe' if os.name=='nt' else 'client_probe') java = ['java', '-Xmx2G', '-cp', str(classes) + os.pathsep + dependencies, 'dev.horizonlab.parity.VanillaSectionMeshOracle'] run([binary, 'section_mesh_fixture',resources, inputs, BUILD / 'rust.jsonl'], 'rust') run([*java, inputs, BUILD / 'client.jsonl', resources], 'client') diff --git a/tools/test_server_player_combat_parity.py b/tools/test_server_player_combat_parity.py index 161c4cbcf7..a18dd61c69 100644 --- a/tools/test_server_player_combat_parity.py +++ b/tools/test_server_player_combat_parity.py @@ -77,9 +77,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaServerPlayerCombatOracle',mode,path],side+'-'+mode) java('server','export',build);states=json.loads((build/'catalog.json').read_text());fixtures=list(corpus(states));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs,build/'catalog.json',build/'ids.json',build/'slots.json',build/'head.json'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'server_player_combat_fixture',build],'rust') run([binary,'server_player_combat_fixture',build,'--live'],'rust-live') base.compare(build/'rust.txt',build/'rust-live.txt');references=[] diff --git a/tools/test_server_player_damage_parity.py b/tools/test_server_player_damage_parity.py index 8e1418f4e2..61a9271dac 100644 --- a/tools/test_server_player_damage_parity.py +++ b/tools/test_server_player_damage_parity.py @@ -62,9 +62,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaServerPlayerDamageOracle',mode,path],side+'-'+mode) java('server','export',build);states=json.loads((build/'catalog.json').read_text());fixtures=list(corpus(states));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs,build/'catalog.json',build/'ids.json',build/'slots.json'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'server_player_damage_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_simple_block_parity.py b/tools/test_simple_block_parity.py index 3af85a2419..697a946738 100644 --- a/tools/test_simple_block_parity.py +++ b/tools/test_simple_block_parity.py @@ -116,8 +116,8 @@ def run(corpus, build_name, source_file, scope): with inputs.open('w',encoding='utf-8') as output: for fixture in corpus(facts,placement):output.write(json.dumps(fixture,separators=(',',':'))+'\n');fixture_count+=1 fixtures=[inputs,*sorted(build.glob('*.nbt')),*[p for p in sorted(build.glob('*.json')) if p.name!='report.json']];tested_fixtures=base.source_hashes(fixtures);print(f'Prepared {fixture_count:,} placement fixtures',flush=True) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') - metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True));binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True));binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'simple_block_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);matched=base.compare(build/(side+'.txt'),build/'rust.txt');print(f'{side}: {matched:,} {label} output lines match Rust',flush=True) diff --git a/tools/test_simple_container_parity.py b/tools/test_simple_container_parity.py index 0af91292a1..6319db7e39 100644 --- a/tools/test_simple_container_parity.py +++ b/tools/test_simple_container_parity.py @@ -70,9 +70,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaSimpleContainerOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'simple_container_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_spawn_rules_parity.py b/tools/test_spawn_rules_parity.py index 19bd8db467..7f9ac07ce0 100644 --- a/tools/test_spawn_rules_parity.py +++ b/tools/test_spawn_rules_parity.py @@ -155,9 +155,9 @@ def main(): '-cp', str(jars['server']) + os.pathsep + deps, '-d', classes, oracle], 'compile-java') run(['java', '-Xmx2G', '-cp', os.pathsep.join([str(classes), str(jars['server']), deps]), 'dev.horizonlab.parity.VanillaSpawnRulesOracle', inputs, build / 'server.txt'], 'server') - run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'client_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--no-deps', '--format-version', '1'], cwd=lab.ROOT, text=True)) - binary = Path(metadata['target_directory']) / 'release/examples/probe' + binary = Path(metadata['target_directory']) / 'release/examples/client_probe' run([binary, 'spawn_rules_fixture', resources, inputs, build / 'rust.txt'], 'rust') vanilla = (build / 'server.txt').read_text().splitlines() errors = [l for l in vanilla if ' error ' in l] diff --git a/tools/test_spawner_parity.py b/tools/test_spawner_parity.py index 5aa9029e3e..187e211b7c 100644 --- a/tools/test_spawner_parity.py +++ b/tools/test_spawner_parity.py @@ -249,9 +249,9 @@ def main(): '-cp', str(jars['server']) + os.pathsep + deps, '-d', classes, oracle], 'compile-java') run(['java', '-Xmx3G', '-cp', os.pathsep.join([str(classes), str(jars['server']), deps]), 'dev.horizonlab.parity.VanillaNaturalSpawnOracle', inputs, build / 'server.txt'], 'server') - run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'client_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--no-deps', '--format-version', '1'], cwd=lab.ROOT, text=True)) - binary = Path(metadata['target_directory']) / 'release/examples/probe' + binary = Path(metadata['target_directory']) / 'release/examples/client_probe' run([binary, 'natural_spawn_fixture', resources, inputs, build / 'rust.txt'], 'rust') vanilla = (build / 'server.txt').read_text().splitlines() errors = [l for l in vanilla if ' error ' in l] diff --git a/tools/test_sprint_input_parity.py b/tools/test_sprint_input_parity.py index 0ac515e448..b2b86b7c29 100644 --- a/tools/test_sprint_input_parity.py +++ b/tools/test_sprint_input_parity.py @@ -49,9 +49,9 @@ def main(): classes=build/'classes';classes.mkdir(exist_ok=True) dependencies=os.pathsep.join(map(str,[jars['client'],*libraries])) run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-sourcepath',str(lab.ROOT/'mods/horizon/src/test/java'),'-cp',dependencies,'-d',classes,oracle],'compile-java') - run(['cargo','build','--locked','-p','horizon-client','--example','probe'],'compile-rust') + run(['cargo','build','--locked','-p','horizon-client','--example','client_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT)) - binary=Path(metadata['target_directory'])/'debug/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'debug/examples'/('client_probe.exe' if os.name=='nt' else 'client_probe') run([binary,'sprint_probe',inputs,build/'rust.txt'],'rust') run(['java','-Xmx768M','-cp',str(classes)+os.pathsep+dependencies,'dev.horizonlab.parity.VanillaSprintInputOracle',inputs,build/'client.txt'],'client') matched=base.compare(build/'client.txt',build/'rust.txt') diff --git a/tools/test_state_provider_parity.py b/tools/test_state_provider_parity.py index 9f75232730..42f2a4526d 100644 --- a/tools/test_state_provider_parity.py +++ b/tools/test_state_provider_parity.py @@ -371,9 +371,9 @@ def main(): output.write(json.dumps(fixture,separators=(',',':'))+'\n') fixture_count+=1;requested_samples+=len(fixture['states'])*fixture['repeats']*2 fixture_paths=[inputs,build/'survival-extra-definitions.json',build/'survival-placement-classes.json',build/'survival-support-tags.json',build/'survival-classes.json',build/'survival-rules.json',build/'cached-support.nbt',build/'support-cached-states.json',build/'block-properties.nbt',build/'cached-collision.nbt',build/'biomes.json',build/'biome_tags.json',build/'fluid-tags.json',build/'catalog.json',build/'providers.json',build/'tags.json',build/'facts-client.json',build/'facts-server.json'];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') counts={'block_states':len(facts['states']),'blocks':len(facts['defaults']),'integer_properties':len(facts['integers']),'codec_inputs':fixture_count,'provider_types':10,'named_providers':len(catalog_resources),'rule_predicate_types':16,'survival_supported_blocks':len(survival_rules),'survival_supported_states':sum(s['id'] in survival_rules for s in facts['states']),'support_cached_states':len(support_states),'support_dynamic_states':len(facts['states'])-len(support_states),'biomes':len(biomes),'biome_tag_files':len(biome_tags),'fluid_tag_files':len(fluid_tags),'bundled_provider_definitions':len(provider_resources),'block_tag_files':len(tags),'requested_samples':requested_samples} base.ensure_sources_unchanged(sources,tested_sources) checkpoint={'schema':1,'environment':environment,'sources_sha256':tested_sources,'fixtures_sha256':{str(lab.ROOT/name):digest for name,digest in tested_fixtures.items()},'artifacts_sha256':{str(path):lab.digest(path,'sha256') for path in [binary,*sorted(classes.rglob('*.class'))]},'binary':str(binary),'counts':counts,'outputs':{}} diff --git a/tools/test_status_effect_parity.py b/tools/test_status_effect_parity.py index 6f369c6830..899b63f66b 100644 --- a/tools/test_status_effect_parity.py +++ b/tools/test_status_effect_parity.py @@ -57,9 +57,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaStatusEffectOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'status_effect_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_status_tick_parity.py b/tools/test_status_tick_parity.py index 40786fe3ca..bc582ff4a7 100644 --- a/tools/test_status_tick_parity.py +++ b/tools/test_status_tick_parity.py @@ -58,9 +58,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaStatusTickOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'status_tick_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_stepped_interpolation_parity.py b/tools/test_stepped_interpolation_parity.py index e5586c9819..5029befd30 100644 --- a/tools/test_stepped_interpolation_parity.py +++ b/tools/test_stepped_interpolation_parity.py @@ -94,7 +94,7 @@ def main(): 'dev.horizonlab.parity.VanillaSteppedInterpolationOracle', str(events), str(build / 'vanilla.txt')], check=True) subprocess.run(['cargo', 'run', '--quiet', '--release', '-p', 'horizon-world', '--example', - 'probe', '--', 'stepped_interpolation_fixture', str(events), str(build / 'rust.txt')], cwd=lab.ROOT, check=True) + 'world_probe', '--', 'stepped_interpolation_fixture', str(events), str(build / 'rust.txt')], cwd=lab.ROOT, check=True) matched = base.compare(build / 'vanilla.txt', build / 'rust.txt') print(f'Stepped interpolation parity passed: {matched} entity positions and rotations match vanilla') diff --git a/tools/test_stored_consume_parity.py b/tools/test_stored_consume_parity.py index 3ddfed86a6..8837e6f009 100644 --- a/tools/test_stored_consume_parity.py +++ b/tools/test_stored_consume_parity.py @@ -66,9 +66,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaStoredConsumeOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') references=[] for side,jar in jars.items(): java(side,side,build) diff --git a/tools/test_stored_effect_attributes_parity.py b/tools/test_stored_effect_attributes_parity.py index 2a8fe799d8..84c86b27a5 100644 --- a/tools/test_stored_effect_attributes_parity.py +++ b/tools/test_stored_effect_attributes_parity.py @@ -94,9 +94,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaStoredEffectAttributesOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') references=[] for side,jar in jars.items(): java(side,side,build) diff --git a/tools/test_stored_effect_notifications_parity.py b/tools/test_stored_effect_notifications_parity.py index 6a0cee4030..945d112477 100644 --- a/tools/test_stored_effect_notifications_parity.py +++ b/tools/test_stored_effect_notifications_parity.py @@ -73,9 +73,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaStoredEffectNotificationsOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') references=[] for side,jar in jars.items(): java(side,side,build) diff --git a/tools/test_structure_density_parity.py b/tools/test_structure_density_parity.py index ad15790e00..b6cd9c8feb 100644 --- a/tools/test_structure_density_parity.py +++ b/tools/test_structure_density_parity.py @@ -68,9 +68,9 @@ def main(): with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) dependency_path=os.pathsep.join(map(str,libraries)) run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"structure_density_fixture",inputs,build/"rust.txt"],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_subtitle_parity.py b/tools/test_subtitle_parity.py index 1444bb5bd4..6baf25570b 100644 --- a/tools/test_subtitle_parity.py +++ b/tools/test_subtitle_parity.py @@ -133,9 +133,9 @@ def main(): *(PARITY / f'{n}.java' for n in ('ParityFont', 'VanillaSubtitleOracle'))], 'compile-java') run(['java', '-Xmx1G', '-cp', str(classes) + os.pathsep + dependencies, 'dev.horizonlab.parity.VanillaSubtitleOracle', inputs, build / 'vanilla.jsonl'], 'vanilla') - run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'client_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--no-deps', '--format-version', '1'], cwd=lab.ROOT, text=True)) - binary = Path(metadata['target_directory']) / 'release/examples' / ('probe.exe' if os.name=='nt' else 'probe') + binary = Path(metadata['target_directory']) / 'release/examples' / ('client_probe.exe' if os.name=='nt' else 'client_probe') run([binary, 'subtitle_fixture',resources, inputs, build / 'rust.jsonl'], 'rust') vanilla = [json.loads(l) for l in (build / 'vanilla.jsonl').read_text(encoding='utf-8').splitlines()] rust = [json.loads(l) for l in (build / 'rust.jsonl').read_text(encoding='utf-8').splitlines()] diff --git a/tools/test_suffocation_parity.py b/tools/test_suffocation_parity.py index ffe80b31f3..046a8ec823 100644 --- a/tools/test_suffocation_parity.py +++ b/tools/test_suffocation_parity.py @@ -72,9 +72,9 @@ def main(): fixture_paths = [build/name for name in ['inputs.txt', 'facts.json', 'definitions.json', 'block-registry.nbt', 'cached-collision.nbt', 'tags.json']] fixtures = base.source_hashes(fixture_paths) - run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'world_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) - binary = Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary = Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary, 'suffocation_fixture', build], 'rust');references = [] for side, jar in jars.items(): java(side, side) diff --git a/tools/test_swimming_parity.py b/tools/test_swimming_parity.py index 574b72e5be..87d2bb0342 100644 --- a/tools/test_swimming_parity.py +++ b/tools/test_swimming_parity.py @@ -51,9 +51,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaSwimmingOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'swimming_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_synced_bytes_parity.py b/tools/test_synced_bytes_parity.py index a6659bf21c..4d6389ffae 100644 --- a/tools/test_synced_bytes_parity.py +++ b/tools/test_synced_bytes_parity.py @@ -57,9 +57,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaSyncedBytesOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'synced_bytes_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_synced_floats_parity.py b/tools/test_synced_floats_parity.py index fa7ca7132f..78e8cec326 100644 --- a/tools/test_synced_floats_parity.py +++ b/tools/test_synced_floats_parity.py @@ -61,9 +61,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaSyncedFloatsOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'synced_floats_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_tab_list_parity.py b/tools/test_tab_list_parity.py index 9b3c65605d..4075859e75 100644 --- a/tools/test_tab_list_parity.py +++ b/tools/test_tab_list_parity.py @@ -241,12 +241,12 @@ def main(): *(PARITY / f'{n}.java' for n in ('ParityData', 'ParityFont', 'VanillaTabListOracle', 'VanillaSkinImageOracle'))], 'compile-java') run(['java', '-Xmx2G', '-cp', str(classes) + os.pathsep + dependencies, 'dev.horizonlab.parity.VanillaTabListOracle', inputs, build / 'vanilla.jsonl'], 'vanilla') - run(['cargo', 'run', '--quiet', '--profile', 'fast', '-p', 'horizon-client', '--example', 'probe', '--', + run(['cargo', 'run', '--quiet', '--profile', 'fast', '-p', 'horizon-client', '--example', 'client_probe', '--', 'tab_list_fixture', resources, inputs, build / 'rust.jsonl'], 'rust') images = build / 'skins.txt'; images.write_text(''.join(i + '\n' for i in skin_images(args.images))) run(['java', '-Xmx1G', '-cp', str(classes) + os.pathsep + dependencies, 'dev.horizonlab.parity.VanillaSkinImageOracle', images, build / 'vanilla-skins.txt'], 'vanilla-skins') - run(['cargo', 'run', '--quiet', '--profile', 'fast', '-p', 'horizon-client', '--example', 'probe', '--', + run(['cargo', 'run', '--quiet', '--profile', 'fast', '-p', 'horizon-client', '--example', 'client_probe', '--', 'skin_image_fixture', images, build / 'rust-skins.txt'], 'rust-skins') vanilla_skins = (build / 'vanilla-skins.txt').read_text().splitlines() rust_skins = (build / 'rust-skins.txt').read_text().splitlines() diff --git a/tools/test_team_rules_parity.py b/tools/test_team_rules_parity.py index 5eb0c7d9dd..ac66a412bd 100644 --- a/tools/test_team_rules_parity.py +++ b/tools/test_team_rules_parity.py @@ -84,9 +84,9 @@ def main(): PARITY / 'VanillaTeamRulesOracle.java'], 'compile-java') run(['java', '-Xmx1G', '-cp', str(classes) + os.pathsep + dependencies, 'dev.horizonlab.parity.VanillaTeamRulesOracle', inputs, build / 'vanilla.jsonl'], 'vanilla') - run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'client_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--no-deps', '--format-version', '1'], cwd=lab.ROOT, text=True)) - binary = Path(metadata['target_directory']) / 'release/examples' / ('probe.exe' if os.name=='nt' else 'probe') + binary = Path(metadata['target_directory']) / 'release/examples' / ('client_probe.exe' if os.name=='nt' else 'client_probe') run([binary, 'team_rules_fixture',inputs, build / 'rust.jsonl'], 'rust') vanilla = [json.loads(l) for l in (build / 'vanilla.jsonl').read_text().splitlines()] rust = [json.loads(l) for l in (build / 'rust.jsonl').read_text().splitlines()] diff --git a/tools/test_teleport_consume_parity.py b/tools/test_teleport_consume_parity.py index 8f51361f8a..8cbc23f529 100644 --- a/tools/test_teleport_consume_parity.py +++ b/tools/test_teleport_consume_parity.py @@ -54,9 +54,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaTeleportConsumeOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'teleport_consume_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_terrain_parity.py b/tools/test_terrain_parity.py index a818dcabbe..5dfcc76a2e 100644 --- a/tools/test_terrain_parity.py +++ b/tools/test_terrain_parity.py @@ -99,9 +99,9 @@ def main(): (build/"registries.json").write_text(json.dumps(bundle,separators=(",",":")),encoding="utf-8") fixture_paths=[inputs,build/"registries.json",build/"facts-client.json",build/"facts-server.json"] tested_fixtures=base.source_hashes(fixture_paths) - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"terrain_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_tick_parity.py b/tools/test_tick_parity.py index 47dd842d0e..92efb89f63 100644 --- a/tools/test_tick_parity.py +++ b/tools/test_tick_parity.py @@ -163,8 +163,8 @@ def main(): completed.check_returncode() return completed.stdout data_java("server", "generate") - test_rust_parity.run(["cargo", "build", "--release", "-p", "horizon-world", "--example", "probe"]) - fixture = Path(metadata["target_directory"]) / "release/examples" / ("probe.exe" if os.name=="nt" else "probe") + test_rust_parity.run(["cargo", "build", "--release", "-p", "horizon-world", "--example", "world_probe"]) + fixture = Path(metadata["target_directory"]) / "release/examples" / ("world_probe.exe" if os.name=="nt" else "world_probe") test_rust_parity.run([str(fixture), "tick_fixture", str(base)]) references = [] for side, jar in jars.items(): diff --git a/tools/test_trading_parity.py b/tools/test_trading_parity.py index c26c449fb6..46e81f9282 100644 --- a/tools/test_trading_parity.py +++ b/tools/test_trading_parity.py @@ -219,8 +219,8 @@ def main(): if args.java_only: print(f'{len(vanilla)} oracle lines') return - run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'probe'], 'compile-rust') - binary = lab.cargo_target() / 'release/examples/probe' + run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'client_probe'], 'compile-rust') + binary = lab.cargo_target() / 'release/examples/client_probe' run([binary, 'trading_fixture', resources, inputs, build / 'server.txt', build / 'rust.txt'], 'rust') rust = (build / 'rust.txt').read_text().splitlines() bad = [(a, b) for a, b in zip(vanilla, rust) if a != b] diff --git a/tools/test_translucency_parity.py b/tools/test_translucency_parity.py index fff0390eb1..22818b434b 100644 --- a/tools/test_translucency_parity.py +++ b/tools/test_translucency_parity.py @@ -52,7 +52,7 @@ def main(): lab.ROOT / 'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTranslucencyOracle.java'], 'compile-java') vanilla, rust = build / 'vanilla.jsonl', build / 'rust.jsonl' run(['java', '-cp', str(classes) + os.pathsep + dependencies, 'dev.horizonlab.parity.VanillaTranslucencyOracle', inputs, vanilla], 'vanilla') - run(['cargo', 'run', '--quiet', '--locked', '--profile', args.profile, '-p', 'horizon-client', '--example', 'probe', '--', 'translucency_fixture', inputs, rust], 'rust') + run(['cargo', 'run', '--quiet', '--locked', '--profile', args.profile, '-p', 'horizon-client', '--example', 'client_probe', '--', 'translucency_fixture', inputs, rust], 'rust') expected = [json.loads(line) for line in vanilla.read_text().splitlines()] actual = [json.loads(line) for line in rust.read_text().splitlines()] assert len(expected) == len(actual), 'case count differs' diff --git a/tools/test_tree_feature_parity.py b/tools/test_tree_feature_parity.py index b3f9ace689..a99c3a52bd 100644 --- a/tools/test_tree_feature_parity.py +++ b/tools/test_tree_feature_parity.py @@ -135,9 +135,9 @@ def main(): output.write(json.dumps(fixture,separators=(',',':'))+'\n');count+=1 fixtures=[inputs,*sorted(build.glob('*.nbt')),*[p for p in sorted(build.glob('*.json')) if p.name!='report.json']];tested_fixtures=fixture_hashes(fixtures) print(f'Prepared {count:,} feature fixtures',flush=True) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'tree_feature_fixture',build],'rust');references=[] for side,jar in jars.items(): java('VanillaTreeFeatureOracle',side,side,build);matched=base.compare(build/(side+'.txt'),build/'rust.txt');print(f'{side}: {matched:,} tree/ore output lines match Rust',flush=True) diff --git a/tools/test_trial_spawner_parity.py b/tools/test_trial_spawner_parity.py index bd6d69ac2e..7b2412eaa4 100644 --- a/tools/test_trial_spawner_parity.py +++ b/tools/test_trial_spawner_parity.py @@ -214,9 +214,9 @@ def main(): '-cp', str(jars['server']) + os.pathsep + deps, '-d', classes, oracle], 'compile-java') run(['java', '-Xmx3G', '-cp', os.pathsep.join([str(classes), str(jars['server']), deps]), 'dev.horizonlab.parity.VanillaNaturalSpawnOracle', inputs, build / 'server.txt'], 'server') - run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'client_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--no-deps', '--format-version', '1'], cwd=lab.ROOT, text=True)) - binary = Path(metadata['target_directory']) / 'release/examples/probe' + binary = Path(metadata['target_directory']) / 'release/examples/client_probe' run([binary, 'natural_spawn_fixture', resources, inputs, build / 'rust.txt'], 'rust') vanilla = (build / 'server.txt').read_text().splitlines() errors = [l for l in vanilla if ' error ' in l] diff --git a/tools/test_use_flag_reaction_parity.py b/tools/test_use_flag_reaction_parity.py index de3b5fa203..5498f3bc24 100644 --- a/tools/test_use_flag_reaction_parity.py +++ b/tools/test_use_flag_reaction_parity.py @@ -60,9 +60,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaUseFlagReactionOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'use_flag_reaction_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_use_remainder_parity.py b/tools/test_use_remainder_parity.py index 853d12acb3..5f7e5a160f 100644 --- a/tools/test_use_remainder_parity.py +++ b/tools/test_use_remainder_parity.py @@ -59,9 +59,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaUseRemainderOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'use_remainder_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_value_provider_parity.py b/tools/test_value_provider_parity.py index 589a97632b..0c36eb4bcf 100644 --- a/tools/test_value_provider_parity.py +++ b/tools/test_value_provider_parity.py @@ -74,9 +74,9 @@ def main(): with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) dependency_path=os.pathsep.join(map(str,libraries)) run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") - run(["cargo","build","--release","-p","horizon-world","--example","probe"],"compile-rust") + run(["cargo","build","--release","-p","horizon-world","--example","world_probe"],"compile-rust") metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) - binary=Path(metadata["target_directory"])/"release/examples"/("probe.exe" if os.name=="nt" else "probe") + binary=Path(metadata["target_directory"])/"release/examples"/("world_probe.exe" if os.name=="nt" else "world_probe") run([binary,"value_provider_fixture",build],"rust") references=[] for side,jar in jars.items(): diff --git a/tools/test_vault_parity.py b/tools/test_vault_parity.py index 73c41e1970..5741320d35 100644 --- a/tools/test_vault_parity.py +++ b/tools/test_vault_parity.py @@ -190,9 +190,9 @@ def main(): '-cp', str(jars['server']) + os.pathsep + deps, '-d', classes, oracle], 'compile-java') run(['java', '-Xmx3G', '-cp', os.pathsep.join([str(classes), str(jars['server']), deps]), 'dev.horizonlab.parity.VanillaNaturalSpawnOracle', inputs, build / 'server.txt'], 'server') - run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--release', '-p', 'horizon-client', '--example', 'client_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--no-deps', '--format-version', '1'], cwd=lab.ROOT, text=True)) - binary = Path(metadata['target_directory']) / 'release/examples/probe' + binary = Path(metadata['target_directory']) / 'release/examples/client_probe' run([binary, 'natural_spawn_fixture', resources, inputs, build / 'rust.txt'], 'rust') vanilla = (build / 'server.txt').read_text().splitlines() errors = [l for l in vanilla if ' error ' in l] diff --git a/tools/test_view_direction_parity.py b/tools/test_view_direction_parity.py index f2738dcff8..6230bcdab8 100644 --- a/tools/test_view_direction_parity.py +++ b/tools/test_view_direction_parity.py @@ -58,9 +58,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaViewDirectionOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'view_direction_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_water_splash_parity.py b/tools/test_water_splash_parity.py index 84f89d3606..830f349072 100644 --- a/tools/test_water_splash_parity.py +++ b/tools/test_water_splash_parity.py @@ -59,9 +59,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaWaterSplashOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'water_splash_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_world_border_parity.py b/tools/test_world_border_parity.py index 6181949783..01d0c1e073 100644 --- a/tools/test_world_border_parity.py +++ b/tools/test_world_border_parity.py @@ -70,9 +70,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaWorldBorderOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'world_border_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_world_border_render_parity.py b/tools/test_world_border_render_parity.py index f8c88b6a62..f064cf031a 100644 --- a/tools/test_world_border_render_parity.py +++ b/tools/test_world_border_render_parity.py @@ -103,7 +103,7 @@ def main(): PARITY / 'VanillaWorldBorderRenderOracle.java'], 'compile-java') run(['java', '-Xmx1G', '-cp', str(classes) + os.pathsep + dependencies, 'dev.horizonlab.parity.VanillaWorldBorderRenderOracle', inputs, build / 'vanilla.jsonl'], 'vanilla') - run(['cargo', 'run', '--quiet', '--profile', 'fast', '-p', 'horizon-client', '--example', 'probe', '--', + run(['cargo', 'run', '--quiet', '--profile', 'fast', '-p', 'horizon-client', '--example', 'client_probe', '--', 'world_border_render_fixture', inputs, build / 'rust.jsonl'], 'rust') vanilla = [json.loads(l) for l in (build / 'vanilla.jsonl').read_text().splitlines()] rust = [json.loads(l) for l in (build / 'rust.jsonl').read_text().splitlines()] diff --git a/tools/test_world_collision_check_parity.py b/tools/test_world_collision_check_parity.py index 3dae747d54..7c625c4489 100644 --- a/tools/test_world_collision_check_parity.py +++ b/tools/test_world_collision_check_parity.py @@ -80,9 +80,9 @@ def main(): fixture_paths = [build/name for name in ['inputs.txt', 'facts.json', 'definitions.json', 'block-registry.nbt', 'cached-collision.nbt', 'tags.json']] fixtures = base.source_hashes(fixture_paths) - run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'world_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) - binary = Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary = Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary, 'registry_collision_scan_fixture', build], 'rust');references = [] for side, jar in jars.items(): java(side, side) diff --git a/tools/test_world_edge_backoff_parity.py b/tools/test_world_edge_backoff_parity.py index 10cf1316fe..b4b07622ae 100644 --- a/tools/test_world_edge_backoff_parity.py +++ b/tools/test_world_edge_backoff_parity.py @@ -81,9 +81,9 @@ def main(): fixture_paths = [build/name for name in ['inputs.txt', 'facts.json', 'definitions.json', 'block-registry.nbt', 'cached-collision.nbt', 'tags.json']] fixtures = base.source_hashes(fixture_paths) - run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'world_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) - binary = Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary = Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary, 'registry_collision_scan_fixture', build], 'rust');references = [] for side, jar in jars.items(): java(side, side) diff --git a/tools/test_world_movement_parity.py b/tools/test_world_movement_parity.py index 5a583ecb79..067d147a9e 100644 --- a/tools/test_world_movement_parity.py +++ b/tools/test_world_movement_parity.py @@ -106,9 +106,9 @@ def main(): fixture_paths = [build/name for name in ['inputs.txt', 'facts.json', 'definitions.json', 'block-registry.nbt', 'cached-collision.nbt', 'tags.json']] fixtures = base.source_hashes(fixture_paths) - run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'probe'], 'compile-rust') + run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'world_probe'], 'compile-rust') metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) - binary = Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary = Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary, 'registry_collision_scan_fixture', build], 'rust');references = [] for side, jar in jars.items(): java(side, side) diff --git a/tools/test_world_parity.py b/tools/test_world_parity.py index e2781866e4..0b4a3deb70 100644 --- a/tools/test_world_parity.py +++ b/tools/test_world_parity.py @@ -51,12 +51,12 @@ def main(): print("Generating vanilla world-data fixtures...", flush=True) print(java("server", "generate").split("HORIZON_WORLD_GENERATED")[-1].strip(), flush=True) - run(["cargo", "build", "--release", "-p", "horizon-world", "--bin", "horizon-world", "--example", "probe"], base / "compile-rust.log") + run(["cargo", "build", "--release", "-p", "horizon-world", "--bin", "horizon-world", "--example", "world_probe"], base / "compile-rust.log") metadata = json.loads(run(["cargo", "metadata", "--no-deps", "--format-version", "1"])) target = Path(metadata["target_directory"]) / "release" suffix = ".exe" if os.name == "nt" else "" binary = target / ("horizon-world" + suffix) - run([target / "examples" / ("probe" + suffix), "world_fixture", base], base / "rust-fixture.log") + run([target / "examples" / ("world_probe" + suffix), "world_fixture", base], base / "rust-fixture.log") for network in [False, True]: kind = "network" if network else "nbt" output = base / "rust" / kind diff --git a/tools/test_world_ray_parity.py b/tools/test_world_ray_parity.py index 87189d6110..46315b5dfc 100644 --- a/tools/test_world_ray_parity.py +++ b/tools/test_world_ray_parity.py @@ -60,9 +60,9 @@ def main(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaWorldRayOracle',mode,path],side+'-'+mode) fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'world_ray_fixture',build],'rust');references=[] for side,jar in jars.items(): java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') diff --git a/tools/test_world_spawn_parity.py b/tools/test_world_spawn_parity.py index f73da3a8cb..5daa38a45d 100644 --- a/tools/test_world_spawn_parity.py +++ b/tools/test_world_spawn_parity.py @@ -79,7 +79,7 @@ def origins(build, classes, dependencies, all_seeds): vanilla_out = build / 'origins-vanilla.txt' oh.run_logged(['java', '-cp', str(classes) + os.pathsep + dependencies, 'dev.horizonlab.parity.VanillaWorldSpawnOracle', vanilla_out, *all_seeds], build, 'origins-vanilla') - rust = subprocess.run([target_dir() / 'examples/probe', 'spawn_origin', RESOURCES, *map(str, all_seeds)], + rust = subprocess.run([target_dir() / 'examples/world_probe', 'spawn_origin', RESOURCES, *map(str, all_seeds)], capture_output=True, text=True, check=True, cwd=lab.ROOT).stdout vanilla = vanilla_out.read_text() parse = lambda text: {int(l.split()[0]): tuple(map(int, l.split()[1:])) for l in text.splitlines() if l} @@ -121,7 +121,7 @@ def main(): oh.run_logged(['javac', '--release', lock['minecraft']['java_major'], '-proc:none', '-nowarn', '-cp', dependencies, '-d', classes, lab.ROOT / 'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldSpawnOracle.java'], build, 'compile-java') - oh.run_logged(['cargo', 'build', '--release', '-p', 'horizon-world', '--example', 'probe'], build, 'compile-probe') + oh.run_logged(['cargo', 'build', '--release', '-p', 'horizon-world', '--example', 'world_probe'], build, 'compile-probe') all_seeds = parity_shard.shard(args.seed or seeds(args.random)) started = time.time() diff --git a/tools/test_worldgen_random_parity.py b/tools/test_worldgen_random_parity.py index 29eedfa499..5371c0444b 100644 --- a/tools/test_worldgen_random_parity.py +++ b/tools/test_worldgen_random_parity.py @@ -53,9 +53,9 @@ def main(): with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) dependency_path=os.pathsep.join(map(str,libraries)) run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-sourcepath',str(lab.ROOT/'mods/horizon/src/test/java'),'-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') - run(['cargo','build','--release','-p','horizon-world','--example','probe'],'compile-rust') + run(['cargo','build','--release','-p','horizon-world','--example','world_probe'],'compile-rust') metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) - binary=Path(metadata['target_directory'])/'release/examples'/('probe.exe' if os.name=='nt' else 'probe') + binary=Path(metadata['target_directory'])/'release/examples'/('world_probe.exe' if os.name=='nt' else 'world_probe') run([binary,'worldgen_random_fixture',build],'rust');references=[] for side,jar in jars.items(): run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jar),dependency_path]),'dev.horizonlab.parity.VanillaWorldgenRandomOracle',side,build],side)