~ubuntu-branches/ubuntu/saucy/devscripts/saucy

« back to all changes in this revision

Viewing changes to test/test_debchange

  • Committer: Package Import Robot
  • Author(s): Benjamin Drung, David Prévot, James McCoy, Benjamin Drung, Stefano Rivera, Salvatore Bonaccorso, Raphael Geissert, Kees Cook, Thijs Kinkhorst, Scott Moser, Yaroslav Halchenko, Ivan Borzenkov
  • Date: 2012-05-31 17:50:56 UTC
  • mfrom: (10.9.13 sid)
  • Revision ID: package-import@ubuntu.com-20120531175056-ybzrfssrbk61ba7y
Tags: 2.11.8
[ David Prévot ]
* French translation update.

[ James McCoy ]
* dd-list:
  + Recognize -h argument, as documented.
  + Don't error when given multiple binary packages from the same source.
    (Closes: #672309)
* Also note DEBCHANGE_MAINTTRAILER change in NEWS entry for 2.11.7.
  (Closes: #672973)
* dget:
  + Fix handling of sources.list entries with a port. (Closes: #672460) Still
    can't handle entries at the same domain but different ports until
    #154868 is fixed.
* debcheckout:
  + Document the DEBCHECKOUT_SOURCE configuration variable.
  + Determine the source package name when downloading the source tarball.
    This ensures the downloaded files aren't incorrectly removed after being
    downloaded.
  + Adapt find_repo() to determine the tarball name for native packages.

[ Benjamin Drung ]
* debchange:
  + Add --vendor= and DEBCHANGE_VENDOR to override the distributor ID
    returned by dpkg-vendor.
  + Always perform Vendor check.
  + Fall back to Debian vendor when a Debian-specific command-line option
    has been supplied (--nmu, --qa, --bin-nmu, --bpo).
  + Adjust --security template for Ubuntu.
  + Add -R/--rebuild flag for Ubuntu's no-change rebuilds.
  + Append ubuntu1 to version when incrementing on Ubuntu, unless a
    -U/--upstream option is given.
  + On Ubuntu, don't copy the previous distribution name for a new changelog
    entry. Use the Ubuntu devel release.
  + Don't use NMU versioning for NMUs / Security uploads on Ubuntu.
  + dch --increment changes XbuildY to Xubuntu1 on Ubuntu (LP: #690230).
  + Try to guess the vendor based on the given distribution name (LP: #723715)
  + Prefer UBUMAIL over DEBEMAIL on Ubuntu (LP: #929846).
* Add first tests for licensecheck.
* Add online test for uscan.

[ Stefano Rivera ]
* devscripts.Logger Don't substitute arguments into logged strings unless
  they were provided. (LP: #968129)
* debchange: Use distro-info to determine Ubuntu release names (LP: #997932).
* Incorporate Ubuntu's delta:
  Move debian-keyring, equivs, libcrypt-ssleay-perl, and libsoap-lite-perl
  to Suggests when building on Ubuntu.

[ Salvatore Bonaccorso ]
* bts: When searching for usertags use tag= in the url (followed by
  the options containing users=). (Closes: #675071).

[ Raphael Geissert ]
* dget: ignore duplicate repository URLs. (Closes: #675258)

[ Kees Cook ]
* licensecheck: Catch LGPL more robustly. (Closes: #623283)

[ Thijs Kinkhorst ]
* debdiff: Do not generate warnings when debdiff'ing dpkg source format
  3.0 (git). (Closes: #668372)
* debuild: Do not warn for missing upstream tarball if package is source
  format 3.0 (git). (Closes: #668372)

[ Scott Moser ]
* uscan: Support watch files that reference S3 bucket listings.
  (Closes: #630756, LP: #798293)

[ Yaroslav Halchenko ]
* licensecheck: Check licenses in .m (Octave/Matlab), .tex (LaTeX),
  and .pyx (Python's pyrex) files (Closes: #604529)

[ Ivan Borzenkov ]
* licensecheck: Add detection code for Beerware license. (Closes: #597463)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# Copyright (C) 2012, Benjamin Drung <bdrung@debian.org>
 
4
#
 
5
# Permission to use, copy, modify, and/or distribute this software for any
 
6
# purpose with or without fee is hereby granted, provided that the above
 
7
# copyright notice and this permission notice appear in all copies.
 
8
#
 
9
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 
10
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 
11
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 
12
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 
13
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 
14
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 
15
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
16
 
 
17
COMMAND="perl -I ${0%/*}/.. ${0%/*}/../scripts/debchange.pl"
 
18
 
 
19
. "${0%/*}/shunit2-helper-functions.sh"
 
20
 
 
21
success() {
 
22
    runCommand "-c ${SHUNIT_TMPDIR}/changelog $1" "" "" 0
 
23
}
 
24
 
 
25
checkVersion() {
 
26
    local start_param="$1"
 
27
    local param="$2"
 
28
    local start_version="$3"
 
29
    local expected_version="$4"
 
30
    rm -f ${SHUNIT_TMPDIR}/changelog
 
31
    success "--create $start_param --package test-package -v $start_version \"Devscripts Test Suite.\""
 
32
    success "$param \"Version test.\""
 
33
    local version=$(dpkg-parsechangelog -l${SHUNIT_TMPDIR}/changelog | sed -n 's/^Version: //p')
 
34
    assertEquals "\"dch $param\" from version $start_version" "$expected_version" "$version"
 
35
}
 
36
 
 
37
checkDebianVersion() {
 
38
    checkVersion "--vendor Debian -D unstable" "--vendor Debian $1" "$2" "$3"
 
39
}
 
40
 
 
41
checkUbuntuVersion() {
 
42
    checkVersion "--vendor Debian -D unstable" "--vendor Ubuntu $1" "$2" "$3"
 
43
}
 
44
 
 
45
testDebianIncrement() {
 
46
    checkDebianVersion "-i" "1.0-1" "1.0-2"
 
47
    checkDebianVersion "-i" "12" "13"
 
48
}
 
49
 
 
50
testUbuntuIncrement() {
 
51
    checkUbuntuVersion "-i" "12" "12ubuntu1"
 
52
    checkUbuntuVersion "-i" "3.4" "3.4ubuntu1"
 
53
    checkUbuntuVersion "-i" "3.4.5" "3.4.5ubuntu1"
 
54
    checkUbuntuVersion "-i" "5.6-7" "5.6-7ubuntu1"
 
55
    checkUbuntuVersion "-i" "5.6-7.1" "5.6-7.1ubuntu1"
 
56
    checkUbuntuVersion "-i" "5.6-7.1.8" "5.6-7.1.8ubuntu1"
 
57
    checkUbuntuVersion "-i" "2.13-14build5" "2.13-14ubuntu1"
 
58
    checkUbuntuVersion "-i" "0.45-2ubuntu3" "0.45-2ubuntu4"
 
59
    checkUbuntuVersion "-i" "0.45-2ubuntu3.1" "0.45-2ubuntu3.2"
 
60
    checkUbuntuVersion "-i" "0.45-2ubuntu3.1.0" "0.45-2ubuntu3.1.1"
 
61
}
 
62
 
 
63
testUbuntuRebuild() {
 
64
    checkUbuntuVersion "-R" "3.4" "3.4build1"
 
65
    checkUbuntuVersion "-R" "2.0-4" "2.0-4build1"
 
66
    checkUbuntuVersion "-R" "1.42-4ubuntu5" "1.42-4ubuntu6"
 
67
    checkUbuntuVersion "-R" "0.1-2build3" "0.1-2build4"
 
68
}
 
69
 
 
70
. shunit2