fully parallelize the Command builder
This commit is contained in:
1 parent
80a80a7cb0
commit
68468b6422
4 files changed
+40
-26
No files matched your search
@@ -706,6 +706,21 @@ EOF
|
||||
end
|
||||
end
|
||||
|
||||
context "Command builder" do
|
||||
it "allows executing an arbitrary command" do
|
||||
test_dir('simple')
|
||||
|
||||
result = run_test(rsconsfile: "command_builder.rb")
|
||||
expect(result.stderr).to eq ""
|
||||
expect(lines(result.stdout)).to eq ["BuildIt simple.exe"]
|
||||
expect(`./simple.exe`).to eq "This is a simple C program\n"
|
||||
|
||||
result = run_test(rsconsfile: "command_builder.rb")
|
||||
expect(result.stderr).to eq ""
|
||||
expect(result.stdout).to eq ""
|
||||
end
|
||||
end
|
||||
|
||||
context "Directory builder" do
|
||||
it "creates the requested directory" do
|
||||
test_dir("simple")
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
module Rscons
|
||||
module Builders
|
||||
describe Command do
|
||||
|
||||
let(:command) { ['pandoc', '-fmarkdown', '-thtml', '-o${_TARGET}', '${_SOURCES}'] }
|
||||
let(:env) {Environment.new}
|
||||
subject {Command.new}
|
||||
|
||||
it "invokes the command to build the target" do
|
||||
expected_cmd = ['pandoc', '-fmarkdown', '-thtml', '-ofoo.html', 'foo.md']
|
||||
expect(subject).to receive(:standard_build).with("PANDOC foo.html", "foo.html", expected_cmd, ["foo.md"], env, :cache)
|
||||
subject.run("foo.html", ["foo.md"], :cache, env,
|
||||
"CMD" => command, "CMD_DESC" => "PANDOC")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user