[SCM] ci-tooling packaging branch, master, updated. 3f1756534e7921276fdaa3c4bf98b66c786c4d56

Harald Sitter apachelogger-guest at moszumanska.debian.org
Tue Nov 10 11:41:06 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=3f17565

The following commit has been merged in the master branch:
commit 3f1756534e7921276fdaa3c4bf98b66c786c4d56
Author: Harald Sitter <sitter at kde.org>
Date:   Tue Nov 10 12:40:57 2015 +0100

    fail more clearly on missing config files for xci
---
 lib/xci.rb       |  1 +
 test/test_xci.rb | 15 +++++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/lib/xci.rb b/lib/xci.rb
index 9be820e..9568e66 100644
--- a/lib/xci.rb
+++ b/lib/xci.rb
@@ -70,6 +70,7 @@ module XCI
   def data
     return @data if defined?(@data)
     file = File.join(File.dirname(__dir__), 'data', data_file_name)
+    fail "Data file not found (#{file})" unless File.exist?(file)
     @data = YAML.load(File.read(file))
   end
 end
diff --git a/test/test_xci.rb b/test/test_xci.rb
new file mode 100644
index 0000000..d1712ef
--- /dev/null
+++ b/test/test_xci.rb
@@ -0,0 +1,15 @@
+require_relative 'lib/testcase'
+require_relative '../lib/xci'
+
+module BogusNameWithoutFile
+  extend XCI
+end
+
+# Test xci
+class XCITest < TestCase
+  def test_fail_on_missing_config
+    assert_raise RuntimeError do
+      BogusNameWithoutFile.series
+    end
+  end
+end

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list