From d0f3cefc7e2c52d7352b222e0851f4beec5fe12e Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Tue, 19 Jan 2021 16:24:53 +0100 Subject: [PATCH] tests/driver_apds99xx*: move to test-with-config --- .../driver_apds99xx/{tests => tests-with-config}/01-run.py | 7 ++----- .../{tests => tests-with-config}/01-run.py | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) rename tests/driver_apds99xx/{tests => tests-with-config}/01-run.py (80%) rename tests/driver_apds99xx_full/{tests => tests-with-config}/01-run.py (79%) diff --git a/tests/driver_apds99xx/tests/01-run.py b/tests/driver_apds99xx/tests-with-config/01-run.py similarity index 80% rename from tests/driver_apds99xx/tests/01-run.py rename to tests/driver_apds99xx/tests-with-config/01-run.py index a8cf62fa38..be7bcf3740 100755 --- a/tests/driver_apds99xx/tests/01-run.py +++ b/tests/driver_apds99xx/tests-with-config/01-run.py @@ -11,11 +11,8 @@ from testrunner import run def testfunc(child): - child.expect('Initializing APDS99XX sensor') - i = child.expect(['[OK]', '[Failed]']) - if i == 1: - print('FAILED') - return + child.expect_exact('Initializing APDS99XX sensor') + child.expect_exact('[OK]') child.expect(r'proximity = \d+ \[cnts\]') child.expect(r'ambient = \d+ \[cnts\]') child.expect([r'red = \d+ \[cnts\], green = \d+ \[cnts\], blue = \d+ \[cnts\]', diff --git a/tests/driver_apds99xx_full/tests/01-run.py b/tests/driver_apds99xx_full/tests-with-config/01-run.py similarity index 79% rename from tests/driver_apds99xx_full/tests/01-run.py rename to tests/driver_apds99xx_full/tests-with-config/01-run.py index fd84d416cf..429b8920b8 100755 --- a/tests/driver_apds99xx_full/tests/01-run.py +++ b/tests/driver_apds99xx_full/tests-with-config/01-run.py @@ -11,11 +11,8 @@ from testrunner import run def testfunc(child): - child.expect('Initializing APDS99XX sensor') - i = child.expect(['[OK]', '[Failed]']) - if i == 1: - print('FAILED') - return + child.expect_exact('Initializing APDS99XX sensor') + child.expect_exact('[OK]') child.expect(r'ambient = \d+ \[cnts\]') child.expect([r'red = \d+ \[cnts\], green = \d+ \[cnts\], blue = \d+ \[cnts\]', r'illuminance = %d [lux]'])