Author: locilka Date: Mon Jul 14 16:44:04 2008 New Revision: 49063 URL: http://svn.opensuse.org/viewcvs/yast?rev=49063&view=rev Log: Testing mode for inst_license Modified: trunk/installation/src/clients/inst_license.ycp Modified: trunk/installation/src/clients/inst_license.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_license.ycp?rev=49063&r1=49062&r2=49063&view=diff ============================================================================== --- trunk/installation/src/clients/inst_license.ycp (original) +++ trunk/installation/src/clients/inst_license.ycp Mon Jul 14 16:44:04 2008 @@ -20,6 +20,7 @@ import "ProductLicense"; import "Mode"; import "ProductFeatures"; +import "Wizard"; // all the arguments map argmap = GetInstArgs::argmap(); @@ -37,6 +38,17 @@ action = "abort"; } +boolean test_mode = false; + +if (size (WFM::Args()) > 0 && is (WFM::Args(0), string)) { + y2milestone ("Args: %1", WFM::Args()); + + if (WFM::Args(0) == "test") + test_mode = true; +} + +if (test_mode) Wizard::CreateDialog(); + symbol ask_ret = nil; if (Stage::initial ()) @@ -46,7 +58,7 @@ else { // #304865: Enhance YaST Modules to cooperate better handling the product licenses - string directory = argmap["directory"]:"" + string directory = argmap["directory"]:""; // Priority 1: Script args if (directory != nil && directory != "") { @@ -72,6 +84,8 @@ ask_ret = ProductLicense::AskInstalledLicenseAgreement (directory, [], action); } +if (test_mode) Wizard::CloseDialog(); + if (ask_ret == nil || ask_ret == `auto) return `auto; else if (ask_ret == `abort || ask_ret == `back) @@ -81,7 +95,8 @@ UI::CloseDialog(); // License has been aborted // bugzilla #282958 - SCR::Execute(.target.bash, "/sbin/halt -f -n -p"); + if (test_mode != true) + SCR::Execute(.target.bash, "/sbin/halt -f -n -p"); return `abort; } else if (ask_ret == `next) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org