Skip to content

Commit

Permalink
Merge pull request #15372 from aabadie/pr/tests/driver_bme680_script_enh
Browse files Browse the repository at this point in the history
tests/driver_bme680: improve automated test script
  • Loading branch information
aabadie authored Nov 4, 2020
2 parents e2b3923 + 85d6e27 commit 0f0666e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions tests/driver_bme680/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ int main(void)
printf("Initialize BME680 sensor %u ... ", i);
if (bme680_init(&dev[i], &bme680_params[i]) != BME680_OK) {
puts("failed");
return -1;
}
else {
puts("OK");
Expand Down
11 changes: 5 additions & 6 deletions tests/driver_bme680/tests/01-run.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ def testfunc(child):
if i == 1:
print('FAILED')
return
child.expect('\[bme680\]: dev=0, ')
child.expect(r'T = \d+.\d+ degC, ')
child.expect(r'P = \d+ Pa, ')
child.expect(r'H = \d+.\d+ \%, ')
child.expect(r'G = \d+ ohms')
child.expect(r'\[bme680\]: dev=0, '
r'T = \d+.\d+ degC, '
r'P = \d+ Pa, '
r'H = \d+.\d+ \%, '
r'G = \d+ ohms\r\n')
print('SUCCESS')
return


if __name__ == "__main__":
Expand Down

0 comments on commit 0f0666e

Please sign in to comment.