Before this commit: We use travis-ci (ubuntu vm) to run
just the unit tests. We cannot run functional tests on
travis-ci due to lack of platform support.
After this commit: Run the full dockerized test harness on
http://wercker.com to run `hacking/runtests.sh`, which runs
all the unit and functional tests on el5, el6, and f20 to
assert supportability on all the pythons 2.4 through 3.x.
Sample test runs are at:
https://app.wercker.com/#buildstep/5346d0054daac943370042c7https://app.wercker.com/#buildstep/5346d9914daac94337005096
At the above link...
1. Click **run the docker test suite** in browser to show log
2. Scroll all the way through to see the verbose output and
summary at bottom.
Note: `hacking/runtests.sh` exits non-zero if any test fails
on any of the platforms.
Wercker docs are online at http://devcenter.wercker.com/#
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()
527e60ba added method `run_command_print' to provide
buffered output during long-running commands.
This causes TB in python3 due to IO encoding issues, so for now...
* use getoutput instead of run_command_print
* add TODO in run_command_print to make it compatible asap
On python3, we need to perform a union (not addition) on
dictionary sets to avoid...
Traceback (most recent call last):
File "/home/sandbox/test/functional/fetch_tests.py", line 95, in test_with_releaser
self.source_filename)
File "/home/sandbox/test/functional/fixture.py", line 103, in tito
return CLI().main(argstring.split(' '))
File "/home/sandbox/src/tito/cli.py", line 222, in main
return module.main(argv)
File "/home/sandbox/src/tito/cli.py", line 599, in main
**kwargs)
File "/home/sandbox/src/tito/release/main.py", line 359, in __init__
prefix="yumrepo-", **kwargs)
File "/home/sandbox/src/tito/release/main.py", line 238, in __init__
auto_accept, **kwargs)
File "/home/sandbox/src/tito/release/main.py", line 73, in __init__
_args = config_builder_args.items() + kwargs['builder_args'].items()
nose.proxy.TypeError: TypeError: unsupported operand type(s) for +: 'dict_items' and 'dict_items'
subprocess.getstatusoutput can fail with utf8 UnicodeDecodeError
http://bugs.python.org/issue9922
Resolves this TB on python3, which was
caused by outputting binary data to the 'tee' command...
Traceback (most recent call last):
File "/home/sandbox/test/functional/multiproject_tests.py", line 133, in test_build_tgz
artifacts = tito('build --tgz')
File "/home/sandbox/test/functional/fixture.py", line 103, in tito
return CLI().main(argstring.split(' '))
File "/home/sandbox/src/tito/cli.py", line 222, in main
return module.main(argv)
File "/home/sandbox/src/tito/cli.py", line 390, in main
return builder.run(self.options)
File "/home/sandbox/src/tito/builder/main.py", line 130, in run
self.tgz()
File "/home/sandbox/src/tito/builder/main.py", line 401, in tgz
self._setup_sources()
File "/home/sandbox/src/tito/builder/main.py", line 436, in _setup_sources
os.path.join(self.rpmbuild_sourcedir, self.tgz_filename))
File "/home/sandbox/src/tito/common.py", line 518, in create_tgz
run_command(archive_cmd)
File "/home/sandbox/src/tito/common.py", line 221, in run_command
(status, output) = getstatusoutput(command)
File "/home/sandbox/src/tito/compat.py", line 45, in getstatusoutput
raise(err)
File "/home/sandbox/src/tito/compat.py", line 41, in getstatusoutput
(status, output) = subprocess.getstatusoutput(cmd)
File "/usr/lib64/python3.3/subprocess.py", line 683, in getstatusoutput
text = pipe.read()
File "/usr/lib64/python3.3/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
nose.proxy.UnicodeDecodeError: UnicodeDecodeError: ascii
Use RawConfigParser instead of ConfigParser to avoid...
Traceback (most recent call last):
File "/home/sandbox/test/functional/multiproject_tests.py", line 68, in setUp
self.create_project(TEST_PKG_1, os.path.join(self.repo_dir, 'pkg1'))
File "/home/sandbox/test/functional/fixture.py", line 198, in create_project
tito('tag --keep-version --debug --accept-auto-changelog')
File "/home/sandbox/test/functional/fixture.py", line 103, in tito
return CLI().main(argstring.split(' '))
File "/home/sandbox/src/tito/cli.py", line 222, in main
return module.main(argv)
File "/home/sandbox/src/tito/cli.py", line 671, in main
offline=self.options.offline)
File "/home/sandbox/src/tito/tagger/main.py", line 51, in __init__
ConfigObject.__init__(self, config=config)
File "/home/sandbox/src/tito/config_object.py", line 38, in __init__
config.get(section, options))
File "/usr/lib64/python3.3/configparser.py", line 1184, in set
super().set(section, option, value)
File "/usr/lib64/python3.3/configparser.py", line 889, in set
value)
File "/usr/lib64/python3.3/configparser.py", line 399, in before_set
"position %d" % (value, tmp_value.find('%')))
nose.proxy.ValueError: ValueError: invalid interpolation syntax in '%s (%ae)' at position 0
> The StringIO and cStringIO modules are gone. Instead, import
> the io module and use io.StringIO or io.BytesIO for text and
> data respectively.
- http://docs.python.org/3.0/whatsnew/3.0.html
Avoid TB in python3 when performing buffered IO.
Buffered IO must use bytes, not string, to avoid...
Traceback (most recent call last):
File "/home/sandbox/test/functional/multiproject_tests.py", line 68, in setUp
self.create_project(TEST_PKG_1, os.path.join(self.repo_dir, 'pkg1'))
File "/home/sandbox/test/functional/fixture.py", line 198, in create_project
tito('tag --keep-version --debug --accept-auto-changelog')
File "/home/sandbox/test/functional/fixture.py", line 103, in tito
return CLI().main(argstring.split(' '))
File "/home/sandbox/src/tito/cli.py", line 222, in main
return module.main(argv)
File "/home/sandbox/src/tito/cli.py", line 674, in main
found_changelog = False
return tagger.run(self.options)
File "/home/sandbox/src/tito/tagger/main.py", line 103, in run
self._tag_release()
File "/home/sandbox/src/tito/tagger/main.py", line 123, in _tag_release
self._make_changelog()
File "/home/sandbox/src/tito/tagger/main.py", line 229, in _make_changelog
os.write(fd, "# Create your changelog entry below:\n")
nose.proxy.TypeError: TypeError: 'str' does not support the buffer interface
03255001d6 moved commands module to src/tito/compat.py to handle
differences between python2 and python3, but missed a bit that
did not show up in unit or functional tests.
Fix those occurences and add unit test to detect the regression.
This is an extension of NoTgzBuilder, which instead of storing blobs in source
control directly, allows the use of git-annex to reference blobs in an external
source (e.g. a web URL remote). When preparing sources, it uses git-annex's
unlock command to temporarily restore the original file.
Merge rel-eng/tito.props with package specific tito.props. Package specific
values will be used whenever the same property appears in both.
This patch deprecates the use of [globalconfig], instead favoring
[buildconfig]. Globalconfig will continue to work and just print a warning to
the user, support will be removed entirely later on.
before this commit: fetch_tests and release_yum_tests
allow *any* dist tag, but the tag must not be empty or
else the glob fails on double-dot in path name.
after this commit: allow the tag to be any *or* empty.
resolves from a73c90cb...
Using Python 2.4
Using nose 0.1
Running tito tests against: /home/sandbox/src
EEEE.Warning: spacewalk.releng.* namespace in tito.props is obsolete. Use tito.* instead.
Warning: spacewalk.releng.* namespace in tito.props is obsolete. Use tito.* instead.
..............................F...........
======================================================================
ERROR: Failure: SyntaxError (invalid syntax (fixture.py, line 159))
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/nose/loader.py", line 381, in loadTestsFromName
module = self.importer.importFromPath(
File "/usr/lib/python2.4/site-packages/nose/importer.py", line 39, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.4/site-packages/nose/importer.py", line 86, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/sandbox/test/functional/fetch_tests.py", line 27, in ?
from fixture import TitoGitTestFixture, tito
File "/home/sandbox/test/functional/fixture.py", line 159
with open(os.path.join(full_pkg_dir, 'tito.props'), 'w') \
^
SyntaxError: invalid syntax
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/