aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdi Feschiyan <efeschiyan@pm.me>2020-08-31 10:35:02 +0300
committerEdi Feschiyan <efeschiyan@pm.me>2020-08-31 10:35:02 +0300
commit4a763058a63b6d1574958847898fe22a6cc0a62c (patch)
tree7a32dd3a447c791f585b61ac6598ffafb2b03193
parent93c5a477ac3c8b2505255f9ebfba18e11c2ea3db (diff)
parentb8db712d08eb888c6d41826b5fb2fd7bb2e18d66 (diff)
Merge branch 'master' of gitlab.com:konsulko/internal/pyagl into master
 Conflicts:  pyagl/tests/test_audiomixer.py  pyagl/tests/test_bluetooth.py
-rw-r--r--LICENSE54
-rw-r--r--README.md48
-rw-r--r--pyagl/conftest.py15
-rw-r--r--pyagl/services/audiomixer.py15
-rw-r--r--pyagl/services/base.py15
-rw-r--r--pyagl/services/bluetooth.py15
-rw-r--r--pyagl/services/bluetooth_map.py15
-rw-r--r--pyagl/services/bluetooth_pbap.py15
-rw-r--r--pyagl/services/can.py15
-rw-r--r--pyagl/services/geoclue.py15
-rw-r--r--pyagl/services/gps.py15
-rw-r--r--pyagl/services/homescreen.py15
-rw-r--r--pyagl/services/mediaplayer.py15
-rw-r--r--pyagl/services/mediascanner.py15
-rw-r--r--pyagl/services/network.py15
-rw-r--r--pyagl/services/nfc.py15
-rw-r--r--pyagl/services/signal_composer.py15
-rw-r--r--pyagl/services/taskmanager.py17
-rw-r--r--pyagl/services/weather.py15
-rw-r--r--pyagl/tests/test_audiomixer.py33
-rw-r--r--pyagl/tests/test_bluetooth.py17
-rw-r--r--pyagl/tests/test_bluetooth_map.py15
-rw-r--r--pyagl/tests/test_bluetooth_pbap.py15
-rw-r--r--pyagl/tests/test_geoclue.py17
-rw-r--r--pyagl/tests/test_gps.py17
-rw-r--r--pyagl/tests/test_homescreen.py15
-rw-r--r--pyagl/tests/test_mediascanner.py15
-rw-r--r--pyagl/tests/test_network.py17
-rw-r--r--pyagl/tests/test_nfc.py15
-rw-r--r--pyagl/tests/test_signal_composer.py17
-rw-r--r--pyagl/tests/test_weather.py15
-rw-r--r--setup.py15
32 files changed, 552 insertions, 30 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..31c692a
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,54 @@
+Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+ You must give any other recipients of the Work or Derivative Works a copy of this License; and
+ You must cause any modified files to carry prominent notices stating that You changed the files; and
+ You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+ If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
diff --git a/README.md b/README.md
index 95f4f1f..d81cf82 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-#pyagl
+#pyagl
## Basic info
Python library with bindings and tests for Automotive Grade Linux services
@@ -67,24 +67,36 @@ Creating a new modules and tests can be done with a few steps:
3. cookiecutter -f ../templates/
## Running the tests
-The tests can be run either directly from the cloned repository or the default Python site-packages directory per system default or virtualenv:
-* for example on Debian systems the default site packages dir should be in /usr/local/lib/python3.8/dist-packages/pyagl/tests
-* otherwise for virtualenv - <virtualenv_dir>/lib/python3.8/site-packages/pyagl/tests
+The tests can be run on target if installed, directly from the cloned repository, or if installed locally on a development host, from the default Python site-packages directory or a configured virtualenv. On target the tests will be in /usr/lib/python3.8/site-packages/pyagl/tests. If installed locally on a development machine:
+* on Debian systems the default site packages directory should be in /usr/local/lib/python3.8/dist-packages/pyagl/tests
+* for virtualenv, the directory will be <virtualenv_dir>/lib/python3.8/site-packages/pyagl/tests
-pytest
-
-Running the tests rests on the assumptions that the following environment variables will be exported:
-All tests require AGL_TGT_IP and will look for AGL_TGT_PORT
-* AGL_TGT_IP - required - pointing at an IP Address with AGL instance
+### Invoking pytest
+The tests may be run with `pytest` by passing it the tests directory:
+```
+pytest <tests directory>
+```
+On target, the command would be:
+```
+pytest /usr/lib/python3.8/site-packages/pyagl/tests
+```
+Note that the tests have been labelled with `pytest` markers to allow selecting or deselecting tests with the `pytest` '-k' option. Each binding's test are marked with the name of the binding, with additional markers that include:
+* regular - all regular verb tests with expected values
+* hwrequired - verb tests requiring available physical hardware
+
+### Test Configuration
+ Running the tests remotely involves the export of the following environment variables:
+* AGL_TGT_IP - required - point at an IP Address with AGL instance
* AGL_TGT_PORT - optional - if not exported, the library wil connect to the IP address via ssh to find out the service's listening TCP port
-* AGL_BTMAP_RECIPIENT - optional - When running Bluetooth MAP tests, this would be used as phone number to write text messages to
-* AGL_BTMAP_TEXT - optional - When running Bluetooth MAP tests, messages will be composed with this text
-* AGL_PBAP_PHONENUM - optional - When running Bluetooth PBAP tests, this phone number will be used to .search()
-* AGL_PBAP_VCF - optional - Bluetooh PBAP tests - query a contact entry out of the phonebook
-* AGL_BT_TEST_ADDR - optional - Bluetooth tests - pair/connect/disconnect with an actual Bluetooth device(phone)'s address
-it should have the DBus address style as "dev_00_01_02_03_04_05" instead regular colon-separated MAC address
-Should some of the optional variables be omitted, the fixtures and their dependent tests should fail gracefully
- with "XFAIL"(expected fail) or "SKIP" result.
+When running tests on target, AGL_TGT_IP is not required, as the tests will assume the local host is the target.
+
+Some specific tests are dependent on additional configuration via the following environment variables:
+* AGL_AVAILABLE_INTERFACES - optional, specify which of ethernet, wifi, and bluetooth interfaces are available. The value is a comma separated list, with a default value of "ethernet,wifi,bluetooth".
+* AGL_BTMAP_RECIPIENT - optional, when running Bluetooth MAP tests, this would be used as phone number to write text messages to.
+* AGL_BTMAP_TEXT - optional, when running Bluetooth MAP tests, messages will be composed with this text.
+* AGL_PBAP_PHONENUM - optional , when running Bluetooth PBAP tests, this phone number will be used to .search().
+* AGL_PBAP_VCF - optional, for the Bluetooh PBAP tests query a contact entry out of the phonebook.
+* AGL_BT_TEST_ADDR - optional, for the Bluetooth tests pair/connect/disconnect with an actual Bluetooth device(phone)'s address . The address should have the DBus address style as "dev_00_01_02_03_04_05" instead of a regular colon-separated MAC address.
-There are tests that are dependent on other tests, therefore if the dependent tests fail, the whole test chain will be skipped. \ No newline at end of file
+Should some of the optional variables be omitted, the fixtures and their dependent tests should fail gracefully with a "XFAIL" (expected fail) or "SKIP" result. There are tests that are dependent on other tests, therefore if the dependent tests fail, the whole test chain will be skipped.
diff --git a/pyagl/conftest.py b/pyagl/conftest.py
index 25cdb02..6002de7 100644
--- a/pyagl/conftest.py
+++ b/pyagl/conftest.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
import pytest
diff --git a/pyagl/services/audiomixer.py b/pyagl/services/audiomixer.py
index 9cb1100..6e447b7 100644
--- a/pyagl/services/audiomixer.py
+++ b/pyagl/services/audiomixer.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
from pyagl.services.base import AGLBaseService, AFBResponse
import asyncio
import os
diff --git a/pyagl/services/base.py b/pyagl/services/base.py
index 17dddb8..0ffbcde 100644
--- a/pyagl/services/base.py
+++ b/pyagl/services/base.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
from subprocess import check_output
from json import JSONDecodeError
from parse import Result, parse
diff --git a/pyagl/services/bluetooth.py b/pyagl/services/bluetooth.py
index 309ff93..e5412cf 100644
--- a/pyagl/services/bluetooth.py
+++ b/pyagl/services/bluetooth.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
from pyagl.services.base import AGLBaseService, AFBResponse
import asyncio
import os
diff --git a/pyagl/services/bluetooth_map.py b/pyagl/services/bluetooth_map.py
index e434576..8968842 100644
--- a/pyagl/services/bluetooth_map.py
+++ b/pyagl/services/bluetooth_map.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
from pyagl.services.base import AGLBaseService, AFBResponse
import asyncio
import os
diff --git a/pyagl/services/bluetooth_pbap.py b/pyagl/services/bluetooth_pbap.py
index 9ac0dea..c437148 100644
--- a/pyagl/services/bluetooth_pbap.py
+++ b/pyagl/services/bluetooth_pbap.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
from pyagl.services.base import AGLBaseService, AFBResponse
import json
from pprint import pprint
diff --git a/pyagl/services/can.py b/pyagl/services/can.py
index 7e8df9a..e22b840 100644
--- a/pyagl/services/can.py
+++ b/pyagl/services/can.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
from pyagl.services.base import AGLBaseService, AFBResponse
import asyncio
import json
diff --git a/pyagl/services/geoclue.py b/pyagl/services/geoclue.py
index 5e5b443..a0a26dc 100644
--- a/pyagl/services/geoclue.py
+++ b/pyagl/services/geoclue.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
from pyagl.services.base import AGLBaseService, AFBResponse
import asyncio
import os
diff --git a/pyagl/services/gps.py b/pyagl/services/gps.py
index e91e9df..e4cd923 100644
--- a/pyagl/services/gps.py
+++ b/pyagl/services/gps.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
from pyagl.services.base import AGLBaseService, AFBResponse
import asyncio
import os
diff --git a/pyagl/services/homescreen.py b/pyagl/services/homescreen.py
index 4af47d9..13275a0 100644
--- a/pyagl/services/homescreen.py
+++ b/pyagl/services/homescreen.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
from pyagl.services.base import AGLBaseService, AFBResponse
import asyncio
import os
diff --git a/pyagl/services/mediaplayer.py b/pyagl/services/mediaplayer.py
index 2157e02..d1e9137 100644
--- a/pyagl/services/mediaplayer.py
+++ b/pyagl/services/mediaplayer.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
from pyagl.services.base import AGLBaseService, AFBResponse
from typing import Union
import logging
diff --git a/pyagl/services/mediascanner.py b/pyagl/services/mediascanner.py
index 615b5a9..e3016ec 100644
--- a/pyagl/services/mediascanner.py
+++ b/pyagl/services/mediascanner.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
from pyagl.services.base import AGLBaseService, AFBResponse
import asyncio
import os
diff --git a/pyagl/services/network.py b/pyagl/services/network.py
index 8aa6f82..1c953b3 100644
--- a/pyagl/services/network.py
+++ b/pyagl/services/network.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
from pyagl.services.base import AGLBaseService, AFBResponse
import asyncio
import os
diff --git a/pyagl/services/nfc.py b/pyagl/services/nfc.py
index 8e333a1..4617afc 100644
--- a/pyagl/services/nfc.py
+++ b/pyagl/services/nfc.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
from pyagl.services.base import AGLBaseService, AFBResponse
import asyncio
diff --git a/pyagl/services/signal_composer.py b/pyagl/services/signal_composer.py
index d6b90cc..3d0fa71 100644
--- a/pyagl/services/signal_composer.py
+++ b/pyagl/services/signal_composer.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
from pyagl.services.base import AGLBaseService, AFBResponse
import asyncio
import os
diff --git a/pyagl/services/taskmanager.py b/pyagl/services/taskmanager.py
index 96f98d2..bdeb86d 100644
--- a/pyagl/services/taskmanager.py
+++ b/pyagl/services/taskmanager.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
from pyagl.services.base import AGLBaseService, AFBResponse
import asyncio
import os
@@ -8,4 +23,4 @@ class TaskManagerService(AGLBaseService):
parser = AGLBaseService.getparser()
def __init__(self, ip, port=None, service='agl-service-taskmanager'):
- super().__init__(api='taskmanager', ip=ip, port=port, service=service) \ No newline at end of file
+ super().__init__(api='taskmanager', ip=ip, port=port, service=service)
diff --git a/pyagl/services/weather.py b/pyagl/services/weather.py
index c5ce95c..e5be8c0 100644
--- a/pyagl/services/weather.py
+++ b/pyagl/services/weather.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
from pyagl.services.base import AGLBaseService, AFBResponse
import asyncio
import json
diff --git a/pyagl/tests/test_audiomixer.py b/pyagl/tests/test_audiomixer.py
index 5479521..ce13530 100644
--- a/pyagl/tests/test_audiomixer.py
+++ b/pyagl/tests/test_audiomixer.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
import asyncio
import os
import pytest
@@ -34,7 +49,8 @@ async def test_list_controls(event_loop, service: AMS):
assert resp.status == 'success'
-@pytest.mark.regular
+@pytest.mark.hwrequired
+@pytest.mark.audiomixer
async def test_volume_verb(event_loop, service: AMS):
msgid = await service.volume()
resp = await service.afbresponse()
@@ -43,7 +59,8 @@ async def test_volume_verb(event_loop, service: AMS):
assert resp.status == 'success'
-@pytest.mark.regular
+@pytest.mark.hwrequired
+@pytest.mark.audiomixer
async def test_set_volume0(event_loop, service: AMS):
msgid = await service.volume(value=0)
resp = await service.afbresponse()
@@ -52,7 +69,8 @@ async def test_set_volume0(event_loop, service: AMS):
assert resp.status == 'success'
-@pytest.mark.regular
+@pytest.mark.hwrequired
+@pytest.mark.audiomixer
async def test_set_maxvolume(event_loop, service: AMS):
msgid = await service.volume(value=1)
resp = await service.afbresponse()
@@ -61,7 +79,8 @@ async def test_set_maxvolume(event_loop, service: AMS):
assert resp.status == 'success'
-@pytest.mark.regular
+@pytest.mark.hwrequired
+@pytest.mark.audiomixer
async def test_get_mute(event_loop, service: AMS):
msgid = await service.mute()
resp = await service.afbresponse()
@@ -70,7 +89,8 @@ async def test_get_mute(event_loop, service: AMS):
assert resp.status == 'success'
-@pytest.mark.regular
+@pytest.mark.hwrequired
+@pytest.mark.audiomixer
async def test_set_mute(event_loop, service: AMS):
msgid = await service.mute(value=1)
resp = await service.afbresponse()
@@ -79,7 +99,8 @@ async def test_set_mute(event_loop, service: AMS):
assert resp.status == 'success'
-@pytest.mark.regular
+@pytest.mark.hwrequired
+@pytest.mark.audiomixer
async def test_set_unmute(event_loop, service: AMS):
msgid = await service.mute(value=0)
resp = await service.afbresponse()
diff --git a/pyagl/tests/test_bluetooth.py b/pyagl/tests/test_bluetooth.py
index 78f1d21..1af2dda 100644
--- a/pyagl/tests/test_bluetooth.py
+++ b/pyagl/tests/test_bluetooth.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
import asyncio
import os
import pytest
@@ -118,7 +133,7 @@ async def test_has_single_adapter(event_loop, service: BTS):
f'Detected {len(resp.data["adapters"])} adapters. Multiple adapters may also affect testing'
-@pytest.mark.regular
+@pytest.mark.hwrequired
@pytest.mark.dependency(depends=['test_default_adapter'])
async def test_adapter_state(event_loop, service: BTS):
msgid = await service.adapter_state('hci0')
diff --git a/pyagl/tests/test_bluetooth_map.py b/pyagl/tests/test_bluetooth_map.py
index f750347..fee0916 100644
--- a/pyagl/tests/test_bluetooth_map.py
+++ b/pyagl/tests/test_bluetooth_map.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
import asyncio
import os
import pytest
diff --git a/pyagl/tests/test_bluetooth_pbap.py b/pyagl/tests/test_bluetooth_pbap.py
index c76a15f..b70c914 100644
--- a/pyagl/tests/test_bluetooth_pbap.py
+++ b/pyagl/tests/test_bluetooth_pbap.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
import asyncio
import os
import pytest
diff --git a/pyagl/tests/test_geoclue.py b/pyagl/tests/test_geoclue.py
index 7a1ec23..6bc6cad 100644
--- a/pyagl/tests/test_geoclue.py
+++ b/pyagl/tests/test_geoclue.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
import asyncio
import os
import pytest
@@ -46,4 +61,4 @@ async def test_subscribe(event_loop, service: gcs):
async def test_unsubscribe(event_loop, service: gcs):
msgid = await service.unsubscribe()
resp = await service.afbresponse()
- assert resp.status == 'success' \ No newline at end of file
+ assert resp.status == 'success'
diff --git a/pyagl/tests/test_gps.py b/pyagl/tests/test_gps.py
index d9f0562..3f47684 100644
--- a/pyagl/tests/test_gps.py
+++ b/pyagl/tests/test_gps.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
import asyncio
import os
import pytest
@@ -101,4 +116,4 @@ async def test_unsubscribe(event_loop, service: GPS):
msgid = await service.unsubscribe('location')
resp = await service.afbresponse()
assert resp.msgid == msgid
- assert resp.status == 'success' \ No newline at end of file
+ assert resp.status == 'success'
diff --git a/pyagl/tests/test_homescreen.py b/pyagl/tests/test_homescreen.py
index 758feb3..35ffd0d 100644
--- a/pyagl/tests/test_homescreen.py
+++ b/pyagl/tests/test_homescreen.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
import asyncio
import os
import pytest
diff --git a/pyagl/tests/test_mediascanner.py b/pyagl/tests/test_mediascanner.py
index 2ca10cc..a4d57ee 100644
--- a/pyagl/tests/test_mediascanner.py
+++ b/pyagl/tests/test_mediascanner.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
import asyncio
import os
import pytest
diff --git a/pyagl/tests/test_network.py b/pyagl/tests/test_network.py
index 53653cf..2eb4ebc 100644
--- a/pyagl/tests/test_network.py
+++ b/pyagl/tests/test_network.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
import asyncio
import os
import pytest
@@ -25,7 +40,7 @@ async def service():
@pytest.fixture(scope='module')
def expected_available_techs():
- techs = os.environ.get('AGL_AVAILABLE_TECHS', 'wifi,ethernet,bluetooth').split(',')
+ techs = os.environ.get('AGL_AVAILABLE_INTERFACES', 'wifi,ethernet,bluetooth').split(',')
return techs
diff --git a/pyagl/tests/test_nfc.py b/pyagl/tests/test_nfc.py
index 4695295..d7b3334 100644
--- a/pyagl/tests/test_nfc.py
+++ b/pyagl/tests/test_nfc.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
import asyncio
import os
import pytest
diff --git a/pyagl/tests/test_signal_composer.py b/pyagl/tests/test_signal_composer.py
index 6dd872c..cafa052 100644
--- a/pyagl/tests/test_signal_composer.py
+++ b/pyagl/tests/test_signal_composer.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
import asyncio
import os
import pytest
@@ -71,4 +86,4 @@ async def test_subscribe(event_loop, service: scs):
async def test_unsubscribe(event_loop, service: scs):
msgid = await service.unsubscribe({'service': 'longitude'})
resp = await service.afbresponse()
- assert resp.status == 'success' \ No newline at end of file
+ assert resp.status == 'success'
diff --git a/pyagl/tests/test_weather.py b/pyagl/tests/test_weather.py
index c83a2fa..2c68152 100644
--- a/pyagl/tests/test_weather.py
+++ b/pyagl/tests/test_weather.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
import asyncio
import os
import pytest
diff --git a/setup.py b/setup.py
index 7b9b97d..7d8b53d 100644
--- a/setup.py
+++ b/setup.py
@@ -1,3 +1,18 @@
+# Copyright (C) 2020 Konsulko Group
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
import setuptools
with open("README.md", "r") as fh: