Skip to content

Commit

Permalink
Added tests for Solaris platform
Browse files Browse the repository at this point in the history
  • Loading branch information
brianewell authored and PragTob committed Dec 23, 2023
1 parent d045c21 commit 46f27c5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/benchee/system_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,20 @@ defmodule Benchee.SystemTest do
output = parse_cpu_for(:Linux, raw_output)
assert output == "Unrecognized processor"
end

@solaris_kstat_brand_excerpt """
cpu_info:0:cpu_info0:brand Intel(r) Xeon(r) CPU E5-2678 v3 @ 2.50GHz
"""
test "for :Solaris handles some normal intel output" do
output = parse_cpu_for(:Solaris, @solaris_kstat_brand_excerpt)
assert output =~ "Intel(r) Xeon(r) CPU E5-2678 v3 @ 2.50GHz"
end

test "for :Solaris handles unknown architectures" do
raw_output = "Bender Bending Rodriguez"
output = parse_cpu_for(:Solaris, raw_output)
assert output == "Unrecognized processor"
end
end

test ".available_memory returns the available memory on the computer" do
Expand Down

0 comments on commit 46f27c5

Please sign in to comment.