1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-09-08 14:08:42 +02:00

Implement 'exclude_files' and 'include_files' config options that allow skipping files in the 'checkout' command

Examples:
    osc checkout --setopt='include_files=*.spec *.changes'
    osc checkout --setopt='exclude_files=*.tar.* *.obscpio'
This commit is contained in:
2023-08-29 13:59:53 +02:00
parent a77f3d43d2
commit 4255711344
3 changed files with 47 additions and 0 deletions

View File

@@ -45,6 +45,27 @@ Scenario: Run `osc checkout` on a package, use a file size limit
And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.changes" exists
Scenario: Run `osc checkout` on a package, exclude files
Given I set working directory to "{context.osc.temp}"
When I execute osc with args "checkout test:factory test-pkgA --setopt=exclude_files=*.changes"
And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.spec" exists
And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.changes" does not exist
Scenario: Run `osc checkout` on a package, include files
Given I set working directory to "{context.osc.temp}"
When I execute osc with args "checkout test:factory test-pkgA --setopt=include_files=*.changes"
And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.spec" does not exist
And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.changes" exists
Scenario: Run `osc checkout` on a package, exclude and include files
Given I set working directory to "{context.osc.temp}"
When I execute osc with args "checkout test:factory test-pkgA --setopt=exclude_files=*.changes --setopt=include_files=*.changes"
And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.spec" does not exist
And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.changes" does not exist
Scenario: Run `osc checkout` on a package in a specified revision
Given I set working directory to "{context.osc.temp}"
When I execute osc with args "checkout test:factory test-pkgA --revision=2"