summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2016-06-16Handle conflicts from git merge release-20160531release-20160930release-20160615SoonKyu Park1-27/+27
Change-Id: I1cae90068ab2576d756188e36e112550c7c293de
2016-06-07Disbale test_create_branches unit caserelease-20160531Jun Wang1-27/+27
Change-Id: I1802461d5081aa6c14455ec955505cf4e8baf825
2016-05-101. Reset to 0.27debian/0.7.4Jun Wang31-13/+58
2. Keep same code with latest release Change-Id: I30588773b0a039c9f5002bf65b5c768a16fb7935
2016-05-10Add tests/component/rpm/data and tests/component/deb/datashuai.fu1-0/+0
Signed-off-by: shuai.fu <shuai01.fu@samsung.com> Change-Id: I850ffbab50fa949be56a3e35665e80bc51d06adf
2016-03-221.Change to way to get test data dirctoryJun Wang2-3/+3
2.Fix the error of indent in tests/20_test_rpm.py 3.Change to vendor tag Change-Id: Ia9520a6c441fa9d34eff76c96a41764f3fb0ba76
2016-03-21Fix 20_test_rpm.py to suit different edition of python.Jun Wang1-92/+107
Change-Id: Ibe03d1614fafb5ceb01af634da90eda8d1426fbd
2016-03-18Modify unit test cases which called 'assert_raises' functionJun Wang7-0/+96
to fix pre-review test bugs on CentOS_6. Change-Id: Ibb930eb107c18526876fc58428db359f9d31e716
2014-11-21buildpackage-rpm: look for remote upstream branchesMarkus Lehtonen1-1/+7
Consider remote branches, too, while looking for the upstream branch when trying to guess if a package is native or not. Change-Id: I3dbbb49816d1d294d81209ea5ab5870e053fd66a Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-18rpm tests: use eq_ and ok_ from nose toolsMarkus Lehtonen1-77/+74
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>
2014-11-14rpm tests: add unit tests for buildpackage-rpmMarkus Lehtonen3-7/+756
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14rpm tests: update component test dataMarkus Lehtonen2-49/+49
Adds pq/devel branch and .gitignore file to gbp-test package. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14rpm tests: remove RepoManifest.add_project()Markus Lehtonen1-11/+0
This functionality is moved to the rpm testdata submodule. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14rpm-ch: implement --meta-bts optionMarkus Lehtonen1-0/+20
This gives the user the possibility to define what meta tags (in git commit message) git-rpm-ch recognizes as bug tracking system references. Or, makes it possible to disable bts meta tag tracking altogether. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14rpm-ch: implement --commit-msg optionMarkus Lehtonen1-0/+11
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14rpm-ch: implement --commit optionMarkus Lehtonen1-0/+22
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14pq-rpm: don't create pq branch when switchingMarkus Lehtonen1-6/+12
Pq branch must be created with 'import'. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14pq-rpm: implement --retain-history optionMarkus Lehtonen1-4/+20
With this option defined gbp tries to preserve the history when converting. That is, for each commit in the old branch create one corresponding commit in the new orphan packaging branch. This works by dumping packaging files and updating patches for each commit. However, empty commits are not generated - these are caused e.g. by changes in files that are ignored by patch-generation. NOTE! Only valid for the 'convert' action. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14pq-rpm: implement --new-packaging-dir cmdline optionMarkus Lehtonen1-4/+19
Used for setting the packaging directory to be used in the new orphan packaging branch. Defaults to --packaging-dir so that the gbp.conf files are more likely to work without modification. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14pq-rpm: implement 'convert' subcommandMarkus Lehtonen1-0/+39
The new subcommand is intended to be a one-time-callable command for converting a package to use the "orphan-packaging" development model and git layout (where packaging files are maintained in a separate branch and code development in another branch). Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14import-orig-rpm: get archive from spec fileMarkus Lehtonen1-4/+43
Try to get archive path/filename from spec file if no file name is given on the command line. This should make version bumps more straightforward: just update version number in the spec file and run 'git-import-orig-rpm'. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14import-orig-rpm: implement --create-missing-branches optionMarkus Lehtonen1-4/+25
Create the upstream branch if it does not exist. Use the same option name that import-srpm has. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14rpm-ch: add unit tests for the command line toolMarkus Lehtonen2-0/+401
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14rpm: add gbp.rpm.changelog moduleMarkus Lehtonen1-0/+226
This new module contains basic containers and functionality for parsing and updating rpm changelogs. It is coupled with the rpm packaging policy class which now has definitions for rpm changelog formatting. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14pq-rpm: add unit tests for the command line toolMarkus Lehtonen3-1/+555
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14rpm-tests: add RepoManifest classMarkus Lehtonen1-0/+38
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14GitRepository/get_remote_repos: return URLs, tooMarkus Lehtonen1-2/+3
In addition to the remote name, return remote URLs. Return value is now a dict with remote name as the key and a list of URLs as the value. The first value in the list is the effective fetch URL, the rest of the values are push URLs. NOTE! This patch is to be dropped, not going for upstream. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14tests: add tests for git-import-orig-rpmMarkus Lehtonen2-0/+562
Basic tests for virtually all features of import-orig-rpm. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14CentOS compatibility: fix testsMarkus Lehtonen14-25/+78
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14rpm: support importing bzip2 compressed patchesMarkus Lehtonen1-0/+14
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14import-srpm: support for patch importMarkus Lehtonen1-18/+24
Adds a new commandline option '--patch-import' for importing patches into the source tree in packaging branch. When enabled, gbp applies and commits all patches (not marked for manual maintenance) into the packaging branch. If this succeeds, it also removes all imported patch files from the packaging directory and the spec file. Currently only supported for non-orphan-packaging. This setting is true by default which should make more sense as the developer wants to do code development in the packaging branch (if he/she selects to use non-orphan packaging). However, patch-import is force-disabled if in bare git repository. We cannot support this, currently. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14tests: add unit tests for gbp.rpm.SrcRpmFileMarkus Lehtonen5-0/+28
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14Introduce git-import-orig-rpm toolMarkus Lehtonen1-1/+2
Initial version of the git-import-orig-rpm: version of git-import-orig intended for maintaining rpm packages. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14Introduce git-buildpackage-rpm toolMarkus Lehtonen1-1/+2
Initial version of git-buildpackage-rpm: git-buildpackage tool for rpms. Also adds some new options to config.py that are exclusively used in this tool. 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>
2014-11-14Introduce gbp-pq-rpm toolMarkus Lehtonen1-1/+2
Initial version of gbp-pq-rpm: a tool for managing patch queues for rpm packages. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Olev Kartau <olev.kartau@intel.com>
2014-11-14gbp-pq: readiness to configure the pq branch nameMarkus Lehtonen1-2/+3
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>
2014-11-14Universal configurable base tmpdir for all gbp toolsMarkus Lehtonen1-4/+4
Adds support for a configurable tmpdir under which all gbp tools now create their temporary directories and files. NOTE: an exception is git-import-dscs which doesn't use the common configuration system. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14GitRepository/add_files: add new option 'untracked'Markus Lehtonen1-0/+6
With this option you can either only update already tracked files to index the (untracked=False) or add new files, too. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14config: read the right config if run from subdirMarkus Lehtonen1-4/+4
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-11-14tests/testutils: add directories arg to ls_* functionsMarkus Lehtonen1-7/+8
With this you can exclude directories from the listing returned by the ls_tar(), ls_zip() and ls_dir() functions. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14tests.testutils: add ls_zip() helperMarkus Lehtonen1-0/+11
For listing zip contents. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14import-orig: new function for filtering/re-packing sourcesMarkus Lehtonen2-0/+148
Introduces a new function prepare_sources() that prepares upstream sources for importing into upstream branch and pristine-tar. That includes unpacking, filtering and re-packing sources. What somewhat complicates the logic is that it tries to avoid excess unpacking/packing of the sources. Also fixes the unpacking / filtering / repacking logic which was broken with some parameter combinations. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14UpstreamSource: implement prefix guessingMarkus Lehtonen1-1/+5
Add a new attribure 'prefix', i.e. the "leading directory name" in an archive. For example, this usually is '<name>-<version>' in release tarballs. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ɓukasz Stelmach <l.stelmach@samsung.com>
2014-11-14tests: test find_source() with unittestMarkus Lehtonen1-0/+64
Change doctests to unittests in order to have more flexibility in testing. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14UpstreamSource: move version guessing logic to PkgPolicyMarkus Lehtonen1-0/+4
PkgPolicy is more logical context, for example if guessing version from a plain filename and not a real file. Also, changes guess_version() to always return a tuple to simplify checking its return value. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14UpstreamSource: introduce is_tarball() methodMarkus Lehtonen1-0/+4
New method for checking if the sources are a tarball (possibly for checking if the sources are committable by pristine-tar). Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14UpstreamSource.pack: support prefix manglingMarkus Lehtonen1-0/+9
Add support for changing the prefix directory inside the tarball that is generated. Also, fixes a bug that caused a "prefix-less" tarball to get one, if unpacked and then repacked. Also, adds this support to repack_source() in common/import_orig. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14GitRepository: add diff_status methodMarkus Lehtonen1-0/+13
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-11-14GitRepository: allow repo inititialization from subdirMarkus Lehtonen1-2/+2
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-11-14GitRepository: Implement status methodEd Bartosh1-0/+22
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-11-14GitRepository: raise GitRepositoryError instead of GbpErrorMarkus Lehtonen1-1/+1
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>