mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 1003405 - Mozbase unit test moznetwork/tests/test.py failures on linux slaves when run from test package. r=dminor
This commit is contained in:
parent
518e9eb55f
commit
4a7bd0d2be
@ -3,6 +3,7 @@
|
||||
Unit-Tests for moznetwork
|
||||
"""
|
||||
|
||||
import os
|
||||
import mock
|
||||
import mozinfo
|
||||
import moznetwork
|
||||
@ -29,7 +30,13 @@ def verify_ip_in_list(ip):
|
||||
"(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)")
|
||||
|
||||
if mozinfo.isLinux or mozinfo.isMac or mozinfo.isBsd:
|
||||
args = ["ifconfig"]
|
||||
# if "/sbin/ifconfig" exist, use it because it may not be in the
|
||||
# PATH (at least on some linux platforms)
|
||||
if os.path.isfile('/sbin/ifconfig') and os.access('/sbin/ifconfig',
|
||||
os.X_OK):
|
||||
args = ['/sbin/ifconfig']
|
||||
else:
|
||||
args = ["ifconfig"]
|
||||
|
||||
if mozinfo.isWin:
|
||||
args = ["ipconfig"]
|
||||
|
Loading…
Reference in New Issue
Block a user