Commit graph

129 commits

Author SHA1 Message Date
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
Miroslav Suchý
c9c44bfc75 NameError: global name 'getoutput' is not defined 2014-11-24 18:49:29 +01:00
Devan Goodwin
c4f1755813 Fix failing tests with no ~/.bugzillarc. 2014-06-23 15:01:57 -03:00
Devan Goodwin
cdf54b6ec5 Merge branch 'bzflagcheck'
Conflicts:
	hacking/titotest-centos-5.9/Dockerfile
2014-06-23 14:50:27 -03:00
Devan Goodwin
d978873738 Fixes for Python 3. 2014-06-23 09:45:41 -03:00
Devan Goodwin
bf19a130a7 Add support for checking bz flags. 2014-06-20 14:53:22 -03:00
Devan Goodwin
76cea1ebf0 Refactor dist-git releasers to separate module. 2014-06-19 15:36:23 -03:00
Paul Morgan
cd0cc194be add build dependency for el5 and new functional tests
* asciidoc indirectly requires docbook-style-xsl on el6 and f20,
  but not on el5. Resolve failure to build tito with tito on el5:
  "I/O error : Attempt to load network entity"

* Resolve "egg missing file" on el5 due to busted symlinks
  from 20c4f1b7c0.

* Add functional test to build tito with itself in order to
  catch problems like the ones above.

Closes https://github.com/dgoodwin/tito/issues/133
2014-05-26 18:37:00 +00:00
Dominic Cleal
8a126b1f40 Allow overriding of builder on all releasers 2014-05-20 09:07:10 +01:00
Devan Goodwin
8be80a288e Merge pull request #130 from domcleal/git-annex-cleanup
Fix bugs in git-annex cleanup method
2014-05-16 10:52:17 -03:00
Devan Goodwin
48e4fcedca Fix a test issue. 2014-05-16 10:52:01 -03:00
Dominic Cleal
993ca4cedc Fix bugs in git-annex cleanup method 2014-05-16 13:16:37 +01:00
Dominic Cleal
596cb07e68 Remove excess whitespace on EL6 and duplicate SRPM output 2014-05-16 11:08:49 +01:00
Dominic Cleal
5eadb047aa Move compare_version test into correct class 2014-05-12 13:07:09 +00:00
Devan Goodwin
b4c103ea4f Merge pull request #125 from domcleal/git-annex-el6
Support pre-5.20131213 versions of git-annex for EL6
2014-05-12 08:50:42 -03:00
Devan Goodwin
2a54ad3ce4 Raise error on failed run_command.
Lost this somehow in refactoring, but right now failed commands are silent.
Raise an exception and print the error details.

Restore behaviour where we can print command output on success if desired.

Fix a couple tests that were actually failing due to missing rsync dest.
2014-05-09 11:54:30 -03:00
Devan Goodwin
e3c4b269e8 Merge branch 'test-without-tag' of https://github.com/domcleal/tito into domcleal-test-without-tag
Conflicts:
	test/functional/builder_tests.py
2014-05-09 11:39:50 -03:00
Devan Goodwin
59b6b9c855 Merge pull request #122 from domcleal/scl-builder-arg
Add 'scl' builder option for software collection name
2014-05-09 11:11:37 -03:00
Devan Goodwin
071278cfc9 Fix pep8 issues. 2014-05-09 11:06:53 -03:00
Dominic Cleal
bb60a6dede Support pre-5.20131213 versions of git-annex for EL6
Older versions of git-annex don't support `git annex lock --force`, so peform
a version check and call without --force on these.

The EL6 Docker image is changed to one that contains locales, in order for
git-annex to run successfully.
2014-05-09 13:57:53 +01:00
Dominic Cleal
7a032a2d69 Add version comparison utility
Source: http://stackoverflow.com/a/1714190/146925
Credit: gnud <http://stackoverflow.com/users/27204/gnud>
2014-05-09 13:57:53 +01:00
Dominic Cleal
e3b24b15ed Allow builder to run in test mode on untagged project
Particularly useful when creating new projects and wanting to avoid
creating an initial tag, this allows `tito build --test --srpm` etc
to run without any tag.
2014-05-05 09:02:53 +01:00
Dominic Cleal
9ca849b7d9 Add 'scl' builder option for software collection name
With a general 'scl' builder option, a software collection name can be
specified irrespective of the releaser used.  RsyncReleaser's own 'scl'
option has been deprecated in favour of using 'builder.scl' in
releasers.conf.
2014-05-04 21:33:54 +01:00
alfen
66baaa4bd2 added rpmbuild output to an error raised by tito to easier the error's cause analysis 2014-04-20 18:55:26 +02:00
Paul Morgan
bc0abf1beb avoid TB in gitannex builder test on python3
Avoids...

Traceback (most recent call last):
  File "/home/sandbox/test/functional/build_gitannex_tests.py", line 87, in test_simple_build
    self.assertEquals(1, len(builder.sources))
nose.proxy.TypeError: TypeError: object of type 'map' has no len()
2014-03-12 19:37:39 +00:00