···
pkgs.runCommand "OpenOrbis-PNG-Sample"
24
-
nativeBuildInputs = with pkgs; [ unzip ];
24
+
nativeBuildInputs = with pkgs; [
meta.license = lib.licenses.gpl3Only;
unzip ${sample-packages} samples/IV0000-BREW00086_00-IPNGDRAWEX000000.pkg
30
-
mv samples/IV0000-BREW00086_00-IPNGDRAWEX000000.pkg $out/OpenOrbis-PNG-Sample.pkg
32
+
mkdir -p $out/OpenOrbis-PNG-Sample
33
+
pkgtool pkg_extract samples/IV0000-BREW00086_00-IPNGDRAWEX000000.pkg $out/OpenOrbis-PNG-Sample
systemPackages = with pkgs; [
···
machine.wait_for_text("Play Time")
machine.screenshot("0002-shadps4-started")
93
-
with subtest("installing example works"):
96
+
with subtest("running example works"):
97
+
# Ensure that chosen openorbis logo colour isn't present already
99
+
check_for_color(openorbisColor)(True) == False
100
+
), "openorbisColor {} was present on the screen before we launched anything!".format(openorbisColor)
machine.succeed("xdotool mousemove 20 30 click 1") # click on "File"
95
-
machine.wait_for_text("Install Packages")
103
+
machine.wait_for_text("Boot Game")
# Pick the PNG sample (hello world runs too, but text-only output is currently broken)
machine.wait_for_text("Look in")
101
-
machine.send_chars("/etc/openorbis-sample-packages/OpenOrbis-PNG-Sample.pkg\n")
103
-
# Install to default dir
104
-
machine.wait_for_text("which directory")
105
-
machine.send_key("ret")
107
-
# Wait for installation getting done & return to main window
108
-
machine.wait_for_text("successfully installed")
109
-
machine.send_key("ret")
111
-
# Sample should now be listed
112
-
machine.wait_for_text("OpenOrbis PNG Sample")
113
-
machine.screenshot("0003-shadps4-sample-installed")
115
-
with subtest("emulation works-ish"):
116
-
# Ensure that selection colours isn't present already
118
-
check_for_color(selectionColor)(True) == False
119
-
), "selectionColor {} was present on the screen before we selected anything!".format(selectionColor)
121
-
# Select first installed app
122
-
machine.succeed("xdotool mousemove 20 150 click 1")
124
-
# Waiting for selection to be confirmed
125
-
with machine.nested("Waiting for the screen to have selectionColor {} on it:".format(selectionColor)):
126
-
retry(check_for_color(selectionColor))
128
-
# Ensure that chosen openorbis logo colour isn't present already
130
-
check_for_color(openorbisColor)(True) == False
131
-
), "openorbisColor {} was present on the screen before we selected anything!".format(openorbisColor)
133
-
# Click launch button
134
-
machine.succeed("xdotool mousemove 40 60 click 1")
135
-
machine.wait_for_console_text("Entering draw loop...")
109
+
machine.send_chars("/etc/openorbis-sample-packages/OpenOrbis-PNG-Sample/uroot/eboot.bin\n")
with machine.nested("Waiting for the screen to have openorbisColor {} on it:".format(openorbisColor)):
retry(check_for_color(openorbisColor))
140
-
machine.screenshot("0004-shadps4-sample-running")
114
+
machine.screenshot("0003-shadps4-sample-running")