summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2015-03-27Use six.StringIOGuido Günther
to work towards Python3 support Gbp-Dch: Ignore
2015-03-27testutils: Add a context manager to capture stderrGuido Günther
and use it to test the help output
2015-03-27testutils: Fix __all__Guido Günther
The values weren't correctly seperated
2015-03-27Don't let pristine-tar spew on stderrGuido Günther
Capture its output and only dump it on failure. This makes "gbp import-orig" and test runs less verbose.
2015-03-27command_wrapper: Make error reporting more flexibleGuido Günther
We allow to substitute stderr, stdout and error_reason in run_error now. These changes the API for derived classses slightly so fix them up as well.
2015-03-27config test: fix missing prefixGuido Günther
We want to test no prefix, 'gbp-' and 'git-'.
2015-03-27gbplogtester: Reliably remove all handlersGuido Günther
So far we were modifying the list of handlers in place which resulted in all handlers being removed at the second call to _capture_log only.
2015-03-27gbplogtester: Make sure log capture start is followed by a log capture stopGuido Günther
2015-03-27gbplogtester: add helper to test for empty logGuido Günther
2015-03-27tests: minor test case cleanupsGuido Günther
Remove unused imports, remove unused variables or actually use them
2015-02-25GitRepository/has_submodules: add treeish argumentMarkus Lehtonen
For defining a Git treeish which to look into, instead of the current working copy. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-02-25tests: one more testcase for GitRepository.diff()Markus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-02-21Remove unused importGuido Günther
and pylint exception that doesn't trigger
2015-02-21Ignore first part of type outputGuido Günther
Types are classes in python3 so we get 'class' instead of 'type'. Ignore that detail in the matcher since it's not relevanthere.
2015-02-20rpm tests: use eq_ and ok_ from nose toolsMarkus Lehtonen
Provides better error messages as is more consistent as eq_ was already used in some test cases. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-02-20tests: add tests for UpstreamSource.guess_version()Markus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-02-20Don't output additional newlinesGuido Günther
introduced by 0a4725c045a5a55592dafd41c6ef6f9bab4791cd
2015-02-20Only use absolute importGuido Günther
since searching both isn't supported in Python3. Since the tests are run from the toplevel dir we'll pick up the right scripts.
2015-02-20Use verbose outputGuido Günther
so we see all git commands
2015-02-20Use six.iteritems() and six.iterkeys()Guido Günther
to work towards Python3 support Gbp-Dch: Ignore
2015-02-20Use relative importGuido Günther
so Python3 can cope as well
2015-02-20Convert result to listGuido Günther
Python3 returns a dict_items obj
2015-02-20Use open() instead of file()Guido Günther
The former is supported with python3
2015-02-20Use relative import for testutilsGuido Günther
2015-02-20Don't rely on dictionary key orderGuido Günther
to work towards Python3 support Gbp-Dch: Ignore
2015-02-20Use six.StringIOGuido Günther
to work towards Python3 support Gbp-Dch: Ignore
2015-02-20Don't use print as a statementGuido Günther
via 2to3-3.4 -w -f print . to work towards python3 support Gbp-Dch: Ignore
2015-02-20Convert zip and map to listGuido Günther
to work towards Python3 support Gbp-Dch: Ignore
2015-02-20Ignore return types of write and shutil.copyGuido Günther
Python3 does not return None anymore
2015-02-20Remove unused importGuido Günther
Gbp-Dch: Ignore
2015-02-18ComponentTestBase: ignore system and user configMarkus Lehtonen
User might have a system and/or user specific gbp config files. Disable these config files so that they don't affect the component tests. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-02-08parse_gbp_commands: support command filteringGuido Günther
When we write out patches to subdirs using a topic we want to filter out this topic from the commit message. Support for this was lost in 7ce15d2434ee42aa5a1afce3d03069c5efb2db1b add it back. Also fix parsing of the deprecated commands.
2015-02-08pq: Generate new style Gbp-Pq: Topic <topic> entriesGuido Günther
We shouldn't generate the deprecated ones
2015-01-25config: Deprecate legacy config sectionsGuido Günther
We deprecate sections starting with git- and gbp- to reduce the confusion about what gets parsed first.
2015-01-25testutils: split out DebianGitTestRepoGuido Günther
Gbp-Dch: Ignore
2015-01-25testutils: Move log test helpers to separate classGuido Günther
so we can use them in the unit tests as well
2015-01-25Move testutils to separate moduleGuido Günther
2014-12-29Introduce gbp-pq-rpmMarkus Lehtonen
Initial version of gbp-pq-rpm - a tool for managing patch queues for rpm packages. The functionality more or less corresponds to that of the (Debian) gbp-pq. The only major difference probably being (in addition to the obvious of working with .spec files instead of debian/) is that patches are always imported on top of the upstream version, not on top of the packaging branch (which might not even contain any source code). Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Olev Kartau <olev.kartau@intel.com>
2014-12-28config: read the right config if run from subdirMarkus Lehtonen
A step towards being able to run GBP tools from subdirectories. Now expands '%(top_dir)s' and '%(git_dir)s' in config file path to root of the working directory and git metadata directory, respectively. Also, adds a new method _read_config_file() in preparation for supporting per-tree config files. Fixes tests.test_Config: currently the only correct way to define the config file(s) to be parsed is by using the GBP_CONF_FILES environment variable. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-12-28buildpackage/dump_tree: add 'recursive' optionMarkus Lehtonen
For selecting whether to dump all the files recursively or just the top level directory of the tree. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-12-05GitRepository: Implement status methodEd Bartosh
Simple wrapper to the git-status command. Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-12-05ComponentTestBase: add dirs argument to _check_repo_state()Markus Lehtonen
Make difference between regular files and directories, eliminating the requirement of listing directories in the file list. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-12-05ComponentTestBase: add check_files() methodMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-12-05ComponentTestBase: add a per-class toplevel temp dirMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-12-05GitRepository: add diff_status methodMarkus Lehtonen
This is a method of getting the filename and status information of a diff. That is, a list of files that changed and their status, "added", "modified" etc. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-12-05pq: move switch_pq() to commonMarkus Lehtonen
So that it can be re-used by the upcoming pq-rpm tool. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-10-29git.vfs: fix close methodGuido Günther
Preventing a infinite recursion which can be triggered by gbp pq export --commit.
2014-09-12Allow to always drop pq branch after exportGuido Günther
Closes: #761160
2014-07-28Remove all other log handlers when capturing logsGuido Günther
This avoids spurious error messages during test runs.
2014-07-24Pass --no-pristine-tar to SRPM compnent testsGuido Günther
to avoid pristine-tar showing up in the matched branches