aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2022 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix 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 General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (test-upstream)
  #:use-module (gnu packages base)
  #:use-module (guix download)
  #:use-module (guix packages)
  #:use-module (guix build-system gnu)
  #:use-module (guix import print)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix upstream)
  #:use-module (guix tests)
  #:use-module (srfi srfi-64)
  #:use-module (ice-9 match))


(test-begin "upstream")

(test-equal "coalesce-sources same version"
  '((source "foo" "1"
            ("ftp://example.org/foo-1.tar.xz"
             "ftp://example.org/foo-1.tar.gz")
            ("ftp://example.org/foo-1.tar.xz.sig"
             "ftp://example.org/foo-1.tar.gz.sig")))

  (map (lambda (source)
         `(source ,(upstream-source-package source)
                  ,(upstream-source-version source)
                  ,(upstream-source-urls source)
                  ,(upstream-source-signature-urls source)))
       (coalesce-sources (list (upstream-source
                                (package "foo") (version "1")
                                (urls '("ftp://example.org/foo-1.tar.gz"))
                                (signature-urls
                                 '("ftp://example.org/foo-1.tar.gz.sig")))
                               (upstream-source
                                (package "foo") (version "1")
                                (urls '("ftp://example.org/foo-1.tar.xz"))
                                (signature-urls
                                 '("ftp://example.org/foo-1.tar.xz.sig")))))))

(test-end)
/td>Ludovic Courtès 2018-09-14gnu: Rename "banana-pi" to "bananapi"....Danny Milosavljevic 2018-05-29system: Add u-boot-puma-rk3399....Vagrant Cascadian 2018-05-18system: Add u-boot-pine64-plus installer....Vagrant Cascadian 2018-05-11system: Add u-boot-novena installer....Vagrant Cascadian 2018-05-11system: Add wandboard installer....Vagrant Cascadian 2018-05-11system: Add mx6cuboxi installer....Vagrant Cascadian 2018-01-22system: Add A20 OLinuXino LIME installer....Danny Milosavljevic 2018-01-20system: Add Nintendo NES Classic Edition installer....Danny Milosavljevic 2018-01-20system: Add A20 OLinuXino MICRO installer....Danny Milosavljevic 2018-01-20system: Add A20 OLinuXino LIME2 installer....Danny Milosavljevic 2018-01-20system: Add Banana Pi M2 Ultra installer....Danny Milosavljevic 2017-12-15system: Add BeagleBone Black installer....Mathieu Othacehe 2017-07-15bootloader: Add u-boot....Danny Milosavljevic