From: daiyoung777.kim Date: Mon, 3 Dec 2012 06:22:58 +0000 (+0900) Subject: - modified to use an emulator image X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d2d20d2afe283d66d16a612fa9597a305e181e57;p=sdk%2Femulator%2Femulator-test.git - modified to use an emulator image --- diff --git a/vts/script/main.lua b/vts/script/main.lua index 3478157..f322bc8 100644 --- a/vts/script/main.lua +++ b/vts/script/main.lua @@ -18,6 +18,9 @@ env.report_dir = "../report/"; -- assume that has been created. --env.modulepath = "/c/tizen-sdk/tools/emulator/bin"; --env.modulepath = "c:\\tizen-sdk\\tools\\emulator\\bin"; +-- add image path to here +global_img_path = "~/tizen-sdk-data/emulator-vms/emulimg-created_from_lua.x86" + --model = TCModel(); --model:SetEnv(env); --settcmodel(model); diff --git a/vts/script/tc_emulator_manager.lua b/vts/script/tc_emulator_manager.lua index ef19d86..b3bda96 100644 --- a/vts/script/tc_emulator_manager.lua +++ b/vts/script/tc_emulator_manager.lua @@ -64,12 +64,21 @@ function test_emulator_manager(env) end function launch_for_image(em_suite) - --local img_path = "../res/img/xxx.img" - --local create_vm_from_img = sjava("create from img"); - --create_vm_from_img:AddParam1('create --name ' .. env.vmname .. ' -p' .. img_path); + + local del_vm = sjava("delete vm"); + del_vm:AddParam1('delete -n ' .. env.vmname); - local create_vm_from_img = sjava("create"); - create_vm_from_img:AddParam1('create --name ' .. env.vmname .. ' --base 1'); + + -- TODO : remove vm that already created before. + -- TODO : set your image path for the testing at the "img_path" + local img_path = "~/tizen-sdk-data/emulator-vms/emulimg-created_from_lua.x86" + local create_vm_from_img = sjava("create from img"); + --create_vm_from_img:AddParam1('create --name ' .. env.vmname .. ' -p ' .. img_path); + create_vm_from_img:AddParam1('create --name ' .. env.vmname .. ' -p ' .. global_img_path); + --local create_vm_from_img = sjava("create"); + --create_vm_from_img:AddParam1('create --name ' .. env.vmname .. ' --base 1'); + + create_vm_from_img:SetSuccessToken("Success"); local launch = sjava("launch"); launch:AddParam1('launch -n ' .. env.vmname); @@ -82,6 +91,7 @@ function launch_for_image(em_suite) check:SetTimeout(2, 160000, "menu-screen"); -- repeat command until timeout tc_launch = cmd_suite("emulator launching test"); + tc_launch:AddCmdTest(del_vm); tc_launch:AddCmdTest(create_vm_from_img); tc_launch:AddCmdTest(launch); tc_launch:AddCmdTest(check);