diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-09-23 10:42:09 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-09-23 10:42:09 +0200 |
commit | 3dca6c1c2c51b3ddd466e2e2e9fd71f4cdf497ed (patch) | |
tree | 0276a0ac7a34c239685751863eb7af64a2a319a7 /tests | |
parent | c0280663459c1faa5e24f73cfc682a072fd56f11 (diff) |
Add sync --disfigure option to force from-scratch reconfiguration
Diffstat (limited to 'tests')
-rw-r--r-- | tests/sync.testscript | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/sync.testscript b/tests/sync.testscript index a9fac5c..d03907f 100644 --- a/tests/sync.testscript +++ b/tests/sync.testscript @@ -205,6 +205,62 @@ deinit += -d prj EOE } +: config-vars +: +{ + $new prj &prj/***; + + cat <<EOI >+prj/build/root.build; + config [bool] config.prj.develop ?= false + config [bool] config.prj.extra ?= true + + text "develop=$config.prj.develop" + text "extra=$config.prj.extra" + EOI + + $init -d prj -C @cfg $config_cxx &prj-cfg/*** 2>>~/EOE/; + /.*/+ + /.*: develop=true/ + /.*: extra=true/ + EOE + + # Reconfigure. + # + $* -d prj config.prj.develop=false config.prj.extra=false 2>>~/EOE/; + /.*/+ + /.*: develop=false/ + /.*: extra=false/ + EOE + + # Make sure the configuration is by default preserved on reconfiguration. + # + cat <<EOI >+prj/manifest; + tags: c++ + EOI + + $* -d prj config.prj.develop=false config.prj.extra=false 2>>~/EOE/; + /.*/+ + /.*: develop=false/ + /.*: extra=false/ + EOE + + # Make sure --disfigure causes a from-scratch reconfiguration. + # + $* -d prj --disfigure config.prj.extra=false 2>>~/EOE/; + /.*/+ + /.*: develop=true/ + /.*: extra=false/ + EOE + + # Make sure --disfigure alone triggers reconfiguration. + # + $* -d prj --disfigure 2>>~/EOE/ + /.*/+ + /.*: develop=true/ + /.*: extra=true/ + EOE +} + : dependency-config : { |