diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-09-23 10:41:07 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-09-23 10:41:07 +0200 |
commit | 6ec2862b44e735cf265b8afb8105142c5478f69a (patch) | |
tree | 7ffcdbe036e81795e35a243b54f1efc537351aee /tests/pkg-build.testscript | |
parent | 88191b11fe652a0d87a37f4ab66cb82c7d4b25a8 (diff) |
Add pkg-build --disfigure option to force from-scratch reconfiguration
Diffstat (limited to 'tests/pkg-build.testscript')
-rw-r--r-- | tests/pkg-build.testscript | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript index fac4b1c..f2748bc 100644 --- a/tests/pkg-build.testscript +++ b/tests/pkg-build.testscript @@ -3815,6 +3815,77 @@ test.options += --no-progress } } +: disfigure +: +{ + +$cfg_create cxx $config_cxx -d cfg &cfg/*** + + # Build libhello as an external package. + # + +cp -r $src/libhello-1.0.0 ./libhello + +cat <<EOI >+libhello/build/root.build + config [bool] config.libhello.develop ?= false + text "develop=$config.libhello.develop" + EOI + +$rep_add libhello --type dir + +$rep_fetch + +$* config.libhello.develop=true -- libhello 2>! + + : without + : + : Make sure without --disfigure old configuration is preserved. + : + { + $clone_cfg; + $* libhello 2>!; # Update after output directory change. + + # Use bogus configuration variable to trigger reconfiguration. + # + $* config.libhello.bogus=true -- libhello 2>>~%EOE% + disfigured libhello/1.0.0 + %.*: develop=true% + configured libhello/1.0.0 + %.*: develop=true% + %(mkdir|c\+\+|ld|ar) .+%{8} + updated libhello/1.0.0 + EOE + } + + : alone + : + : Make sure --disfigure alone causes reconfiguration. + : + { + $clone_cfg; + $* libhello 2>!; # Update after output directory change. + + $* --disfigure libhello 2>>~%EOE% + disfigured libhello/1.0.0 + %.*: develop=false% + configured libhello/1.0.0 + %.*: develop=false% + %(mkdir|c\+\+|ld|ar) .+%{8} + updated libhello/1.0.0 + EOE + } + + : with-keep-out + : + { + $clone_cfg; + $* libhello 2>!; # Update after output directory change. + + $* --disfigure --keep-out libhello 2>>~%EOE% + disfigured libhello/1.0.0 + %.*: develop=false% + configured libhello/1.0.0 + %.*: develop=false% + info: cfg/dir{libhello/} is up to date + updated libhello/1.0.0 + EOE + } +} + : keep-out : { |