diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-05-17 13:20:32 +0200 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-05-17 16:22:42 +0300 |
commit | 3908754edadb9afbe0f977788cc34456cbdffc5a (patch) | |
tree | d820f098750b8492dac9fdb5be6d26bea4edb39a /tests/pkg-test.test | |
parent | 2ea3d11ac1d5b6069268709ca0125d2e90377d93 (diff) |
Add support for --all|-a to pkg-{update,clean,test,install,uninstall}
Diffstat (limited to 'tests/pkg-test.test')
-rw-r--r-- | tests/pkg-test.test | 64 |
1 files changed, 52 insertions, 12 deletions
diff --git a/tests/pkg-test.test b/tests/pkg-test.test index 26a3fd6..cfc7eb2 100644 --- a/tests/pkg-test.test +++ b/tests/pkg-test.test @@ -26,13 +26,39 @@ cp -r $src/t0a $out/t0a && $rep_create $out/t0a &$out/t0a/packages.manifest end -pkg_build += --yes --auth all --trust-yes -d cfg 2>! +cfg_create += -d cfg 2>! &cfg/*** +pkg_build += -d cfg --yes --auth all --trust-yes 2>! +$pkg_build "libbaz@$rep/t0a" test.options += --build-option -s -: non-recursive +: args +: +{ + : no-name + : + $* 2>>EOE != 0 + error: package name argument expected + info: run 'bpkg help pkg-test' for more information + EOE + + : all-name + : + $* --all libbaz 2>>EOE != 0 + error: both --all|-a and package argument specified + info: run 'bpkg help pkg-test' for more information + EOE + + : recursive-immediate + : + $* libbaz --recursive --immediate 2>>~%EOE% != 0 + error: both --immediate|-i and --recursive|-r specified + info: run 'bpkg help pkg-test' for more information + EOE +} + +: package : { $clone_cfg; @@ -43,6 +69,30 @@ test.options += --build-option -s EOE } +: all +: +{ + : src + : + { + $clone_root_cfg; + + $* --all 2>>~%EOE% + %info: .+libbaz-0.0.3.+ has nothing to test% + tested libbaz/0.0.3 + EOE + } + + : sys + : + { + $cfg_create; + $pkg_build "sys:libbaz@$rep/t0a"; + + $* --all 2>'info: nothing to test' + } +} + : immediate : { @@ -70,13 +120,3 @@ test.options += --build-option -s tested libfix/0.0.1 EOE } - -: recursive-immediate -: -{ - $clone_cfg; - - $* libbaz --recursive --immediate 2>>~%EOE% != 0 - error: both --immediate|-i and --recursive|-r specified - EOE -} |