aboutsummaryrefslogtreecommitdiff
path: root/build/test/module.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-01-05 11:55:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-01-05 11:55:15 +0200
commit9fb791e9fad6c63fc1dac49f4d05ae63b8a3db9b (patch)
treed60322d4382ca5f97b676c5abe2e39524f35eab4 /build/test/module.cxx
parentf159b1dac68c8714f7ba71ca168e3b695891aad9 (diff)
Rename build directory/namespace to build2
Diffstat (limited to 'build/test/module.cxx')
-rw-r--r--build/test/module.cxx88
1 files changed, 0 insertions, 88 deletions
diff --git a/build/test/module.cxx b/build/test/module.cxx
deleted file mode 100644
index 9372103..0000000
--- a/build/test/module.cxx
+++ /dev/null
@@ -1,88 +0,0 @@
-// file : build/test/module.cxx -*- C++ -*-
-// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
-// license : MIT; see accompanying LICENSE file
-
-#include <build/test/module>
-
-#include <build/scope>
-#include <build/target>
-#include <build/rule>
-#include <build/diagnostics>
-
-#include <build/test/operation>
-#include <build/test/rule>
-
-using namespace std;
-using namespace butl;
-
-namespace build
-{
- namespace test
- {
- 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&,
- const location& l,
- unique_ptr<module>&,
- bool first,
- bool)
- {
- tracer trace ("test::init");
-
- if (!first)
- {
- warn (l) << "multiple test module initializations";
- return true;
- }
-
- const dir_path& out_root (root.out_path ());
- level5 ([&]{trace << "for " << out_root;});
-
- // Enter module variables.
- //
- {
- auto& v (var_pool);
-
- v.find ("test", bool_type);
- v.find ("test.input", name_type);
- v.find ("test.output", name_type);
- v.find ("test.roundtrip", name_type);
- v.find ("test.options", strings_type);
- v.find ("test.arguments", strings_type);
- }
-
- // Register rules.
- //
- {
- auto& r (root.rules);
-
- // Register our test running rule.
- //
- r.insert<target> (perform_test_id, "test", rule_);
-
- // Register our rule for the dist meta-operation. We need
- // to do this because we have "ad-hoc prerequisites" (test
- // input/output files) that need to be entered into the
- // target list.
- //
- r.insert<target> (dist_id, test_id, "test", rule_);
- }
-
- return true;
- }
- }
-}