update run_builder, build_sources integration tests for more coverage
This commit is contained in:
parent
adcee373df
commit
221cde7e5f
@ -10,5 +10,13 @@ end
|
||||
|
||||
Rscons::Environment.new do |env|
|
||||
env.add_builder(MyProgram.new)
|
||||
env.MyProgram("simple.exe", "simple.c")
|
||||
env.Object("simple.o", "simple.c")
|
||||
File.open("two.c", "wb") do |fh|
|
||||
fh.puts <<-EOF
|
||||
void two(void)
|
||||
{
|
||||
}
|
||||
EOF
|
||||
end
|
||||
env.MyProgram("simple.exe", ["simple.o", "two.c"])
|
||||
end
|
||||
|
@ -647,10 +647,21 @@ EOF
|
||||
expect(result.stderr).to eq ""
|
||||
expect(lines(result.stdout)).to eq [
|
||||
"CC simple.o",
|
||||
"CC two.o",
|
||||
"MyProgram simple.exe",
|
||||
]
|
||||
end
|
||||
|
||||
it "prints the failed build command for a threaded builder when called via Environment#run_builder without delayed execution" do
|
||||
test_dir("simple")
|
||||
File.open("simple.c", "wb") do |fh|
|
||||
fh.write("FOOBAR")
|
||||
end
|
||||
result = run_test(rsconsfile: "run_builder.rb")
|
||||
expect(result.stderr).to match /Failed to build/
|
||||
expect(result.stdout).to match /Failed command was: gcc/
|
||||
end
|
||||
|
||||
context "Directory builder" do
|
||||
it "creates the requested directory" do
|
||||
test_dir("simple")
|
||||
|
Loading…
x
Reference in New Issue
Block a user