[SCM] ci-tooling packaging branch, master, updated. 2174a7f23dfdff015498ab10e9d1bb29059ba197

Harald Sitter apachelogger-guest at moszumanska.debian.org
Thu Oct 8 10:42:38 UTC 2015


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

The following commit has been merged in the master branch:
commit 051381dc04f8cd338bef16f89cb44a930e14aa3b
Author: Harald Sitter <sitter at kde.org>
Date:   Thu Oct 8 12:33:18 2015 +0200

    refactor builder to use a puts_log method for logging logs
    
    adjust test accordingly
---
 kci/builder.rb                                              | 12 ++++++++----
 test/data/test_kci_builder/test_puts_cmake/logs             |  1 -
 test/data/test_kci_builder/test_puts_log/cmake              |  1 +
 .../{test_puts_lintian/logs => test_puts_log/lintian}       |  0
 test/data/test_kci_builder/test_puts_log/list_missing       |  1 +
 test/test_kci_builder.rb                                    | 13 ++++---------
 6 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/kci/builder.rb b/kci/builder.rb
index c55267f..691f729 100755
--- a/kci/builder.rb
+++ b/kci/builder.rb
@@ -182,9 +182,7 @@ class KCIBuilder
     updated_symbols = update_symbols(log_data, logs, architectures_with_log,
                                      project, source)
 
-    puts_cmake(log_data, source.name)
-    puts_list_missing(log_data)
-    puts_lintian(log_data, updated_symbols: updated_symbols)
+    puts_log(log_data, updated_symbols: updated_symbols)
 
     # Lint control file
     results = []
@@ -304,7 +302,7 @@ class KCIBuilder
     false
   end
 
-  def self.puts_cmake(data, source_name)
+  def self.puts_cmake(data)
     # Bit of compat code. Very lovely... NOT
     parser = CMakeParser.new(data)
     unless parser.valid
@@ -438,6 +436,12 @@ class KCIBuilder
     end
     updated_symbols
   end
+
+  def self.puts_log(log_data, updated_symbols:)
+    puts_cmake(log_data)
+    puts_list_missing(log_data)
+    puts_lintian(log_data, updated_symbols: updated_symbols)
+  end
 end
 
 if __FILE__ == $PROGRAM_NAME
diff --git a/test/data/test_kci_builder/test_puts_cmake/logs b/test/data/test_kci_builder/test_puts_cmake/logs
deleted file mode 120000
index 651808b..0000000
--- a/test/data/test_kci_builder/test_puts_cmake/logs
+++ /dev/null
@@ -1 +0,0 @@
-../../test_cmake_parser
\ No newline at end of file
diff --git a/test/data/test_kci_builder/test_puts_log/cmake b/test/data/test_kci_builder/test_puts_log/cmake
new file mode 120000
index 0000000..966ca66
--- /dev/null
+++ b/test/data/test_kci_builder/test_puts_log/cmake
@@ -0,0 +1 @@
+../../test_lint_cmake
\ No newline at end of file
diff --git a/test/data/test_kci_builder/test_puts_lintian/logs b/test/data/test_kci_builder/test_puts_log/lintian
similarity index 100%
rename from test/data/test_kci_builder/test_puts_lintian/logs
rename to test/data/test_kci_builder/test_puts_log/lintian
diff --git a/test/data/test_kci_builder/test_puts_log/list_missing b/test/data/test_kci_builder/test_puts_log/list_missing
new file mode 120000
index 0000000..8ff0756
--- /dev/null
+++ b/test/data/test_kci_builder/test_puts_log/list_missing
@@ -0,0 +1 @@
+../../test_lint_list_missing
\ No newline at end of file
diff --git a/test/test_kci_builder.rb b/test/test_kci_builder.rb
index c34ee14..568fb8c 100644
--- a/test/test_kci_builder.rb
+++ b/test/test_kci_builder.rb
@@ -124,15 +124,10 @@ class KCIBuilderTest < TestCase
     end
   end
 
-  def test_puts_cmake
-    Dir.glob("#{data}/logs/*").each do |f|
-      KCIBuilder.puts_cmake(File.read(f), nil)
-    end
-  end
-
-  def test_puts_lintian
-    Dir.glob("#{data}/logs/*").each do |f|
-      KCIBuilder.puts_lintian(File.read(f))
+  def test_puts_log
+    Dir.glob("#{data}/*/*").each do |f|
+      next if File.directory?(f)
+      KCIBuilder.puts_log(File.read(f), updated_symbols: false)
     end
   end
 end

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list