Author: titmuss
Date: Tue Apr 29 03:34:42 2008
New Revision: 2385
URL: http://svn.slimdevices.com?rev=2385&root=Jive&view=rev
Log:
Bug: N/A
Description:
Harden the smoke test macros.
Modified:
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/MacroPlay/MacroPlayApplet.lua
7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/FactoryResetMacro.lua
7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/ForcedUpgradeMacro.lua
7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/Macros.lua
7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/PlaymodeMacro.lua
7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/SoftwareUpgradeMacro.lua
Modified:
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/MacroPlay/MacroPlayApplet.lua
URL:
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/MacroPlay/MacroPlayApplet.lua?rev=2385&root=Jive&r1=2384&r2=2385&view=diff
==============================================================================
---
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/MacroPlay/MacroPlayApplet.lua
(original)
+++
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/MacroPlay/MacroPlayApplet.lua
Tue Apr 29 03:34:42 2008
@@ -374,17 +374,17 @@
return
end
- local len = #menu:getItems()
+ local index = menu:getSelectedIndex()
local ok = false
- for i=1,len do
+ repeat
macroEvent(100, EVENT_KEY_PRESS, KEY_DOWN)
if macroIsMenuItem(pattern) then
ok = true
break
end
- end
+ until menu:getSelectedIndex() == index
macroDelay(interval)
return ok
Modified:
7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/FactoryResetMacro.lua
URL:
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/FactoryResetMacro.lua?rev=2385&root=Jive&r1=2384&r2=2385&view=diff
==============================================================================
--- 7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/FactoryResetMacro.lua
(original)
+++ 7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/FactoryResetMacro.lua
Tue Apr 29 03:34:42 2008
@@ -4,7 +4,9 @@
-- Settings
-macroSelectMenuItem(100, "Settings")
+if not macroSelectMenuItem(100, "Settings") then
+ return macroFail("Settings")
+end
macroEvent(100, EVENT_KEY_PRESS, KEY_GO)
if not macroScreenshot(1000, "Settings") then
@@ -13,7 +15,9 @@
-- Advanced
-macroSelectMenuItem(100, "Advanced")
+if not macroSelectMenuItem(100, "Advanced") then
+ return macroFail("Advanced")
+end
macroEvent(100, EVENT_KEY_PRESS, KEY_GO)
if not macroScreenshot(1000, "Advanced") then
@@ -22,7 +26,9 @@
-- Factory Reset
-macroSelectMenuItem(100, "Factory Reset")
+if not macroSelectMenuItem(100, "Factory Reset") then
+ return macroFail("FactoryReset1")
+end
macroEvent(500, EVENT_KEY_PRESS, KEY_GO)
if not macroScreenshot(1000, "FactoryReset1") then
@@ -31,7 +37,9 @@
-- Begin update
-macroSelectMenuItem(100, "Continue")
+if not macroSelectMenuItem(100, "Continue") then
+ return macroFail("FactoryReset2")
+end
macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
if not macroScreenshot(1000, "FactoryReset2") then
Modified:
7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/ForcedUpgradeMacro.lua
URL:
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/ForcedUpgradeMacro.lua?rev=2385&root=Jive&r1=2384&r2=2385&view=diff
==============================================================================
---
7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/ForcedUpgradeMacro.lua
(original)
+++
7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/ForcedUpgradeMacro.lua
Tue Apr 29 03:34:42 2008
@@ -11,7 +11,9 @@
-- Begin update
-macroSelectMenuItem(100, "Begin update")
+if not macroSelectMenuItem(100, "Begin update") then
+ return macroFail("CopyingUpdate")
+end
macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
if not macroScreenshot(1000, "CopyingUpdate") then
Modified: 7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/Macros.lua
URL:
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/Macros.lua?rev=2385&root=Jive&r1=2384&r2=2385&view=diff
==============================================================================
--- 7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/Macros.lua (original)
+++ 7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/Macros.lua Tue Apr 29
03:34:42 2008
@@ -1,6 +1,6 @@
return {
- auto=false,
- autostart={ "homeMenu", "playmode" },
+ auto=3,
+ autostart={ "forcedUpgrade", "softwareUpgrade", "homeMenu", "playmode" },
macros={
factoryReset={
desc="Verify a factory reset.",
@@ -16,13 +16,11 @@
desc="Verify the home menu.",
file="HomeMenuMacro.lua",
name="Home Menu",
- passed="Sun Apr 13 09:23:07 2008"
},
playmode={
desc="Playmode tests (stop/pause/play).",
file="PlaymodeMacro.lua",
- name="Playmode",
- passed="Sun Apr 13 09:29:03 2008"
+ name="Playmode"
},
softwareUpgrade={
desc="User requested software upgrade.",
Modified:
7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/PlaymodeMacro.lua
URL:
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/PlaymodeMacro.lua?rev=2385&root=Jive&r1=2384&r2=2385&view=diff
==============================================================================
--- 7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/PlaymodeMacro.lua
(original)
+++ 7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/PlaymodeMacro.lua Tue
Apr 29 03:34:42 2008
@@ -3,7 +3,9 @@
macroHome(100)
-- select Now Playing
-macroSelectMenuItem(100, "Now Playing")
+if not macroSelectMenuItem(100, "Now Playing") then
+ return macroFail("Now Playing")
+end
-- key go into Now Playing
macroEvent(100, EVENT_KEY_PRESS, KEY_GO)
Modified:
7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/SoftwareUpgradeMacro.lua
URL:
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/SoftwareUpgradeMacro.lua?rev=2385&root=Jive&r1=2384&r2=2385&view=diff
==============================================================================
---
7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/SoftwareUpgradeMacro.lua
(original)
+++
7.1/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/SoftwareUpgradeMacro.lua
Tue Apr 29 03:34:42 2008
@@ -4,7 +4,9 @@
-- Settings
-macroSelectMenuItem(100, "Settings")
+if not macroSelectMenuItem(100, "Settings") then
+ return macroFail("Settings")
+end
macroEvent(100, EVENT_KEY_PRESS, KEY_GO)
if not macroScreenshot(1000, "Settings") then
@@ -13,7 +15,9 @@
-- Advanced
-macroSelectMenuItem(100, "Advanced")
+if not macroSelectMenuItem(100, "Advanced") then
+ return macroFail("Advanced")
+end
macroEvent(100, EVENT_KEY_PRESS, KEY_GO)
if not macroScreenshot(1000, "Advanced") then
@@ -22,7 +26,9 @@
-- Software Update
-macroSelectMenuItem(100, "Software Update")
+if not macroSelectMenuItem(100, "Software Update") then
+ return macroFail("SoftwareUpdate")
+end
macroEvent(500, EVENT_KEY_PRESS, KEY_GO)
if not macroScreenshot(1000, "SoftwareUpdate") then
@@ -31,7 +37,9 @@
-- Begin update
-macroSelectMenuItem(100, "Begin Update")
+if not macroSelectMenuItem(100, "Begin Update") then
+ return macroFail("CopyingUpdate")
+end
macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
if not macroScreenshot(1000, "CopyingUpdate") then
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins