Hello community, here is the log from the commit of package yast2-packager for openSUSE:Factory checked in at 2014-04-13 13:13:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-packager (Old) and /work/SRC/openSUSE:Factory/.yast2-packager.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-packager" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-packager/yast2-packager.changes 2014-03-21 12:14:34.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-packager.new/yast2-packager.changes 2014-04-13 13:13:44.000000000 +0200 @@ -1,0 +2,6 @@ +Fri Apr 11 16:07:19 CEST 2014 - [email protected] + +- Test for Packages rewritten in RSpec to fix the build +- 3.1.9 + +------------------------------------------------------------------- Old: ---- yast2-packager-3.1.8.tar.bz2 New: ---- yast2-packager-3.1.9.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-packager.spec ++++++ --- /var/tmp/diff_new_pack.PH9D3g/_old 2014-04-13 13:13:45.000000000 +0200 +++ /var/tmp/diff_new_pack.PH9D3g/_new 2014-04-13 13:13:45.000000000 +0200 @@ -17,13 +17,14 @@ Name: yast2-packager -Version: 3.1.8 +Version: 3.1.9 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: %{name}-%{version}.tar.bz2 Url: https://github.com/kobliha/yast-packager +BuildRequires: rubygem-rspec BuildRequires: update-desktop-files BuildRequires: yast2-country-data BuildRequires: yast2-devtools >= 3.1.10 ++++++ yast2-packager-3.1.8.tar.bz2 -> yast2-packager-3.1.9.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.8/package/yast2-packager.changes new/yast2-packager-3.1.9/package/yast2-packager.changes --- old/yast2-packager-3.1.8/package/yast2-packager.changes 2014-03-19 18:08:37.000000000 +0100 +++ new/yast2-packager-3.1.9/package/yast2-packager.changes 2014-04-11 16:29:40.000000000 +0200 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Fri Apr 11 16:07:19 CEST 2014 - [email protected] + +- Test for Packages rewritten in RSpec to fix the build +- 3.1.9 + +------------------------------------------------------------------- Wed Mar 19 16:26:51 UTC 2014 - [email protected] - copy libzypp credentials to the target system before starting diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.8/package/yast2-packager.spec new/yast2-packager-3.1.9/package/yast2-packager.spec --- old/yast2-packager-3.1.8/package/yast2-packager.spec 2014-03-19 18:08:37.000000000 +0100 +++ new/yast2-packager-3.1.9/package/yast2-packager.spec 2014-04-11 16:29:40.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 3.1.8 +Version: 3.1.9 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -28,6 +28,7 @@ License: GPL-2.0+ BuildRequires: yast2-country-data yast2-xml update-desktop-files yast2-testsuite BuildRequires: yast2-devtools >= 3.1.10 +BuildRequires: rubygem-rspec # HwDetection BuildRequires: yast2 >= 3.1.19 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.8/test/Makefile.am new/yast2-packager-3.1.9/test/Makefile.am --- old/yast2-packager-3.1.8/test/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-packager-3.1.9/test/Makefile.am 2014-04-11 16:29:40.000000000 +0200 @@ -0,0 +1,7 @@ +TESTS = \ + packages_test.rb + +TEST_EXTENSIONS = .rb +RB_LOG_COMPILER = rspec +VERBOSE = 1 +EXTRA_DIST = $(TESTS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.8/test/packages_test.rb new/yast2-packager-3.1.9/test/packages_test.rb --- old/yast2-packager-3.1.8/test/packages_test.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-packager-3.1.9/test/packages_test.rb 2014-04-11 16:29:40.000000000 +0200 @@ -0,0 +1,55 @@ +#! /usr/bin/env rspec + +ENV["Y2DIR"] = File.expand_path("../../src", __FILE__) + +require "yast" + +Yast.import "Packages" +Yast.import "SCR" +Yast.import "Product" + +describe Yast::Packages do + describe "#kernelCmdLinePackages" do + before(:each) do + # default value + Yast::SCR.stub(:Read).and_return(nil) + Yast::Product.stub(:Product).and_return(nil) + end + + it "returns biosdevname within the list of packages as required by Kernel params" do + Yast::SCR.stub(:Read).with( + Yast::Path.new(".target.string"), + "/proc/cmdline" + ).and_return("install=cd:// vga=0x314 biosdevname=1") + expect(Yast::Packages.kernelCmdLinePackages.include?("biosdevname")).to be_true + end + + it "does not return biosdevname within the list of packages as not required by Kernel params" do + Yast::SCR.stub(:Read).with( + Yast::Path.new(".target.string"), + "/proc/cmdline" + ).and_return("install=cd:// vga=0x314 biosdevname=0") + expect(Yast::Packages.kernelCmdLinePackages.include?("biosdevname")).to be_false + end + + it "returns biosdevname within the list of packages if biosdevname not specified as Kernel parameter and if running on a Dell system" do + Yast::SCR.stub(:Read).with( + Yast::Path.new(".target.string"), + "/proc/cmdline" + ).and_return("install=cd:// vga=0x314") + # 0 means `grep` succeeded + Yast::SCR.stub(:Execute).and_return(0) + expect(Yast::Packages.kernelCmdLinePackages.include?("biosdevname")).to be_true + end + + it "does not return biosdevname within the list of packages if biosdevname not specified as Kernel parameter and if not running on a Dell system" do + Yast::SCR.stub(:Read).with( + Yast::Path.new(".target.string"), + "/proc/cmdline" + ).and_return("install=cd:// vga=0x314") + # 1 means `grep` has not succeeded + Yast::SCR.stub(:Execute).and_return(1) + expect(Yast::Packages.kernelCmdLinePackages.include?("biosdevname")).to be_false + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.8/testsuite/tests/Packages.out new/yast2-packager-3.1.9/testsuite/tests/Packages.out --- old/yast2-packager-3.1.8/testsuite/tests/Packages.out 2014-03-19 18:08:37.000000000 +0100 +++ new/yast2-packager-3.1.9/testsuite/tests/Packages.out 1970-01-01 01:00:00.000000000 +0100 @@ -1,22 +0,0 @@ -Read .target.tmpdir "/tmp" -Read .target.stat "/y2update/control.xml" $["isreg":true] -Read .target.size "/y2update/control.xml" 1 -Read .xml "/y2update/control.xml" $[] -Read .sysconfig.console.CONSOLE_ENCODING "UTF-8" -Execute .target.bash_output "locale -k charmap" $["exit":0, "stdout":"charmap=\"UTF-8\"\n"] -Read .sysconfig.language.RC_LANG "en_US.UTF-8" -Read .target.size "/etc/sysconfig/language" 1 -Read .sysconfig.language.ROOT_USES_LANG "ctype" -Read .sysconfig.language.RC_LANG "en_US.UTF-8" -Read .sysconfig.language.INSTALLED_LANGUAGES "" -Dump ----- biosdevname tests ----- -Read .target.string "/proc/cmdline" "install=cd:// vga=0x314 biosdevname=1" -Return ["biosdevname"] -Read .target.string "/proc/cmdline" "install=cd:// vga=0x314 biosdevname=0" -Return [] -Read .target.string "/proc/cmdline" "install=cd:// vga=0x314" -Execute .target.bash "/usr/sbin/hwinfo --bios | grep -q '^[[:space:]]*Vendor:.*Dell Inc\\.'" 0 -Return ["biosdevname"] -Read .target.string "/proc/cmdline" "install=cd:// vga=0x314" -Execute .target.bash "/usr/sbin/hwinfo --bios | grep -q '^[[:space:]]*Vendor:.*Dell Inc\\.'" 1 -Return [] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.8/testsuite/tests/Packages.rb new/yast2-packager-3.1.9/testsuite/tests/Packages.rb --- old/yast2-packager-3.1.8/testsuite/tests/Packages.rb 2014-03-19 18:08:37.000000000 +0100 +++ new/yast2-packager-3.1.9/testsuite/tests/Packages.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,84 +0,0 @@ -# encoding: utf-8 - -# Testsuite for Packages.ycp module -# -module Yast - class PackagesClient < Client - def main - Yast.include self, "testsuite.rb" - - # huh, we need to mock too much paths because of some module constructor... :-( - @READ = { - "target" => { - "tmpdir" => "/tmp", - "size" => 1, - "stat" => { "isreg" => true } - }, - "xml" => {}, - "sysconfig" => { - "language" => { - "RC_LANG" => "en_US.UTF-8", - "ROOT_USES_LANG" => "ctype", - "RC_LANG" => "en_US.UTF-8", - "INSTALLED_LANGUAGES" => "" - }, - "console" => { "CONSOLE_ENCODING" => "UTF-8" } - } - } - - @EXEC = { - "target" => { - "bash_output" => { "exit" => 0, "stdout" => "charmap=\"UTF-8\"\n" } - } - } - - TESTSUITE_INIT([@READ, {}, @EXEC], nil) - - Yast.import "Packages" - - - - DUMP(" ----- biosdevname tests ----- ") - - # explicitly enable - Ops.set( - @READ, - ["target", "string"], - "install=cd:// vga=0x314 biosdevname=1" - ) - TEST(lambda { Packages.kernelCmdLinePackages }, [@READ, {}, @EXEC], nil) - - # explicitly disable - Ops.set( - @READ, - ["target", "string"], - "install=cd:// vga=0x314 biosdevname=0" - ) - TEST(lambda { Packages.kernelCmdLinePackages }, [@READ, {}, @EXEC], nil) - - - # autodetection, no biosdevname=0|1 boot option - Ops.set(@READ, ["target", "string"], "install=cd:// vga=0x314") - - # a Dell system - Ops.set( - @EXEC, - ["target", "bash"], - 0 - ) - TEST(lambda { Packages.kernelCmdLinePackages }, [@READ, {}, @EXEC], nil) - - # a non-Dell system - Ops.set( - @EXEC, - ["target", "bash"], - 1 - ) - TEST(lambda { Packages.kernelCmdLinePackages }, [@READ, {}, @EXEC], nil) - - nil - end - end -end - -Yast::PackagesClient.new.main -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
