summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2022-11-28porting code to python3.x with os patchbiao716.wang17-70/+62
Change-Id: I3deda71d6bde7c3363800d79d2e9ae6998bdb9e7 Signed-off-by: biao716.wang <biao716.wang@samsung.com>
2022-10-28port code from python2.x to python3.xbiao716.wang14-25/+25
Change-Id: I798c72d07e44839cc5d1e25ec75fca0bd8068567 Signed-off-by: biao716.wang <biao716.wang@samsung.com>
2019-12-12fix pylint error for Ubuntu 14.04, add gbp/version.py filesubmit/trunk/20200519.184310submit/trunk/20200519.164610submit/trunk/20200519.161030submit/trunk/20200513.162810submit/trunk/20200423.122334submit/trunk/20200423.115423submit/trunk/20200423.102810submit/trunk/20200422.165210submit/trunk/20200422.142510submit/trunk/20200422.115210submit/trunk/20200414.191000submit/trunk/20200414.173500submit/trunk/20200414.141500submit/trunk/20200413.151000submit/trunk/20200413.150500submit/trunk/20200413.150000submit/trunk/20200413.132320submit/trunk/20200410.160020submit/trunk/20200410.143020submit/trunk/20200409.202020submit/trunk/20200409.200220submit/trunk/20200409.194520submit/trunk/20200219.120523submit/trunk/20200115.110101submit/trunk/20200114.110000submit/trunk/20200114.100000submit/trunk/20200110.111659submit/trunk/20200109.154402submit/trunk/20200109.151502submit/trunk/20200109.124502submit/trunk/20200109.112402submit/trunk/20200109.105802submit/trunk/20200108.192702submit/trunk/20200108.172702submit/trunk/20200105.091946submit/trunk/20200104.134833submit/trunk/20200104.111033accepted/tizen/devbase/tools/20200520.012809accepted/tizen/devbase/tools/20200514.023607accepted/tizen/devbase/tools/20200423.100549accepted/tizen/devbase/tools/20200415.093457accepted/tizen/devbase/tools/20200219.094542accepted/tizen/devbase/tools/20200115.231434accepted/tizen/devbase/tools/20200114.115815accepted/tizen/devbase/tools/20200114.020233accepted/tizen/devbase/tools/20200110.011759accepted/tizen/devbase/tools/20200109.052803accepted/tizen/devbase/tools/20200106.014315accepted/tizen/devbase/tools/20200104.060141biao716.wang1-1/+1
Change-Id: I741176ae7adff77ad09bb07ab6b5352481500454 Signed-off-by: biao716.wang <biao716.wang@samsung.com>
2019-11-14fix pylint error for git-buildpackagebiao716.wang3-11/+12
Change-Id: Ia319032dcd3f55600bb79b5c85372a7a77122174 Signed-off-by: biao716.wang <biao716.wang@samsung.com>
2019-11-07Fix case not run because of submodule import errorsubmit/trunk/20200108.202702biao716.wang2-0/+0
Change-Id: I21b5a2c04b8427bad804ea97fbc0b2812dc1e032 Signed-off-by: biao716.wang <biao716.wang@samsung.com>
2016-12-26Disable test_pristine_tar unittest casedebian/0.7.5y0169.zhang1-14/+14
Change-Id: I5ece198765d2faef424ec486aa0c056680c5071a
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>