From dfb51bc816cde2cb345f8a0300205e6ac95a2065 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 30 Mar 2020 15:30:08 +0200 Subject: Switch to project variable visibility by default --- libbuild2/test/init.cxx | 24 +++++++++++------------- libbuild2/test/script/parser.test.cxx | 3 +-- 2 files changed, 12 insertions(+), 15 deletions(-) (limited to 'libbuild2/test') diff --git a/libbuild2/test/init.cxx b/libbuild2/test/init.cxx index a21e8f2..16891c6 100644 --- a/libbuild2/test/init.cxx +++ b/libbuild2/test/init.cxx @@ -46,25 +46,23 @@ namespace build2 // // Specified as @ pairs with both sides being // optional. The variable is untyped (we want a list of name-pairs), - // overridable, and inheritable. The target is relative (in essence a - // prerequisite) which is resolved from the (root) scope where the - // config.test value is defined. + // overridable, and with global visibiility. The target is relative + // (in essence a prerequisite) which is resolved from the (root) scope + // where the config.test value is defined. // - vp.insert ("config.test", true), + vp.insert ("config.test"), // Test working directory before/after cleanup (see Testscript spec // for semantics). // - vp.insert ("config.test.output", true), + vp.insert ("config.test.output"), // The test variable is a name which can be a path (with the // true/false special values) or a target name. // - // Note: none are overridable. - // - vp.insert ("test", variable_visibility::target), - vp.insert ("test.options", variable_visibility::project), - vp.insert ("test.arguments", variable_visibility::project), + vp.insert ("test", variable_visibility::target), + vp.insert ("test.options"), + vp.insert ("test.arguments"), // Prerequisite-specific. // @@ -93,7 +91,7 @@ namespace build2 // Test target platform. // - vp.insert ("test.target", variable_visibility::project) + vp.insert ("test.target") }; // This one is used by other modules/rules. @@ -102,8 +100,8 @@ namespace build2 // These are only used in testscript. // - vp.insert ("test.redirects", variable_visibility::project); - vp.insert ("test.cleanups", variable_visibility::project); + vp.insert ("test.redirects"); + vp.insert ("test.cleanups"); // Unless already set, default test.target to build.host. Note that it // can still be overriden by the user, e.g., in root.build. diff --git a/libbuild2/test/script/parser.test.cxx b/libbuild2/test/script/parser.test.cxx index 44be998..a12fda4 100644 --- a/libbuild2/test/script/parser.test.cxx +++ b/libbuild2/test/script/parser.test.cxx @@ -206,8 +206,7 @@ namespace build2 value& v ( tt.assign ( - ctx.var_pool.rw ().insert ( - "test.target", variable_visibility::project))); + ctx.var_pool.rw ().insert ("test.target"))); v = cast (ctx.global_scope["build.host"]); -- cgit v1.1