From ac041c5c84485ea8d65deb41861ebd197f8e67e5 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 17 Apr 2023 12:11:56 +0300 Subject: Add test for config variable overrides specified globally for pkg-build --- tests/pkg-build.testscript | 87 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 61 insertions(+), 26 deletions(-) diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript index 157a3ef..ca28630 100644 --- a/tests/pkg-build.testscript +++ b/tests/pkg-build.testscript @@ -2084,36 +2084,71 @@ test.arguments += --sys-no-query : config-vars : { - $cfg_create -d cfg cc config.cc.coptions=-Wall 2>- &cfg/***; - $rep_add $rep/t5 && $rep_fetch; + +$cfg_create -d cfg cc config.cc.coptions=-Wall 2>- &cfg/*** + +$rep_add $rep/t5 && $rep_fetch - $* --configure-only { config.cc.coptions+=-g }+ libbar \ - { config.cc.coptions+=-O }+ libbox 2>>EOE; - fetched libbar/1.2.0 - unpacked libbar/1.2.0 - fetched libbox/1.2.0 - unpacked libbox/1.2.0 - configured libbar/1.2.0 - configured libbox/1.2.0 - EOE + : override-package-specific + : + { + $clone_cfg; - cat cfg/build/config.build >>~%EOO%; - %.* - config.cc.coptions = -Wall - %.* - EOO + $* --configure-only { config.cc.coptions+=-g }+ libbar \ + { config.cc.coptions+=-O }+ libbox 2>>EOE; + fetched libbar/1.2.0 + unpacked libbar/1.2.0 + fetched libbox/1.2.0 + unpacked libbox/1.2.0 + configured libbar/1.2.0 + configured libbox/1.2.0 + EOE - cat cfg/libbar-1.2.0/build/config.build >>~%EOO%; - %.* - config.cc.coptions = -Wall -g - %.* - EOO + cat cfg/build/config.build >>~%EOO%; + %.* + config.cc.coptions = -Wall + %.* + EOO - cat cfg/libbox-1.2.0/build/config.build >>~%EOO% - %.* - config.cc.coptions = -Wall -O - %.* - EOO + cat cfg/libbar-1.2.0/build/config.build >>~%EOO%; + %.* + config.cc.coptions = -Wall -g + %.* + EOO + + cat cfg/libbox-1.2.0/build/config.build >>~%EOO%; + %.* + config.cc.coptions = -Wall -O + %.* + EOO + + $pkg_drop libbar libbox + } + + : override-globally + : + { + $clone_cfg; + + $* --configure-only config.cc.coptions+=-g \ + config.cc.coptions+=-O -- libbar 2>>EOE; + fetched libbar/1.2.0 + unpacked libbar/1.2.0 + configured libbar/1.2.0 + EOE + + cat cfg/build/config.build >>~%EOO%; + %.* + config.cc.coptions = -Wall + %.* + EOO + + cat cfg/libbar-1.2.0/build/config.build >>~%EOO%; + %.* + config.cc.coptions = -Wall -g -O + %.* + EOO + + $pkg_drop libbar + } } } -- cgit v1.1