aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/test/init.cxx5
-rw-r--r--build2/test/rule.cxx4
2 files changed, 5 insertions, 4 deletions
diff --git a/build2/test/init.cxx b/build2/test/init.cxx
index 69570fd..e7798ec 100644
--- a/build2/test/init.cxx
+++ b/build2/test/init.cxx
@@ -39,9 +39,10 @@ namespace build2
{
auto& v (var_pool);
- // Note: none are overridable.
+ // Note: none are overridable. The test variable is a path with the
+ // true/false special values.
//
- v.insert<bool> ("test", variable_visibility::target);
+ v.insert<path> ("test", variable_visibility::target);
v.insert<name> ("test.input", variable_visibility::project);
v.insert<name> ("test.output", variable_visibility::project);
v.insert<name> ("test.roundtrip", variable_visibility::project);
diff --git a/build2/test/rule.cxx b/build2/test/rule.cxx
index c133698..f48a3d1 100644
--- a/build2/test/rule.cxx
+++ b/build2/test/rule.cxx
@@ -55,7 +55,7 @@ namespace build2
// explicitly set to false.
//
lookup l (t["test"]);
- md.test = !l || cast<bool> (l);
+ md.test = !l || cast<path> (l).string () != "false";
}
else
{
@@ -69,7 +69,7 @@ namespace build2
//
auto p (t.find ("test"));
- if (p.first && cast<bool> (p.first))
+ if (p.first && cast<path> (p.first).string () != "false")
md.test = true;
else
{