Permalink
Please sign in to comment.
Browse files
Merge pull request #2 from blue-systems/master
Merge master upstream
- Loading branch information...
Showing
with
463 additions
and 1,843 deletions.
- +4 −1 ci-tooling/lib/lint/log/build_log_segmenter.rb
- +38 −14 ci-tooling/lib/lint/log/cmake.rb
- +4 −1 ci-tooling/lib/lint/log/lintian.rb
- +10 −4 ci-tooling/lib/lint/log/list_missing.rb
- +7 −0 ci-tooling/lib/lint/result.rb
- +17 −3 ci-tooling/lib/projects.rb
- +61 −0 ci-tooling/nci/lib/lint/result_test.rb
- +5 −73 ci-tooling/nci/lint_bin.rb
- +51 −0 ci-tooling/nci/lint_bin/test_log.rb
- +52 −0 ci-tooling/nci/lint_bin/test_packaging.rb
- +1 −1 ci-tooling/test/data/test_kci_builder/test_puts_log/results/lintian/test_invalid
- +1 −1 ci-tooling/test/data/test_kci_builder/test_puts_log/results/lintian/test_lint
- +1 −1 ci-tooling/test/data/test_kci_builder/test_puts_log/results/list_missing/test_invalid
- +1 −0 ci-tooling/test/data/test_nci_lint_bin/debian
- +117 −0 ci-tooling/test/data/test_nci_lint_bin/test_run/consoleText
- 0 ci-tooling/test/data/test_nci_lint_bin/test_run/reports/TEST-Lint-TestLog.xml
- 0 ci-tooling/test/data/test_nci_lint_bin/test_run/reports/TEST-Lint-TestPackaging.xml
- +1 −1 ci-tooling/test/test_kci_builder.rb
- +60 −0 ci-tooling/test/test_nci_lint_bin.rb
- +1 −1 ci-tooling/test/test_projects.rb
- +3 −0 jenkins-jobs/mci/templates/mgmt_tooling_progenitor.xml.erb
- +1 −1 jenkins-jobs/nci/templates/binarier.xml.erb
- +5 −1 lib/ci/containment.rb
- +4 −0 lib/docker/cleanup.rb
- +0 −9 nci/imager/build-hooks-plasma-wayland/90_sddm.binary
- +6 −0 nci/imager/build-hooks-plasma-wayland/90_sddm.chroot
- +0 −47 test/data/test_ci_containment/test_run.yml
- +0 −46 test/data/test_ci_containment/test_ulimit.yml
- +0 −30 test/data/test_deploy_upgrade_container/test_no_argv0.yml
- +0 −30 test/data/test_deploy_upgrade_container/test_no_argv1.yml
- +0 −1,564 test/data/test_deploy_upgrade_container/test_success.yml
- +0 −2 test/test_ci_container.rb
- +6 −5 test/test_ci_containment.rb
- +0 −2 test/test_ci_deployer.rb
- +6 −5 test/test_deploy_upgrade_container.rb
| @@ -0,0 +1,61 @@ | ||
| +# frozen_string_literal: true | ||
| +# | ||
| +# Copyright (C) 2016 Harald Sitter <sitter@kde.org> | ||
| +# | ||
| +# This library is free software; you can redistribute it and/or | ||
| +# modify it under the terms of the GNU Lesser General Public | ||
| +# License as published by the Free Software Foundation; either | ||
| +# version 2.1 of the License, or (at your option) version 3, or any | ||
| +# later version accepted by the membership of KDE e.V. (or its | ||
| +# successor approved by the membership of KDE e.V.), which shall | ||
| +# act as a proxy defined in Section 6 of version 3 of the license. | ||
| +# | ||
| +# This library is distributed in the hope that it will be useful, | ||
| +# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| +# Lesser General Public License for more details. | ||
| +# | ||
| +# You should have received a copy of the GNU Lesser General Public | ||
| +# License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
| + | ||
| +# FIXME: we manually load the reporter here because we install it from git | ||
| +# and would need bundler to load it properly, alas, bundler can't help | ||
| +# either because in containers we throw away gemfile and friends on | ||
| +# account of only using ci-tooling/ | ||
| +# Ideally we'd simply have the gem updated properly so we don't need | ||
| +# git anymore. | ||
| +begin | ||
| + require 'ci/reporter/rake/test_unit_loader' | ||
| +rescue LoadError | ||
| + REPORTER = 'ci_reporter_test_unit-5c6c30d120a3'.freeze | ||
| + require format("#{Gem.default_dir}/bundler/gems/#{REPORTER}/lib/%s", | ||
| + 'ci/reporter/rake/test_unit_loader') | ||
| +end | ||
| +require 'test/unit' | ||
| + | ||
| +module Lint | ||
| + # Convenience class to test lint results | ||
| + class ResultTest < Test::Unit::TestCase | ||
| + def join(array) | ||
| + # Add terminating nils to get an extra newlines | ||
| + (array + [nil, nil]).join("\n") | ||
| + end | ||
| + | ||
| + def result_notify(array) | ||
| + notify(join(array)) unless array.empty? | ||
| + end | ||
| + | ||
| + def result_flunk(array) | ||
| + flunk(join(array)) unless array.empty? | ||
| + end | ||
| + | ||
| + def assert_result(result) | ||
| + result_notify(result.warnings) | ||
| + result_notify(result.informations) | ||
| + # Flunking fails the test entirely, so this needs to be at the very end! | ||
| + result_flunk(result.errors) | ||
| + # FIXME: valid means nothing concrete so we skip it for now | ||
| + # assert(result.valid, "Lint result not valid ::\n #{result.inspect}") | ||
| + end | ||
| + end | ||
| +end |
Oops, something went wrong.
0 comments on commit
5d7fc54