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.
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.
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.
Add URL of upstream tito repo to HACKING, then
symlink HACKING as README.md in each Dockerfile dir.
Why?
If a README.md exists in same dir as Dockerfile (incl. symlink),
and it's set up as a
[trusted build](https://index.docker.io/help/docs/#trustedbuilds),
then index.docker.io automatically shows the readme on the info
page of the trusted build.
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