|
@@ -605,10 +605,13 @@ if ($events[2].fields.cmd -ne "FANCH") { throw "ack cmd was $($events[2].fields.
|
|
|
"commands",
|
|
"commands",
|
|
|
"pin_inventory.fcb_fpga_mcu0611.json",
|
|
"pin_inventory.fcb_fpga_mcu0611.json",
|
|
|
"sha256-inventory.json",
|
|
"sha256-inventory.json",
|
|
|
- "Compress-Archive",
|
|
|
|
|
|
|
+ "Compress-Archive",
|
|
|
".zip.sha256.txt",
|
|
".zip.sha256.txt",
|
|
|
|
|
+ "j6tmp-v2-tailfix",
|
|
|
|
|
+ "j6tmp.bit",
|
|
|
|
|
+ "collect.ps1",
|
|
|
|
|
+ "td.json",
|
|
|
"temp-uart-ptc-remap",
|
|
"temp-uart-ptc-remap",
|
|
|
- "j6-host-sensor-real-fan-ptc-temp-uart-ptc-remap-debug921-v2-epochfix-psarrayfix-tailfix",
|
|
|
|
|
"startup-preflight.json",
|
|
"startup-preflight.json",
|
|
|
"READY profile=temp-uart-ptc-remap",
|
|
"READY profile=temp-uart-ptc-remap",
|
|
|
"collector first, then PROGRAM_SRAM",
|
|
"collector first, then PROGRAM_SRAM",
|
|
@@ -624,9 +627,10 @@ if ($events[2].fields.cmd -ne "FANCH") { throw "ack cmd was $($events[2].fields.
|
|
|
self.assertNotIn("Set-ExecutionPolicy", script)
|
|
self.assertNotIn("Set-ExecutionPolicy", script)
|
|
|
self.assertNotIn("-AssumeManualSramProgrammed $true", script)
|
|
self.assertNotIn("-AssumeManualSramProgrammed $true", script)
|
|
|
for marker in [
|
|
for marker in [
|
|
|
- "formal-uart",
|
|
|
|
|
- "j6-host-sensor-real-fan-ptc-formal-uart-debug921-v1",
|
|
|
|
|
- "debug115",
|
|
|
|
|
|
|
+ "formal-uart",
|
|
|
|
|
+ "j6-host-sensor-real-fan-ptc-formal-uart-debug921-v1",
|
|
|
|
|
+ "j6-host-sensor-real-fan-ptc-temp-uart-ptc-remap-debug921-v2-epochfix-psarrayfix-tailfix",
|
|
|
|
|
+ "debug115",
|
|
|
"swapped",
|
|
"swapped",
|
|
|
"-ManualSramAttestation",
|
|
"-ManualSramAttestation",
|
|
|
"$att.status",
|
|
"$att.status",
|
|
@@ -664,7 +668,7 @@ if ($events[2].fields.cmd -ne "FANCH") { throw "ack cmd was $($events[2].fields.
|
|
|
encoding="utf-8",
|
|
encoding="utf-8",
|
|
|
)
|
|
)
|
|
|
for profile, package_name in [
|
|
for profile, package_name in [
|
|
|
- ("temp-uart-ptc-remap", "j6-host-sensor-real-fan-ptc-temp-uart-ptc-remap-debug921-v2-epochfix-psarrayfix-tailfix-test"),
|
|
|
|
|
|
|
+ ("temp-uart-ptc-remap", "j6tmp-v2-tailfix-test"),
|
|
|
]:
|
|
]:
|
|
|
with self.subTest(profile=profile):
|
|
with self.subTest(profile=profile):
|
|
|
result = subprocess.run(
|
|
result = subprocess.run(
|
|
@@ -694,14 +698,23 @@ if ($events[2].fields.cmd -ne "FANCH") { throw "ack cmd was $($events[2].fields.
|
|
|
output = (result.stderr or b"").decode("utf-8", errors="replace") + (
|
|
output = (result.stderr or b"").decode("utf-8", errors="replace") + (
|
|
|
result.stdout or b""
|
|
result.stdout or b""
|
|
|
).decode("utf-8", errors="replace")
|
|
).decode("utf-8", errors="replace")
|
|
|
- self.assertEqual(result.returncode, 0, output)
|
|
|
|
|
- stage = Path(tmp) / package_name
|
|
|
|
|
- self.assertTrue((stage / "START-HERE.zh-CN.md").is_file())
|
|
|
|
|
- self.assertTrue((stage / "collector" / "collect-j6-host-sensor-real-fan-ptc.ps1").is_file())
|
|
|
|
|
- self.assertTrue((stage / "commands" / "collect-template.ps1").is_file())
|
|
|
|
|
- self.assertTrue((stage / "bitstreams" / bitstream.name).is_file())
|
|
|
|
|
- self.assertTrue((stage / "td-receipts" / td_receipt.name).is_file())
|
|
|
|
|
- self.assertTrue((stage / "config" / "pin_inventory.fcb_fpga_mcu0611.json").is_file())
|
|
|
|
|
|
|
+ self.assertEqual(result.returncode, 0, output)
|
|
|
|
|
+ stage = Path(tmp) / package_name
|
|
|
|
|
+ short_bit = stage / "j6tmp.bit"
|
|
|
|
|
+ short_collect = stage / "collect.ps1"
|
|
|
|
|
+ short_td = stage / "td.json"
|
|
|
|
|
+ self.assertTrue((stage / "START-HERE.zh-CN.md").is_file())
|
|
|
|
|
+ self.assertTrue(short_bit.is_file())
|
|
|
|
|
+ self.assertTrue(short_collect.is_file())
|
|
|
|
|
+ self.assertTrue(short_td.is_file())
|
|
|
|
|
+ self.assertTrue((stage / "collector" / "collect-j6-host-sensor-real-fan-ptc.ps1").is_file())
|
|
|
|
|
+ self.assertTrue((stage / "commands" / "collect-template.ps1").is_file())
|
|
|
|
|
+ self.assertTrue((stage / "bitstreams" / bitstream.name).is_file())
|
|
|
|
|
+ self.assertTrue((stage / "td-receipts" / td_receipt.name).is_file())
|
|
|
|
|
+ self.assertEqual(short_bit.read_bytes(), bitstream.read_bytes())
|
|
|
|
|
+ self.assertEqual(json.loads(short_td.read_text(encoding="utf-8-sig"))["status"], "pass")
|
|
|
|
|
+ self.assertLess(len(str(short_bit)), 100)
|
|
|
|
|
+ self.assertTrue((stage / "config" / "pin_inventory.fcb_fpga_mcu0611.json").is_file())
|
|
|
self.assertTrue((stage / "schemas" / "real_bmc_j6_host_sensor_real_fan_ptc_debug921_v1_receipt.schema.json").is_file())
|
|
self.assertTrue((stage / "schemas" / "real_bmc_j6_host_sensor_real_fan_ptc_debug921_v1_receipt.schema.json").is_file())
|
|
|
self.assertFalse((stage / "blocked").exists())
|
|
self.assertFalse((stage / "blocked").exists())
|
|
|
self.assertTrue((Path(tmp) / f"{package_name}.zip").is_file())
|
|
self.assertTrue((Path(tmp) / f"{package_name}.zip").is_file())
|
|
@@ -709,10 +722,15 @@ if ($events[2].fields.cmd -ne "FANCH") { throw "ack cmd was $($events[2].fields.
|
|
|
start_here = (stage / "START-HERE.zh-CN.md").read_text(encoding="utf-8-sig")
|
|
start_here = (stage / "START-HERE.zh-CN.md").read_text(encoding="utf-8-sig")
|
|
|
self.assertIn("PROGRAM_SRAM", start_here)
|
|
self.assertIn("PROGRAM_SRAM", start_here)
|
|
|
self.assertIn("先启动 collector", start_here)
|
|
self.assertIn("先启动 collector", start_here)
|
|
|
- self.assertIn("collector first, then PROGRAM_SRAM", start_here)
|
|
|
|
|
- self.assertIn(f"-Profile {profile}", start_here)
|
|
|
|
|
- self.assertIn(f".\\bitstreams\\{bitstream.name}", start_here)
|
|
|
|
|
- self.assertIn(f".\\td-receipts\\{td_receipt.name}", start_here)
|
|
|
|
|
|
|
+ self.assertIn("collector first, then PROGRAM_SRAM", start_here)
|
|
|
|
|
+ self.assertIn(f"-Profile {profile}", start_here)
|
|
|
|
|
+ self.assertIn(".\\j6tmp.bit", start_here)
|
|
|
|
|
+ self.assertIn(".\\td.json", start_here)
|
|
|
|
|
+ self.assertIn("-File .\\collect.ps1", start_here)
|
|
|
|
|
+ self.assertIn("Cannot open file", start_here)
|
|
|
|
|
+ self.assertIn("bitstreams", start_here)
|
|
|
|
|
+ self.assertNotIn(f".\\bitstreams\\{bitstream.name}", start_here)
|
|
|
|
|
+ self.assertNotIn(f".\\td-receipts\\{td_receipt.name}", start_here)
|
|
|
self.assertIn("powershell.exe -NoProfile -ExecutionPolicy Bypass -File", start_here)
|
|
self.assertIn("powershell.exe -NoProfile -ExecutionPolicy Bypass -File", start_here)
|
|
|
self.assertIn("-HostPort COM8 -DebugPort COM7", start_here)
|
|
self.assertIn("-HostPort COM8 -DebugPort COM7", start_here)
|
|
|
self.assertIn("tail drain", start_here)
|
|
self.assertIn("tail drain", start_here)
|
|
@@ -727,17 +745,33 @@ if ($events[2].fields.cmd -ne "FANCH") { throw "ack cmd was $($events[2].fields.
|
|
|
encoding="utf-8-sig"
|
|
encoding="utf-8-sig"
|
|
|
)
|
|
)
|
|
|
self.assertNotIn("Set-ExecutionPolicy", collect_template)
|
|
self.assertNotIn("Set-ExecutionPolicy", collect_template)
|
|
|
- self.assertNotIn("-AssumeManualSramProgrammed", collect_template)
|
|
|
|
|
- self.assertIn("-NoProfile", collect_template)
|
|
|
|
|
- self.assertIn("-ExecutionPolicy Bypass", collect_template)
|
|
|
|
|
- self.assertIn("-File .\\collector\\collect-j6-host-sensor-real-fan-ptc.ps1", collect_template)
|
|
|
|
|
- self.assertNotIn("blocked_pin_conflict_with_locked_debug_uart", start_here)
|
|
|
|
|
|
|
+ self.assertNotIn("-AssumeManualSramProgrammed", collect_template)
|
|
|
|
|
+ self.assertIn("-NoProfile", collect_template)
|
|
|
|
|
+ self.assertIn("-ExecutionPolicy Bypass", collect_template)
|
|
|
|
|
+ self.assertIn("-File .\\collect.ps1", collect_template)
|
|
|
|
|
+ shortcut = short_collect.read_text(encoding="utf-8-sig")
|
|
|
|
|
+ self.assertIn("$PSHOME", shortcut)
|
|
|
|
|
+ self.assertIn("$PSScriptRoot", shortcut)
|
|
|
|
|
+ self.assertIn('"-File"', shortcut)
|
|
|
|
|
+ self.assertIn('Join-Path $packageRoot "collector\\collect-j6-host-sensor-real-fan-ptc.ps1"', shortcut)
|
|
|
|
|
+ self.assertIn('[string]$Bitstream = ".\\j6tmp.bit"', shortcut)
|
|
|
|
|
+ self.assertIn('[string]$TdReceipt = ".\\td.json"', shortcut)
|
|
|
|
|
+ self.assertIn('"-Bitstream"', shortcut)
|
|
|
|
|
+ self.assertIn('"-TdReceipt"', shortcut)
|
|
|
|
|
+ self.assertIn("[switch]$SelfTest", shortcut)
|
|
|
|
|
+ self.assertNotIn("Set-ExecutionPolicy", shortcut)
|
|
|
|
|
+ self.assertNotIn("-AssumeManualSramProgrammed", shortcut)
|
|
|
|
|
+ self.assertNotIn("blocked_pin_conflict_with_locked_debug_uart", start_here)
|
|
|
|
|
|
|
|
manifest = json.loads((stage / "manifest.json").read_text(encoding="utf-8-sig"))
|
|
manifest = json.loads((stage / "manifest.json").read_text(encoding="utf-8-sig"))
|
|
|
self.assertEqual(manifest["status"], "pass")
|
|
self.assertEqual(manifest["status"], "pass")
|
|
|
self.assertEqual(manifest["pin_profile"], profile)
|
|
self.assertEqual(manifest["pin_profile"], profile)
|
|
|
- self.assertIn("epochfix-psarrayfix-tailfix", manifest["package_name"])
|
|
|
|
|
|
|
+ self.assertIn("j6tmp-v2-tailfix", manifest["package_name"])
|
|
|
self.assertEqual(manifest["programming_mode"], "PROGRAM_SRAM")
|
|
self.assertEqual(manifest["programming_mode"], "PROGRAM_SRAM")
|
|
|
|
|
+ self.assertEqual(manifest["bitstream"]["path"], "j6tmp.bit")
|
|
|
|
|
+ self.assertEqual(manifest["td_receipt"]["path"], "td.json")
|
|
|
|
|
+ self.assertEqual(manifest["short_path_aliases"]["bitstream"]["source"], f"bitstreams/{bitstream.name}")
|
|
|
|
|
+ self.assertEqual(manifest["short_path_aliases"]["td_receipt"]["source"], f"td-receipts/{td_receipt.name}")
|
|
|
self.assertIn("host_control_commands", manifest)
|
|
self.assertIn("host_control_commands", manifest)
|
|
|
self.assertIn("pin_map", manifest)
|
|
self.assertIn("pin_map", manifest)
|
|
|
self.assertIn("tail_drain", manifest)
|
|
self.assertIn("tail_drain", manifest)
|
|
@@ -745,10 +779,13 @@ if ($events[2].fields.cmd -ne "FANCH") { throw "ack cmd was $($events[2].fields.
|
|
|
|
|
|
|
|
inventory = json.loads((stage / "sha256-inventory.json").read_text(encoding="utf-8-sig"))
|
|
inventory = json.loads((stage / "sha256-inventory.json").read_text(encoding="utf-8-sig"))
|
|
|
self.assertEqual(inventory["self_hash_policy"], "excluded_self_referential_file")
|
|
self.assertEqual(inventory["self_hash_policy"], "excluded_self_referential_file")
|
|
|
- inventory_paths = {item["path"] for item in inventory["inventory"]}
|
|
|
|
|
- self.assertIn("manifest.json", inventory_paths)
|
|
|
|
|
- self.assertIn("START-HERE.zh-CN.md", inventory_paths)
|
|
|
|
|
- self.assertIn("collector/collect-j6-host-sensor-real-fan-ptc.ps1", inventory_paths)
|
|
|
|
|
|
|
+ inventory_paths = {item["path"] for item in inventory["inventory"]}
|
|
|
|
|
+ self.assertIn("manifest.json", inventory_paths)
|
|
|
|
|
+ self.assertIn("START-HERE.zh-CN.md", inventory_paths)
|
|
|
|
|
+ self.assertIn("j6tmp.bit", inventory_paths)
|
|
|
|
|
+ self.assertIn("collect.ps1", inventory_paths)
|
|
|
|
|
+ self.assertIn("td.json", inventory_paths)
|
|
|
|
|
+ self.assertIn("collector/collect-j6-host-sensor-real-fan-ptc.ps1", inventory_paths)
|
|
|
self.assertIn("commands/collect-template.ps1", inventory_paths)
|
|
self.assertIn("commands/collect-template.ps1", inventory_paths)
|
|
|
self.assertNotIn("sha256-inventory.json", inventory_paths)
|
|
self.assertNotIn("sha256-inventory.json", inventory_paths)
|
|
|
|
|
|