Commit graph

28 commits

Author SHA1 Message Date
Pavel Raiskup
8ce108266b tests: enable tests at RPM build time
- Some tests can not work at rpmbuild time, because we can not run
  rpmbuild in rpmbuild, and there's no .git/ directory, skip.
- Use 'titodir' below 'srcdir', to not pollute the /tmp/tito dir.
- The test_colors() test requires color-friendly TERM env.
- EL7 is EOL, do not enable tests there.
2024-11-06 11:19:55 +01:00
Pavel Raiskup
10b315b1a5 tests: adapt test_undo_tag() to the master → main change 2024-11-06 11:19:55 +01: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
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
Lubomír Sedlář
a86501c1b5 Allow customizing git commit message 2016-05-27 09:46:19 +02:00
Eric D Helms
092dc1e6c5 Add ability to specify a custom changelog during tag 2016-04-07 14:04:44 -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
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
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
Miroslav Suchý
c9c44bfc75 NameError: global name 'getoutput' is not defined 2014-11-24 18:49:29 +01:00
Dominic Cleal
8a126b1f40 Allow overriding of builder on all releasers 2014-05-20 09:07:10 +01:00
Devan Goodwin
071278cfc9 Fix pep8 issues. 2014-05-09 11:06:53 -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
Paul Morgan
25c6f7f1e0 avoid ImportError in test suite on python 3
python3 does not allow relative imports.

test/unit/__init.py__ and test/functional/__init.py__ already exist,
which means we can use absolute import on all versions of python
without resorting to http://legacy.python.org/dev/peps/pep-0328/
2014-02-28 15:38:25 +00:00
Paul Morgan
97b29d6c35 add pep8 tests and fix blank line errors and warnings 2014-02-28 01:34:34 +00:00
Devan Goodwin
a52a2458c4 Merge branch 'master' into sourcefetch
Conflicts:
	test/functional/singleproject_tests.py

Technically not a merge, did a bunch of work only to discover I was mid-merge when I did it.
2014-01-13 14:40:28 -04:00
Devan Goodwin
8fe640e0ed Fix buildroot using ~/rpmbuild/BUILDROOT.
This may have been a recent change in rpmbuild that caused this as the
_buildroot macro appears to be somewhat new. However it seems using topdir
accomplishes the same thing more thoroughly.
2014-01-10 16:12:16 -04:00
Devan Goodwin
199f332d4d Start building with external sources and no tag.
Currently uses the files in the directory where tito was initially run, hoping to make this smarter and more useful soon.
2014-01-02 15:20:52 -04:00
Devan Goodwin
a3363cb93f Merge the FiledVersionTagger into the base VersionTagger.
This allows the behaviour to be used in just about any tagger sub-class.

Behaviour will be triggered on the presence of the 'version_template'
section in tito.props.

Renamed config:
  version -> version_template (section)
  file -> destination_file

Separated the replacement of version and release, as caller may just
want one or the other. (it works fine if only one of the variables is
present in your template file) Release is more of an rpm concept so may
not always be wanted in this context.

Removed the notion of default template files, if you want to use this
you need to specify the configuration for it.

Added a functional test to make sure I keep it working.
2013-11-12 13:28:32 -04:00
Devan Goodwin
8246ec2b79 Functional test fix. 2011-11-25 11:30:51 -04:00
Alex Wood
3a621a9cc2 Adding --use-version to allow Tito to force a version to use. 2011-10-21 16:23:01 -04:00
Devan Goodwin
7e8017571f Port multi-project git tests to use GitPython more. 2010-05-24 14:59:50 -03:00
Devan Goodwin
73413b30bd Better tag undo test. 2010-05-24 13:51:48 -03:00
Devan Goodwin
a29185f8c5 Port remaining single project tests to new format. 2010-05-24 11:35:07 -03:00
Devan Goodwin
bd84de04c7 Better test repo/project creation. 2010-05-24 11:26:22 -03:00
Devan Goodwin
e49b6f77cf Begin testing with GitPython. 2010-05-24 00:56:30 -03:00