[yast-commit] r59998 - in /trunk/storage/storage/src/testsuite/lib: helper1a.ycp helper1b.ycp setup-system.ycp
Author: aschnell Date: Tue Dec 8 12:35:20 2009 New Revision: 59998 URL: http://svn.opensuse.org/viewcvs/yast?rev=59998&view=rev Log: - helpers for proposal tests Added: trunk/storage/storage/src/testsuite/lib/helper1a.ycp trunk/storage/storage/src/testsuite/lib/helper1b.ycp trunk/storage/storage/src/testsuite/lib/setup-system.ycp Added: trunk/storage/storage/src/testsuite/lib/helper1a.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/testsuite/lib/helper1a.ycp?rev=59998&view=auto ============================================================================== --- trunk/storage/storage/src/testsuite/lib/helper1a.ycp (added) +++ trunk/storage/storage/src/testsuite/lib/helper1a.ycp Tue Dec 8 12:35:20 2009 @@ -0,0 +1,33 @@ +{ + include "testsuite.ycp"; + + map READ = $[ + "probe" : $[ + "architecture" : "i385", + "cdrom" : [] + ], + "proc" : $[ + "swaps" : [] + ], + "sysconfig" : $[ + "storage" : $[ + "DEFAULT_FS" : "ext4" + ], + "bootloader" : $[ + "LOADER_TYPE" : "grub" + ], + "language" : $[ + "RC_LANG" : "en_US.UTF-8", + "RC_LC_MESSAGES" : "", + ], + ], + "target" : $[ + "size" : 0, + "bash_output" : $[], + "yast2" : $[], + "dir" : [], + ], + ]; + + TESTSUITE_INIT([READ, $[], READ], nil); +} Added: trunk/storage/storage/src/testsuite/lib/helper1b.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/testsuite/lib/helper1b.ycp?rev=59998&view=auto ============================================================================== --- trunk/storage/storage/src/testsuite/lib/helper1b.ycp (added) +++ trunk/storage/storage/src/testsuite/lib/helper1b.ycp Tue Dec 8 12:35:20 2009 @@ -0,0 +1,30 @@ +{ + include "testsuite.ycp"; + + import "Storage"; + import "StorageProposal"; + + StorageProposal::GetControlCfg(); + + map<string, map> target_map = Storage::GetTargetMap(); + map<string, any> prop = StorageProposal::get_inst_prop(target_map); + + if (prop["ok"]:false) + { + Storage::SetTargetMap(prop["target"]:$[]); + + list<map> infos = Storage::GetCommitInfos(); + + DUMP("Proposal:"); + foreach(map info, infos, { + string text = info[`text]:""; + if (info[`destructive]:false) + text = text + " [destructive]"; + DUMP(text); + }); + } + else + { + DUMP("No proposal."); + } +} Added: trunk/storage/storage/src/testsuite/lib/setup-system.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/testsuite/lib/setup-system.ycp?rev=59998&view=auto ============================================================================== --- trunk/storage/storage/src/testsuite/lib/setup-system.ycp (added) +++ trunk/storage/storage/src/testsuite/lib/setup-system.ycp Tue Dec 8 12:35:20 2009 @@ -0,0 +1,9 @@ +{ + void setup_system(string name) + { + SCR::Execute(.target.bash, "mkdir -p tmp"); + SCR::Execute(.target.bash, "rm -rf tmp/*"); + + SCR::Execute(.target.bash, sformat("cp data/%1/* tmp/", name)); + } +} -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
aschnell@svn.opensuse.org