diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-05-11 14:41:12 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-05-11 16:01:16 +0300 |
commit | e035fbaf5e5ae862191dc3d9eb047ac0abba6dbb (patch) | |
tree | afa96dfcbf0b8af174bf7c4ed171cd43a6a7dcb1 /tests | |
parent | ca387611165403835655db1f3620ef8e65cb92b5 (diff) |
Add support for recursive pkg-test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/common/satisfy/libbaz-0.0.3.tar.gz | bin | 363 -> 368 bytes | |||
-rw-r--r-- | tests/common/satisfy/libfix-0.0.1.tar.gz | bin | 345 -> 355 bytes | |||
-rw-r--r-- | tests/common/satisfy/libfoo-0.0.1.tar.gz | bin | 362 -> 364 bytes | |||
-rw-r--r-- | tests/pkg-test.test | 82 | ||||
l--------- | tests/pkg-test/t0a | 1 |
5 files changed, 83 insertions, 0 deletions
diff --git a/tests/common/satisfy/libbaz-0.0.3.tar.gz b/tests/common/satisfy/libbaz-0.0.3.tar.gz Binary files differindex 2044988..ae3a337 100644 --- a/tests/common/satisfy/libbaz-0.0.3.tar.gz +++ b/tests/common/satisfy/libbaz-0.0.3.tar.gz diff --git a/tests/common/satisfy/libfix-0.0.1.tar.gz b/tests/common/satisfy/libfix-0.0.1.tar.gz Binary files differindex f7c81d5..d58fa18 100644 --- a/tests/common/satisfy/libfix-0.0.1.tar.gz +++ b/tests/common/satisfy/libfix-0.0.1.tar.gz diff --git a/tests/common/satisfy/libfoo-0.0.1.tar.gz b/tests/common/satisfy/libfoo-0.0.1.tar.gz Binary files differindex 946c6b4..7c11b79 100644 --- a/tests/common/satisfy/libfoo-0.0.1.tar.gz +++ b/tests/common/satisfy/libfoo-0.0.1.tar.gz diff --git a/tests/pkg-test.test b/tests/pkg-test.test new file mode 100644 index 0000000..26a3fd6 --- /dev/null +++ b/tests/pkg-test.test @@ -0,0 +1,82 @@ +# file : tests/pkg-test.test +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +.include common.test config.test remote.test + +# Source repository: +# +# pkg-build +# | +# `-- t0a +# |-- libbar-0.0.1.tar.gz -> libbaz == 0.0.1 +# |-- libbaz-0.0.1.tar.gz -> libfox +# |-- libbaz-0.0.3.tar.gz -> libfoo +# |-- libbox-0.0.1.tar.gz -> libbaz +# |-- libfix-0.0.1.tar.gz +# |-- libfoo-0.0.1.tar.gz -> libfix +# |-- libfox-0.0.1.tar.gz +# `-- repositories.manifest + +# Prepare repositories used by tests if running in the local mode. +# ++if ($remote != true) + rep_create += 2>! + + 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>! + ++$pkg_build "libbaz@$rep/t0a" + +test.options += --build-option -s + +: non-recursive +: +{ + $clone_cfg; + + $* libbaz 2>>~%EOE% + %info: .+libbaz-0.0.3.+ has nothing to test% + tested libbaz/0.0.3 + EOE +} + +: immediate +: +{ + $clone_cfg; + + $* libbaz --immediate 2>>~%EOE% + %info: .+libbaz-0.0.3.+ has nothing to test% + %info: .+libfoo-0.0.1.+ has nothing to test% + tested libbaz/0.0.3 + tested libfoo/0.0.1 + EOE +} + +: recursive +: +{ + $clone_cfg; + + $* libbaz --recursive 2>>~%EOE% + %info: .+libbaz-0.0.3.+ has nothing to test% + %info: .+libfoo-0.0.1.+ has nothing to test% + %info: .+libfix-0.0.1.+ has nothing to test% + tested libbaz/0.0.3 + tested libfoo/0.0.1 + 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 +} diff --git a/tests/pkg-test/t0a b/tests/pkg-test/t0a new file mode 120000 index 0000000..1c643ee --- /dev/null +++ b/tests/pkg-test/t0a @@ -0,0 +1 @@ +../common/satisfy/t0a
\ No newline at end of file |