Skip to content

Commit

Permalink
Merge pull request #85 from DieterReuter/fix-wifi-tests-3bplus
Browse files Browse the repository at this point in the history
Fix WiFi integration tests for 3B/3B+ boards
  • Loading branch information
DieterReuter committed Apr 28, 2018
2 parents 1bd1c31 + eb5a38c commit b1ca1f0
Showing 1 changed file with 39 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
cpu_info = command('cat /proc/cpuinfo').stdout

if cpu_info.include?('a02082') or cpu_info.include?('a22082')
describe "RPi 3: built-in wifi works" do
describe "RPi 3B: built-in wifi works" do
describe command('ifconfig -a') do
its(:stdout) { should contain /wlan0/ }
end
Expand All @@ -15,7 +15,7 @@
end
end

describe "RPi 3: built-in wifi firmware is installed" do
describe "RPi 3B: built-in wifi firmware is installed" do
describe file('/lib/firmware/brcm/brcmfmac43430-sdio.bin') do
it { should be_file }
it { should be_mode 644 }
Expand All @@ -29,14 +29,46 @@
end
end

describe "RPi 3: built-in wifi works" do
describe "RPi 3B: built-in wifi works" do
describe command('ifconfig -a') do
its(:stdout) { should contain /wlan0/ }
end

describe command('ethtool -i wlan0') do
its(:stdout) { should contain /driver: brcmfmac/ }
its(:stdout) { should contain /version: 7.45.98.38/ }
its(:stdout) { should contain /firmware-version: 01-e58d219f/ }
wifi_info = command('ethtool -i wlan0').stdout
if wifi_info.include?('version: 7.45.98.38')
describe command('ethtool -i wlan0') do
its(:stdout) { should contain /driver: brcmfmac/ }
its(:stdout) { should contain /version: 7.45.98.38/ }
its(:stdout) { should contain /firmware-version: 01-e58d219f/ }
end
end
end

describe "RPi 3B+: built-in wifi firmware is installed" do
describe file('/lib/firmware/brcm/brcmfmac43455-sdio.bin') do
it { should be_file }
it { should be_mode 644 }
it { should be_owned_by 'root' }
end

describe file('/lib/firmware/brcm/brcmfmac43455-sdio.txt') do
it { should be_file }
it { should be_mode 644 }
it { should be_owned_by 'root' }
end
end

describe "RPi 3B+: built-in wifi works" do
describe command('ifconfig -a') do
its(:stdout) { should contain /wlan0/ }
end

wifi_info = command('ethtool -i wlan0').stdout
if wifi_info.include?('version: 7.45.154')
describe command('ethtool -i wlan0') do
its(:stdout) { should contain /driver: brcmfmac/ }
its(:stdout) { should contain /version: 7.45.154/ }
its(:stdout) { should contain /firmware-version: 01-4fbe0b04/ }
end
end
end

0 comments on commit b1ca1f0

Please sign in to comment.