summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2014-12-24Add buildpackage-rpmTzafrir Cohen
2014-12-24gbp-pq: readiness to configure the pq branch nameMarkus Lehtonen
All other gbp branches have configurable names. This commit adds the readiness for user to configure/change the name of the patch-queue branches, as well. Patch-queue is defined in options as a format string, where '%(branch)s' refers to the debian/packaging branch. If the pq-branch format string does not contain '%(branch)s', there is only one patch-queue branch and the debian/packaging branch is used as its base branch. That is, e.g. a 'gbp-pq switch' operation from the patch-queue branch always switches to the debian/packaging branch. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Olev Kartau <olev.kartau@intel.com> Minor adjustments, Signed-off-by: Tzafrir Cohen <tzafrir@debian.org>
2014-12-23rpm-pq: Include in command-line testTzafrir Cohen
Signed-off-by: Tzafrir Cohen <tzafrir@debian.org>
2014-12-16pq: allow running actions in repo subdirMarkus Lehtonen
This should make the usage of gbp-pq more flexible and prevent mistakes caused by e.g. running gbp-pq import under some subdirectory. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-12-16GitRepository.archive: support getting tar data as return valueMarkus Lehtonen
Return tar data as a generator object, if the 'output' option is not defined. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-12-16config: 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-16GitRepository: allow repo inititialization from subdirMarkus Lehtonen
This allows initialization of a GitRepository object, even if the current working directory (or path given to GitRepository) is not the top level directory of the git repository. Don't guess the git meta data dir, but, take it as reported by git itself. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-12-16pq-rpm: implement '--import-files' command line optionMarkus Lehtonen
The new option can be used to "copy" files from the packaging branch to the patch-queue branch when doing pq import. The files defined with this option will appear as new files in one monolithic commit in the development/patch-queue branch. By default, the local gbp conf files are imported in order to try to ensure that gbp sees the same settings on the patch-queue branch as on the packaging branch. NOTE: This option does not affect the importing (i.e. apply and commit) of patches. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-12-16Introduce 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-16buildpackage/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
2014-07-24Introduce git-import-srpm toolMarkus Lehtonen
Initial version of the git-import-srpm: a tool for importing source rpms. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2014-07-24Introduce rpm helpersMarkus Lehtonen
Implements a new gbp.rpm module that contains functionality for e.g. parsing and editing spec files, reading src.rpm files rpm-specific packaging policy etc. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com> Signed-off-by: Zhang Qiang <qiang.z.zhang@intel.com> Signed-off-by: Huang Hao <hao.h.huang@intel.com>
2014-05-16Fix comitter vs committer typosGuido Günther
Thanks: Sandro Tosi Closes: #748339
2014-04-03config: add decorator to add_option_* functionsGuido Günther
This allows us to build an internal list of valid options and print these.
2014-04-02Remove tests now covered by 18_test_ConfigGuido Günther
2014-04-01Add minimal 'config' commandGuido Günther
This only allows to print single config values so far. Closes: #733470
2014-04-01Test option parser fallbacks more thoroughlyGuido Günther
revealing another bug where we overwrote parsed values with defaults Closes: #733759
2014-03-27ComponentTestBase: use regex matching in log checkingMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-03-27Use a temporary directoryGuido Günther
This avoids file name collisions and weired files in the working copy.
2014-03-27tests: more robust check for the default urgency level of dchMarkus Lehtonen
The dch tool might not report it's version if it is incorrectly compiled. Create a dummy changelog and parse it "manually" to determine the default urgency level. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-02-23import_dsc: Create missing debian branch with --create-missing-branchesGuido Günther
Closes: #739888
2014-02-19config: Don't pull in config defaults twiceGuido Günther
This would otherwise overwrite values set in the legacy config sections. Closes: #733759
2014-01-07tests: adapt dch tests for older devscriptsMarkus Lehtonen
Determine the default urgency level by determining the version number of the dch tool from command line. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-12-17Adjust test cases to newer devscriptsGuido Günther
Closes: #732384
2013-10-31pq: rewrite patch export functionalityMarkus Lehtonen
Use our own function for constructing the patch files instead of using the format-patch command of git. This way, we get the desired output format directly, without the need for the error-prone "format-patch, parse patch files, mangle and re-write patch files" cycle. Also, fix patch naming in patch generation when '--no-patch-numbers' is used. Previously, multiple commits with the same subject resulted in multiple patches having the same filename. This lead into broken series with missing patches as patch files were overwritten by the topmost commit. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-10tests: remove unused import in submodule testsMarkus Lehtonen
Change-Id: Ida67f9640624a92ffc1afd90dc33efe01b38db5c Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-10tests: upper case global variables in submodule testsMarkus Lehtonen
Prevent some confusing name clashes. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-10tests: add some docstrings to git submodule testsMarkus Lehtonen
Change-Id: I0ba9e6b59e2a819b5cde1be6fbb53b8ecbb67025 Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-10tests: use eq_ and ok_ from nose tools in submodule testsMarkus Lehtonen
For consistency and better assert error messages. Change-Id: Ie6502daac6cee0176db5f099b91803292c17ceea Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-10tests: add test for archiving without git submodulesMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-10git: new class and method for remote repositoriesMarkus Lehtonen
Add a new GitRemote class for representing git remote repositories. The initial, very limited, version only contains information about the fetch and push URLs of the remote repository. Also, add a new GitRepository.get_remotes() method for getting remote repositories as instances of the new GitRemote class. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-10GitRepository.pull: Add 'all_remotes' optionLingchaox Xin
Also changes the method to utilize the GitArgs class. Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-10GitRepository.push: Add 'tags' optionLingchaox Xin
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-10GitRepository.push: Add 'force' optionLingchaox Xin
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-10GitRepository.list_tree: add 'paths' optionMarkus Lehtonen
Change-Id: I9331fec6fcd0e58dad7cb4a571a683e09ce08011 Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-05ComponentTestBase: use eq_() ok_() from nose.toolsMarkus Lehtonen
For better assert messages. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-05GitRepository.diff: add 'text' optionMarkus Lehtonen
For generating textual diffs. Useful for Pq - for example, the 'patch' utility does not support git binary diffs. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-04GitRepository: Add clean() methodMarkus Lehtonen
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-04GitRepository.fetch: Add 'all_remotes' optionLingchaox Xin
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-04GitRepository.fetch: Add 'refspec' optionLingchaox Xin
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>