aboutsummaryrefslogtreecommitdiff
path: root/build/test/module.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build/test/module.cxx')
-rw-r--r--build/test/module.cxx21
1 files changed, 13 insertions, 8 deletions
diff --git a/build/test/module.cxx b/build/test/module.cxx
index 19a31d2..9372103 100644
--- a/build/test/module.cxx
+++ b/build/test/module.cxx
@@ -21,9 +21,21 @@ namespace build
{
static rule rule_;
+ extern "C" void
+ test_boot (scope& root, const location&, unique_ptr<module>&)
+ {
+ tracer trace ("test::boot");
+
+ level5 ([&]{trace << "for " << root.out_path ();});
+
+ // Register the test operation.
+ //
+ root.operations.insert (test_id, test);
+ }
+
extern "C" bool
test_init (scope& root,
- scope& base,
+ scope&,
const location& l,
unique_ptr<module>&,
bool first,
@@ -31,9 +43,6 @@ namespace build
{
tracer trace ("test::init");
- if (&root != &base)
- fail (l) << "test module must be initialized in bootstrap.build";
-
if (!first)
{
warn (l) << "multiple test module initializations";
@@ -56,10 +65,6 @@ namespace build
v.find ("test.arguments", strings_type);
}
- // Register the test operation.
- //
- root.operations.insert (test_id, test);
-
// Register rules.
//
{