This commit is contained in:
commit
07eb6dc053
318 changed files with 339857 additions and 0 deletions
9
scripts/download-easy-npc.sh
Normal file
9
scripts/download-easy-npc.sh
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
destination="${1:-build/dependencies}"
|
||||
mkdir -p "$destination"
|
||||
artifact="$destination/easy_npc-neoforge-1.21.1-7.12.1.jar"
|
||||
curl --fail --location --retry 2 \
|
||||
'https://cdn.modrinth.com/data/Epm6R3P2/versions/e5wGcNT7/easy_npc-neoforge-1.21.1-7.12.1.jar' \
|
||||
--output "$artifact"
|
||||
printf '%s %s\n' '5f16c303087fc6abea8707b4660c2d81a15b719b0e243cf099f7b3bacebbb5e69eb4d57bd28328cbb09c5e26a2dfc9aade8b9707fb9cf9e64d70f18216662ead' "$artifact" | sha512sum --check
|
||||
20
scripts/prepare-client-smoke.py
Normal file
20
scripts/prepare-client-smoke.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
"""Prepare the isolated graphical test world. Run GameTests first."""
|
||||
from pathlib import Path
|
||||
import gzip
|
||||
|
||||
root = Path(__file__).resolve().parents[1]
|
||||
source = root / "run/gameTestServer/world/level.dat"
|
||||
destination = root / "run/clientSmoke/saves/smoke"
|
||||
destination.mkdir(parents=True, exist_ok=True)
|
||||
data = gzip.decompress(source.read_bytes())
|
||||
for key, value in [("SpawnX", 0), ("SpawnY", -59), ("SpawnZ", 0)]:
|
||||
needle = b"\x03" + len(key).to_bytes(2, "big") + key.encode()
|
||||
position = data.find(needle)
|
||||
if position < 0:
|
||||
raise ValueError(f"Missing spawn tag: {key}")
|
||||
position += len(needle)
|
||||
data = data[:position] + value.to_bytes(4, "big", signed=True) + data[position + 4:]
|
||||
(destination / "level.dat").write_bytes(gzip.compress(data))
|
||||
run = root / "run/clientSmoke"
|
||||
(run / "options.txt").write_text("guiScale:2\nlang:fr_fr\nrenderDistance:5\nsimulationDistance:5\nmaxFps:30\n")
|
||||
(run / "counter-smoke.ok").unlink(missing_ok=True)
|
||||
7
scripts/verify.sh
Normal file
7
scripts/verify.sh
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
mkdir -p build/reports
|
||||
./gradlew build runGameTestServer "$@" 2>&1 | tee build/reports/gametest.log
|
||||
# A loader failure may exit successfully before any tests run: require the actual completion marker.
|
||||
grep -Eq 'All [1-9][0-9]* required tests passed' build/reports/gametest.log
|
||||
Loading…
Add table
Add a link
Reference in a new issue