diff options
author | Johannes Schauer <josch@debian.org> | 2015-05-28 12:29:25 +0200 |
---|---|---|
committer | Andreas Henriksson <andreas.henriksson@endian.se> | 2015-06-22 10:06:00 +0200 |
commit | 19152b3f7db286f75de1b551010eb472260e0749 (patch) | |
tree | 4065acfe36cdb0e343952a0894504490178fae74 /test_pbuilder-satisfydepends-funcs | |
parent | b068c8d3289423f7d74a7f8d5886830777d71c27 (diff) | |
download | pbuilder-19152b3f7db286f75de1b551010eb472260e0749.tar pbuilder-19152b3f7db286f75de1b551010eb472260e0749.tar.gz |
build profile parsing support
Diffstat (limited to 'test_pbuilder-satisfydepends-funcs')
-rwxr-xr-x | test_pbuilder-satisfydepends-funcs | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/test_pbuilder-satisfydepends-funcs b/test_pbuilder-satisfydepends-funcs index aafef2b..61a446f 100755 --- a/test_pbuilder-satisfydepends-funcs +++ b/test_pbuilder-satisfydepends-funcs @@ -100,6 +100,56 @@ expect_output "bar, foo" test_filter_arch_deps "bar, foo [amd64]" "amd64" expect_output "bar | foo" test_filter_arch_deps "bar | foo [amd64]" "amd64" expect_output "bar" test_filter_arch_deps "bar | foo [amd64]" "i386" +expect_fail checkbuilddep_restrictiondeps "foo <!stage1>" "" +expect_success checkbuilddep_restrictiondeps "foo <!stage1>" "stage1" +expect_fail checkbuilddep_restrictiondeps "foo <!stage1>" "notest" +expect_success checkbuilddep_restrictiondeps "foo <!stage1>" "stage1 notest" + +expect_success checkbuilddep_restrictiondeps "foo <stage1>" "" +expect_fail checkbuilddep_restrictiondeps "foo <stage1>" "stage1" +expect_success checkbuilddep_restrictiondeps "foo <stage1>" "notest" +expect_fail checkbuilddep_restrictiondeps "foo <stage1>" "stage1 notest" + +expect_fail checkbuilddep_restrictiondeps "foo <!stage1 !notest>" "" +expect_success checkbuilddep_restrictiondeps "foo <!stage1 !notest>" "stage1" +expect_success checkbuilddep_restrictiondeps "foo <!stage1 !notest>" "notest" +expect_success checkbuilddep_restrictiondeps "foo <!stage1 !notest>" "stage1 notest" + +expect_success checkbuilddep_restrictiondeps "foo <stage1 notest>" "" +expect_success checkbuilddep_restrictiondeps "foo <stage1 notest>" "stage1" +expect_success checkbuilddep_restrictiondeps "foo <stage1 notest>" "notest" +expect_fail checkbuilddep_restrictiondeps "foo <stage1 notest>" "stage1 notest" + +expect_success checkbuilddep_restrictiondeps "foo <!stage1 notest>" "" +expect_success checkbuilddep_restrictiondeps "foo <!stage1 notest>" "stage1" +expect_fail checkbuilddep_restrictiondeps "foo <!stage1 notest>" "notest" +expect_success checkbuilddep_restrictiondeps "foo <!stage1 notest>" "stage1 notest" + +expect_success checkbuilddep_restrictiondeps "foo <stage1 !notest>" "" +expect_fail checkbuilddep_restrictiondeps "foo <stage1 !notest>" "stage1" +expect_success checkbuilddep_restrictiondeps "foo <stage1 !notest>" "notest" +expect_success checkbuilddep_restrictiondeps "foo <stage1 !notest>" "stage1 notest" + +test_filter_restriction_deps() { + echo "$1" | filter_restriction_deps "$2" +} + +expect_output "foo" test_filter_restriction_deps "foo <!stage1>" "" +expect_output "" test_filter_restriction_deps "foo <!stage1>" "stage1" +expect_output "foo" test_filter_restriction_deps "foo <stage1>" "stage1" +expect_output "bar, foo" test_filter_restriction_deps "bar, foo <stage1>" "stage1" +expect_output "bar | foo" test_filter_restriction_deps "bar | foo <stage1>" "stage1" +expect_output "bar" test_filter_restriction_deps "bar | foo <!stage1>" "stage1" + +test_filter_arch_restriction_deps() { + echo "$1" | filter_arch_deps "$2" | filter_restriction_deps "$3" +} + +expect_output "foo" test_filter_arch_restriction_deps "foo [amd64] <!stage1>" "amd64" "" +expect_output "" test_filter_arch_restriction_deps "foo [amd64] <stage1>" "amd64" "" +expect_output "foo" test_filter_arch_restriction_deps "foo [amd64] <!stage1>" "amd64" "" +expect_output "" test_filter_arch_restriction_deps "foo [i386] <stage1>" "amd64" "stage1" + expect_output "debhelper (>= 7)" test_get_build_deps_dsc testlib_summary |