mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-05 01:23:45 -06:00
fix: emulator JSON-LD names every repository read
The structured data of an emulator page published one repository and one commit. A profile whose builds live in two repositories, or a port with an upstream_commit, now lists each repository with its own pin.
This commit is contained in:
1 parent
08396be3c6
commit
1bbb1d4749
2 files changed
+40
-15
No files matched your search
@@ -4125,6 +4125,22 @@ class EmulatorPagesStateTheirDataForMachines(unittest.TestCase):
|
||||
self.assertEqual(data["hasPart"][0]["identifier"], ["sha1:" + "a" * 40, "md5:490f666e"])
|
||||
self.assertNotIn("identifier", data["hasPart"][1])
|
||||
|
||||
def test_every_repository_with_its_own_pin(self):
|
||||
"""xemu's libretro build lives in another repository at another
|
||||
commit, and a port's upstream_commit was never published."""
|
||||
from scripts.generate_site import emulator_structured_data
|
||||
|
||||
data = emulator_structured_data({
|
||||
"emulator": "xemu",
|
||||
"source": {"standalone": "https://github.com/xemu-project/xemu",
|
||||
"libretro": "https://github.com/LibretroAdmin/xemu-libretro"},
|
||||
"source_commit": {"standalone": "f9b14039", "libretro": "d9804db7"},
|
||||
"upstream": "https://github.com/mborgerson/xemu", "upstream_commit": "aa11",
|
||||
})
|
||||
self.assertEqual(
|
||||
[(a["codeRepository"].rsplit("/", 1)[1], a.get("version")) for a in data["about"]],
|
||||
[("xemu", "f9b14039"), ("xemu-libretro", "d9804db7"), ("xemu", "aa11")])
|
||||
|
||||
|
||||
|
||||
class AManifestHashesAFileOnce(unittest.TestCase):
|
||||
|
||||
Reference in new issue
Block a user