add integration test for Environment#run_builder
This commit is contained in:
parent
8a1dfb0785
commit
e58b8bd109
12
build_tests/simple/run_builder.rb
Normal file
12
build_tests/simple/run_builder.rb
Normal file
@ -0,0 +1,12 @@
|
||||
class MyObject < Rscons::Builder
|
||||
def run(options)
|
||||
target, sources, cache, env, vars = options.values_at(:target, :sources, :cache, :env, :vars)
|
||||
env.run_builder(env.builders["Object"], target, sources, cache, vars)
|
||||
end
|
||||
end
|
||||
|
||||
Rscons::Environment.new do |env|
|
||||
env.add_builder(MyObject.new)
|
||||
env.MyObject("simple.o", "simple.c")
|
||||
env.Program("simple.exe", "simple.o")
|
||||
end
|
@ -631,6 +631,16 @@ EOF
|
||||
]
|
||||
end
|
||||
|
||||
it "allows a builder to call Environment#run_builder in a non-threaded manner" do
|
||||
test_dir("simple")
|
||||
result = run_test(rsconsfile: "run_builder.rb")
|
||||
expect(result.stderr).to eq ""
|
||||
expect(lines(result.stdout)).to eq [
|
||||
"CC simple.o",
|
||||
"LD simple.exe",
|
||||
]
|
||||
end
|
||||
|
||||
context "Directory builder" do
|
||||
it "creates the requested directory" do
|
||||
test_dir("simple")
|
||||
|
Loading…
x
Reference in New Issue
Block a user