Install and deistall using .sh scripts

Asked by Nikolai Lysenko

Hello everyone. I'm testing installation and deinstallation of software. I'm using .sh scripts. My script on Sikulix is below.
How I can get signal from sh.script, that it is executed without errors? How I use wait("install_success.png"). Maybe exist other way. Thanks for help.

click("start.png")
click("util.png")
click("fly-term.png")
sleep(2)
type("sudo su" + Key.ENTER)
sleep(2)
type("mc" + Key.ENTER)
sleep(2)
type("cd /root" + Key.ENTER)
sleep(3)
doubleClick("iso.png")
sleep(3)
type(Key.ALT + Key.SHIFT + "+")
type("*" + Key.ENTER)
sleep(3)
type(Key.TAB)
type("cd /root/repo" + Key.ENTER)
type("rm -rf /root/repo/*" + Key.ENTER)
sleep(3)
type(Key.TAB)
click("copy.png")
sleep(3)
click("next.png")
sleep(35)
type(Key.TAB)
type("chmod +x ./install-server.sh" + Key.ENTER)
sleep(5)
type("./install-server.sh" + Key.ENTER)
sleep(70)
type(Key.PAGE_DOWN + Key.ENTER)
sleep(180)
type("o",KEY_CTRL)
wait("install_success.png")
sleep(2)
type("o",KEY_CTRL)
type("chmod +x ./install-arm.sh" + Key.ENTER)
sleep(3)
type("./install-arm.sh" + Key.ENTER)
sleep(60)
type("o",KEY_CTRL)
wait("install_success.png")
App.close("fly-term")

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
TestMechanic
Solved:
Last query:
Last reply:
Revision history for this message
Best TestMechanic (ndinev) said :
#1

you can call

> echo $?

to see exit code of last command in linux

But I think this is not enough. You need to find ways to verify that your script was done the things that needs to be done.

Revision history for this message
Nikolai Lysenko (zemik69) said :
#2

Thanks TestMechanic, that solved my question.