verbose mode should list operations and their execution times - close #103
This commit is contained in:
1 parent
785e8e18fd
commit
59a3cb4e10
4 files changed
+86
-27
No files matched your search
@@ -2089,6 +2089,16 @@ EOF
|
||||
expect(result.stderr).to eq ""
|
||||
expect(result.stdout).to match /gcc.*-o.*simple/
|
||||
end
|
||||
|
||||
it "prints operation start time" do
|
||||
test_dir("simple")
|
||||
result = run_rscons(rscons_args: %w[-v])
|
||||
expect(result.stderr).to eq ""
|
||||
expect(result.stdout).to match /Starting 'configure' at/
|
||||
expect(result.stdout).to match /Starting 'build' at/
|
||||
expect(result.stdout).to match /'build' complete at/
|
||||
expect(result.stdout).to_not match /'configure' complete at/
|
||||
end
|
||||
end
|
||||
|
||||
context "direct mode" do
|
||||
|
||||
@@ -151,6 +151,20 @@ EOF
|
||||
end
|
||||
end
|
||||
|
||||
describe ".format_elapsed_time" do
|
||||
it "includes minutes when hours is nonzero and minutes is zero" do
|
||||
expect(Util.format_elapsed_time(60 * 60 + 4)).to eq "1h 0m 4s"
|
||||
end
|
||||
|
||||
it "only includes minutes and seconds when hours is zero and minutes is nonzero" do
|
||||
expect(Util.format_elapsed_time(3 * 60 + 33)).to eq "3m 33s"
|
||||
end
|
||||
|
||||
it "only includes seconds when hours and minutes are zero" do
|
||||
expect(Util.format_elapsed_time(7.84)).to eq "8s"
|
||||
end
|
||||
end
|
||||
|
||||
describe ".make_relative_path" do
|
||||
context "when passed a relative path" do
|
||||
it "returns the path itself" do
|
||||
|
||||
Reference in new issue
Block a user