platform_checks.py: Disable check on non edison platforms
Signed-off-by: Nicola Lunghi <nicola.lunghi@emutex.com> Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
committed by
Brendan Le Foll
parent
5e34a5cd3b
commit
2a1590fdf1
@@ -29,6 +29,11 @@ import unittest as u
|
|||||||
|
|
||||||
@u.skipIf(m.getPlatformName() == "Unknown platform", "Not valid platform loaded")
|
@u.skipIf(m.getPlatformName() == "Unknown platform", "Not valid platform loaded")
|
||||||
class PlatformChecks(u.TestCase):
|
class PlatformChecks(u.TestCase):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@u.skipUnless(m.getPlatformName() == "Intel Edison", "Only for edison Board")
|
||||||
|
class PlatformChecksEdison(u.TestCase):
|
||||||
def test_mraa_check_platform_no_of_pins(self):
|
def test_mraa_check_platform_no_of_pins(self):
|
||||||
pinCount = m.getPinCount()
|
pinCount = m.getPinCount()
|
||||||
self.assertEqual(pinCount, 20, "Wrong number. of pins. Check platform ...")
|
self.assertEqual(pinCount, 20, "Wrong number. of pins. Check platform ...")
|
||||||
@@ -41,7 +46,7 @@ class PlatformChecks(u.TestCase):
|
|||||||
def test_mraa_check_platform_ADC_resolution(self):
|
def test_mraa_check_platform_ADC_resolution(self):
|
||||||
self.p_ADC_res = m.adcSupportedBits()
|
self.p_ADC_res = m.adcSupportedBits()
|
||||||
print("Platform ADC resolution is: " + str(self.p_ADC_res) + " bits")
|
print("Platform ADC resolution is: " + str(self.p_ADC_res) + " bits")
|
||||||
self.assertEqual(self.p_ADC_res, 10, "Wrong ADC suported resolution. Check platform ...")
|
self.assertEqual(self.p_ADC_res, 10, "Wrong ADC supported resolution. Check platform ...")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
u.main()
|
u.main()
|
||||||
|
|||||||
Reference in New Issue
Block a user