Commit graph

95 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
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
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
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
9b1d1c6988 Silence spurious test output. 2015-06-04 17:50:33 -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
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
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
cdf54b6ec5 Merge branch 'bzflagcheck'
Conflicts:
	hacking/titotest-centos-5.9/Dockerfile
2014-06-23 14:50:27 -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
Dominic Cleal
993ca4cedc Fix bugs in git-annex cleanup method 2014-05-16 13:16:37 +01: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
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
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
Paul Morgan
ff5fd1faf7 skip git-annex tests if distro or git-annex is too old 2014-03-12 19:17:38 +00:00
Devan Goodwin
ce7393ecaa Add test for GitAnnexBuilder. 2014-03-11 11:27:19 -03:00
Devan Goodwin
a80fc5b6b0 Use test util to write files. 2014-03-11 09:25:45 -03:00
Devan Goodwin
9091afd684 Functional test for the CoprReleaser. 2014-03-11 09:17:52 -03:00
Paul Morgan
3ae1596923 deprecate GitPython
GitPython is not compatible with python3 and may never be:
https://fedoraproject.org/wiki/User:Churchyard/python3
2014-03-09 13:56:17 +00:00