blob: d26dbcb12a57a7f7594a05e1a06e84803c93efbd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#!/usr/bin/bash
# Run all available system-tests.
# Note: Needs a bash shell to run
#
# Expected environment variables to be set:
# C8YPASS : Cumulocity password
# C8YUSERNAME : Cumolocity username
# C8YTENANT : Cumolocity tenant
# C8YDEVICE : The device name
# TEBASEDIR : Base directory for the Thin-Edge repo
# EXAMPLEDIR : The direcory of the sawtooth example
# C8YURL : e.g. https://thin-edge-io.eu-latest.cumulocity.com
# Adding sbin seems to be necessary for non Raspberry P OS systems as Debian or Ubuntu
PATH=$PATH:/usr/sbin
echo "Disconnect old bridge"
# Disconnect - may fail if not there
sudo tedge disconnect c8y
# From now on exit if a command exits with a non-zero status.
# Commands above are allowed to fail
set -e
cd $TEBASEDIR
# Check if clients are installed
dpkg -s mosquitto-clients
# Run all PySys tests
python3 -m venv ~/env-pysys
source ~/env-pysys/bin/activate
pip3 install -r tests/requirements.txt
export C8YDEVICEID=$(python3 ./ci/find_device_id.py --tenant $C8YTENANT --user $C8YUSERNAME --device $C8YDEVICE --url $C8YURL)
cd tests/PySys/
set +e
pysys.py run --exclude analytics --record -v DEBUG
set -e
deactivate
mv __pysys_junit_xml pysys_junit_xml_all
|