From b5edc4a0bcc3879039381993d3183724b01ea068 Mon Sep 17 00:00:00 2001 From: Tom Werner Date: Thu, 6 Sep 2007 13:59:54 -0700 Subject: [PATCH] warn about running tests on linux without root (netlink) --- test/helper.rb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test/helper.rb b/test/helper.rb index 0b6f7f2..af7101e 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -3,6 +3,18 @@ require File.join(File.dirname(__FILE__), *%w[.. lib god]) require 'test/unit' require 'set' +include God + +if RUBY_PLATFORM =~ /linux/i && Process.uid != 0 + abort <<-EOF +********************************************************************* +* * +* You need to run these tests as root (netlink requires it) * +* * +********************************************************************* +EOF +end + begin require 'mocha' rescue LoadError @@ -15,8 +27,6 @@ rescue LoadError end end -include God - module God module Conditions class FakeCondition < Condition -- 2.11.4.GIT