From 3dca6c1c2c51b3ddd466e2e2e9fd71f4cdf497ed Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 23 Sep 2021 10:42:09 +0200 Subject: Add sync --disfigure option to force from-scratch reconfiguration --- tests/sync.testscript | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) (limited to 'tests') 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 <+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 <+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 : { -- cgit v1.1