From 2df57d72b65012674e6bc64dec66d9b3fd7f993b Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 14 May 2018 14:10:56 +0300 Subject: Fallback to output directory removal for --keep-out on disfigure failure --- tests/pkg-configure.test | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'tests') diff --git a/tests/pkg-configure.test b/tests/pkg-configure.test index 3b455ff..f950f68 100644 --- a/tests/pkg-configure.test +++ b/tests/pkg-configure.test @@ -383,3 +383,26 @@ if ($cxx.target.class != 'windows') $pkg_purge libbar 2>'purged libbar/1.3.0' } } + +: keep-out +: +{ + : fallback + : + : Test that pkg-disfigure falls back to the external package output directory + : removal if the source directory have gone. + : + { + $clone_root_cfg; + + # Configure libhello as an external package. + # + cp --no-cleanup -r $src/libhello-1.0.0 ./libhello; + $pkg_unpack -e ./libhello; + $* libhello 2>!; + + rm -r ./libhello; + $pkg_disfigure --keep-out libhello 2>'disfigured libhello/1.0.0'; + test -d cfg/libhello != 0 + } +} -- cgit v1.1