Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-ruby/uuidtools/files: uuidtools-2.1.2-macaddress.patch
Date: Tue, 10 Jul 2012 08:32:04
Message-Id: 20120710083151.AC1D020065@flycatcher.gentoo.org
1 flameeyes 12/07/10 08:31:51
2
3 Added: uuidtools-2.1.2-macaddress.patch
4 Log:
5 Add patch to fix tests when network information is restricted (bug #425430).
6
7 (Portage version: 2.2.0_alpha116/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 dev-ruby/uuidtools/files/uuidtools-2.1.2-macaddress.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/uuidtools/files/uuidtools-2.1.2-macaddress.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/uuidtools/files/uuidtools-2.1.2-macaddress.patch?rev=1.1&content-type=text/plain
14
15 Index: uuidtools-2.1.2-macaddress.patch
16 ===================================================================
17 From d29566188211e5511efece9319c524f7a278655c Mon Sep 17 00:00:00 2001
18 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@×××××××××.eu>
19 Date: Tue, 10 Jul 2012 01:18:34 -0700
20 Subject: [PATCH] specs: do not fail tests if MAC address can't be fetched.
21 MIME-Version: 1.0
22 Content-Type: text/plain; charset=UTF-8
23 Content-Transfer-Encoding: 8bit
24
25 It's very well possible that depending on the capabilities of the
26 process (and user) running the specs, the MAC address is not
27 available. In this case, do not fail tests, simply skip over those if
28 the mac address is unset.
29
30 Solves issue #12.
31
32 Signed-off-by: Diego Elio Pettenò <flameeyes@×××××××××.eu>
33 ---
34 spec/uuidtools/mac_address_spec.rb | 6 +-----
35 spec/uuidtools/uuid_creation_spec.rb | 2 +-
36 spec/uuidtools/uuid_parsing_spec.rb | 2 +-
37 3 files changed, 3 insertions(+), 7 deletions(-)
38
39 diff --git a/spec/uuidtools/mac_address_spec.rb b/spec/uuidtools/mac_address_spec.rb
40 index 987ae36..f0ee146 100644
41 --- a/spec/uuidtools/mac_address_spec.rb
42 +++ b/spec/uuidtools/mac_address_spec.rb
43 @@ -1,14 +1,10 @@
44 require File.expand_path("../../spec_helper.rb", __FILE__)
45
46 -describe UUIDTools::UUID, "when obtaining a MAC address" do
47 +describe UUIDTools::UUID, "when obtaining a MAC address", :unless => UUIDTools::UUID.mac_address.nil? do
48 before do
49 @mac_address = UUIDTools::UUID.mac_address
50 end
51
52 - it "should obtain a MAC address" do
53 - @mac_address.should_not be_nil
54 - end
55 -
56 it "should cache the MAC address" do
57 @mac_address.object_id.should == UUIDTools::UUID.mac_address.object_id
58 end
59 diff --git a/spec/uuidtools/uuid_creation_spec.rb b/spec/uuidtools/uuid_creation_spec.rb
60 index 6f6b497..45b78a2 100644
61 --- a/spec/uuidtools/uuid_creation_spec.rb
62 +++ b/spec/uuidtools/uuid_creation_spec.rb
63 @@ -13,7 +13,7 @@ describe UUIDTools::UUID, "when generating" do
64 ).to_s.should == "15074785-9071-3fe3-89bd-876e4b9e919b"
65 end
66
67 - it "should correctly generate timestamp variant UUIDs" do
68 + it "should correctly generate timestamp variant UUIDs", :unless => UUIDTools::UUID.mac_address.nil? do
69 UUIDTools::UUID.timestamp_create.should_not be_random_node_id
70 UUIDTools::UUID.timestamp_create.to_s.should_not ==
71 UUIDTools::UUID.timestamp_create.to_s
72 diff --git a/spec/uuidtools/uuid_parsing_spec.rb b/spec/uuidtools/uuid_parsing_spec.rb
73 index 56cfeee..fcfafeb 100644
74 --- a/spec/uuidtools/uuid_parsing_spec.rb
75 +++ b/spec/uuidtools/uuid_parsing_spec.rb
76 @@ -23,7 +23,7 @@ describe UUIDTools::UUID, "when parsing" do
77 UUIDTools::UUID.timestamp_create.should_not be_nil_uuid
78 end
79
80 - it "should not treat a timestamp version UUID as a random node UUID" do
81 + it "should not treat a timestamp version UUID as a random node UUID", :unless => UUIDTools::UUID.mac_address.nil? do
82 UUIDTools::UUID.timestamp_create.should_not be_random_node_id
83 end
84
85 --
86 1.7.8.6