From 2a1590fdf14edd1a5dd60fe9775440b06596531a Mon Sep 17 00:00:00 2001 From: "Lunghi@Emutex" Date: Thu, 23 Mar 2017 16:01:58 +0000 Subject: [PATCH] platform_checks.py: Disable check on non edison platforms Signed-off-by: Nicola Lunghi Signed-off-by: Brendan Le Foll --- tests/platform_checks.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/platform_checks.py b/tests/platform_checks.py index 0ffec4d..56850af 100755 --- a/tests/platform_checks.py +++ b/tests/platform_checks.py @@ -29,6 +29,11 @@ import unittest as u @u.skipIf(m.getPlatformName() == "Unknown platform", "Not valid platform loaded") 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): pinCount = m.getPinCount() 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): self.p_ADC_res = m.adcSupportedBits() 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__": u.main()