Commit graph

153 commits

Author SHA1 Message Date
Alex Wood
fc12574880 BuildRoot is long deprecated and caused tests to fail. 2019-04-08 17:10:17 -04:00
Devan Goodwin
3e3a6f8aca Merge pull request #287 from pfournier/no-dist-release-line
Don't append 'None' to Release line with no '%{?dist}' part
2017-08-29 12:28:59 -03:00
Patrice Fournier
2a89594819 Don't append 'None' to Release line with no '%{?dist}' part 2017-08-29 09:28:09 -04:00
Evgeni Golov
e4746a6838 also verify that ReleaseTagger supports --use-release 2017-05-22 09:05:33 +02:00
Evgeni Golov
dfbf502749 add test for ReleaseTagger together with --use-version 2017-05-22 08:53:24 +02:00
Vadim Rutkovsky
aadafd4e87 Custom tag support in tito release
Signed-off-by: Vadim Rutkovsky <vrutkovs@redhat.com>
2017-05-05 12:35:23 +02:00
Vadim Rutkovsky
3a08af27ce VersionTagger should support custom tag format
It allows projects to format their own tags
2017-04-28 17:03:35 +02:00
Steve Kuznetsov
ed0d21708b
Use .assertTrue() instead of .assertIn()
CentOS 6 only has Python 2.6 available, on which the unit testing
frameworks do not expose a `.assertIn()` helper method. Instead, we can
use `.assertTrue(x in y)`.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-01-26 15:54:41 -05:00
Steve Kuznetsov
4f36972414
Clean up artifacts before test runs, not after
When tests fail, artifacts from that tests are necessary to properly
debug the failure and determine how to fix the test. This is impossible
when artifacts are immediately removed after the test is finished.
Instead, the tests should remove old artifacts before the test run
begins.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-01-09 10:00:31 -05:00
Steve Kuznetsov
a19a366213
Added --use-release flag for tito tag
When multiple tags exist for one version of a project, or when a version
is passed to `tito tag --use-version` that does not exactly correspond
with a tag in the repository's git history, the auto-generated release
is not guaranteed to monotonically increase. In order for users to
overcome this issue without building complicated logic into `tito`, it
is simpler to allow users to provide a literal release string to use.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-01-09 10:00:31 -05:00
Martin Sehnoutka
074b129ad7 Fix unit tests. 2016-12-15 15:05:25 +01:00
Martin Sehnoutka
f80debc740 Comments for test class. 2016-12-15 11:19:38 +01:00
Martin Sehnoutka
4d373ee201 Functional test case for CargoBump class. 2016-12-15 11:14:06 +01:00
Martin Sehnoutka
f7014b7527 Rename CargoTagger as CargoBump 2016-11-30 16:19:48 +01:00
Sehny
9bc7a0f76f fix few pep8 errors 2016-11-21 18:51:34 +01:00
Sehny
5da7997995 2 unit tests for cargo tagger. 2016-11-21 18:16:05 +01:00
Sehny
0efa60a77b Add unit test class 2016-11-21 13:31:31 +01:00
Lubomír Sedlář
a86501c1b5 Allow customizing git commit message 2016-05-27 09:46:19 +02:00
Dominic Cleal
de9ef27b3f
Only pass one project_name to copr build command 2016-05-11 18:44:17 +01:00
Devan Goodwin
5d258e7d2e Fix bugs with %autosetup and --test builds.
Extract method, add some tests, and fixed the regex problem.
2016-04-14 16:08:34 -03:00
Eric D Helms
092dc1e6c5 Add ability to specify a custom changelog during tag 2016-04-07 14:04:44 -04:00
Jakub Kadlčík
fa945d5875 Change asserted behavior after fe4c0bf 2015-09-10 13:28:21 +02:00
Alex Wood
3b99185216 Allow a user specific Copr remote SRPM URL.
By using a user specific URL, multiple members of the same team can
submit Copr releases without having to share credentials to the SRPM
remote location.  For example, each member of the team can set
COPR_REMOTE_LOCATION in .titorc to their <username>.fedorapeople.org
space.
2015-07-24 14:05:53 -04:00
Dominic Cleal
8d66889981 Fix rpmbuild_options array handling from builder args
3892359 changed builder args to always be arrays, so concatenation of
rpmbuild options with other strings then failed.

    File "/usr/lib/python2.7/site-packages/tito/release/main.py", line 530, in _koji_release
      builder.srpm(dist=disttag)
    File "/usr/lib/python2.7/site-packages/tito/builder/main.py", line 210, in srpm
      rpmbuild_options = self.rpmbuild_options + self._scl_to_rpmbuild_option()
    TypeError: can only concatenate list (not "str") to list

Change builder args to be joined by a single space, allowing multiple
arguments to be passed in.
2015-06-24 14:19:42 +01:00
Alex Wood
593f702372 Provide ability to turn off colored output. Fixes #182. 2015-06-15 11:02:18 -04:00
Alex Wood
356184c428 Correct style errors and use all caps for user_config option. 2015-06-12 13:36:25 -04:00
Alex Wood
d73ab2d661 Replace old Perl script for munging RPM release number. 2015-06-10 18:31:36 -04:00
Alex Wood
9b1d1c6988 Silence spurious test output. 2015-06-04 17:50:33 -04:00
Alex Wood
a5b43b6b96 Fix Python 3 issues with binary versus string types.
Python 3 is very picky about not mixing binary and string data.  This
patch gets TarFixer running on both Python 2.6+ and Python 3.x.
2015-05-18 14:01:43 -04:00
Alex Wood
07d62cf24e Tell the developer which PEP8 failures were detected. 2015-05-18 14:01:43 -04:00
Alex Wood
a8514c4dda Correct Python version incompatibilities. 2015-05-18 14:01:43 -04:00
Alex Wood
3892359fa4 Allow builder arguments to be given multiple times. 2015-05-18 14:01:43 -04:00
Alex Wood
6fedf5850e Fix failing unit tests.
These tests began failing after a correction to another test.  The
other test had been patching the error_out function without unpatching
it and thus polluted the test environment.

Also reset to a known directory at the beginning of the common tests so
that we don't start in a directory that has since been unlinked.
2015-05-18 14:01:43 -04:00
Alex Wood
4882412610 Alter tar module to correct headers on a Maven-generated tar.
The Maven-generated tar file deviates from the spec in several places.
Fields are padded out with spaces instead of NUL bytes and the user and
group ID are left empty.

This patch alters the tar module to correct these issues and ensures a
consistent unchanging fingerprint for the archive by setting the mtime
on the files to the modified time of the commit.
2015-05-18 14:01:43 -04:00
Alex Wood
b00cb06937 Place the pickle file used for Cheetah in the build directory. 2015-05-18 14:01:36 -04:00
Alex Wood
b0e85268c9 Add flake8 configuration. Fix style issues.
- Remove assignments to unused variables
- Rename variables shadowing builtins
- Fix all flake8 errors in tests
2015-05-18 14:00:19 -04:00
Alex Wood
ea0ea51552 Unit test new common functions and fix revealed bugs. 2015-05-18 14:00:19 -04:00
Alex Wood
53fadc2ae2 Rename tests so they have valid Python module names.
Hyphens are not allowed in module names.
2015-05-18 14:00:19 -04:00
Alex Wood
0c4238f8a4 Remove compatibility test for Python 2.4.
The Python 2.4 style of getting an exception object is forbidden by the
test_exceptions_3 test.  Something has to give, and Tito is not being
built for RHEL 5 anymore.
2015-05-15 13:07:35 -04:00
Alex Wood
fb0d60cd6b Add more robust reading in TarFixer.
Python's read(N) function only guarantees that it will read no more
than N bytes but not that it will return N bytes.  This patch adds a
function that will ensure exactly N bytes are read.
2015-05-15 13:07:34 -04:00
Alex Wood
09d89eb4ef Fix tarball timestamps from git archive with Python.
Tito passes "git archive" a tree ID.  The "git archive" man page states:

    git archive behaves differently when given a tree ID versus when
    given a commit ID or tag ID. In the first case the current time
    is used as the modification time of each file in the archive.

Using the current time means that every time we build the source
tarball, the file fingerprint will change since the metadata in the
tarball changes.  We don't want that since build systems track the
fingerprint to see if the actual source has changed.

This process was previously handled in an enigmatic Perl script that
lacked any comments whatsoever.  Converting it to well-commented Python
makes the process less mysterious and speedier since Tito doesn't need
to shell out to Perl.
2015-05-15 13:07:34 -04:00
Devan Goodwin
35baac73e0 Merge pull request #173 from xsuchy/pr161
substitute /releng for /.tito #161
2015-05-14 15:59:36 -03:00
Devan Goodwin
6b4f6ad1f8 Merge branch 'builder-rpmbuild-options' of https://github.com/domcleal/tito into domcleal-builder-rpmbuild-options 2015-05-12 15:35:39 -03:00
Devan Goodwin
e8e7f63662 Restore F20 Python 3 docker tests. 2015-05-08 13:05:38 -03:00
Miroslav Suchý
843dd2cc51 substitute /releng for /.tito #161
if /releng is present it will be used. Otherwise /.tito will be used.
2015-04-26 14:56:26 +02:00
Dominic Cleal
d3faffa94b Allow override of rpmbuild_options from builder arguments
Instead of being a command line-only option, the string of extra rpmbuild
arguments can now be passed in via the general builder args mechanism, so it
can even be configured from releasers.conf.

Fixes #155
2015-04-23 10:54:24 +01:00
Devan Goodwin
52fee81d8c Require new srpm_disttag for rsync/yum releasers.
Fixes issue where just build srpm would be deleted as too old if
building for a newer looking disttag in mock. (i.e. f20 building for
f21)

Also generates more correct looking SRPMs in all cases.
2014-12-23 11:33:36 -04:00
Devan Goodwin
40242ea438 Merge branch 'wildcards' of https://github.com/xsuchy/tito into xsuchy-wildcards
Conflicts:
	test/functional/singleproject_tests.py
2014-12-10 13:12:52 -04:00
Devan Goodwin
6659c148cd Merge pull request #132 from domcleal/releaser-override-builder
Allow overriding of builder on all releasers
2014-12-10 12:54:32 -04:00
Miroslav Suchý
339000888b NameError: global name 'RawConfigParser' is not defined 2014-11-24 18:51:00 +01:00