summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRina Fujino <18257209+rina23q@users.noreply.github.com>2022-07-27 11:47:51 +0200
committerGitHub <noreply@github.com>2022-07-27 11:47:51 +0200
commit7305240fbc3578441aaec1a41e7a3faa264c9efb (patch)
treec51296237bca84f90c5db30732d7932130ee1bed
parent8ab77c27571eb6680be4b43ff7670a6a08830ce0 (diff)
parent5708cc2222b8c5771c1799eedbae0cb1919d0296 (diff)
Merge pull request #1300 from rina23q/improve/1234/get-rid-of-system-tests-from-after-merge-workflow
Remove system pysys tests run from after-merge workflow
-rw-r--r--.github/workflows/ci_pipeline.yml163
-rwxr-xr-xci/ci_run_all_plugin_tests.sh61
-rwxr-xr-xci/ci_run_all_sm_tests.sh66
-rwxr-xr-xci/ci_run_all_tests.sh50
4 files changed, 0 insertions, 340 deletions
diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml
index ccd0e43d..7e3fda30 100644
--- a/.github/workflows/ci_pipeline.yml
+++ b/.github/workflows/ci_pipeline.yml
@@ -261,166 +261,3 @@ jobs:
# AZUREENDPOINT: ${{ secrets.AZUREENDPOINT }}
# AZUREEVENTHUB: ${{ secrets.AZUREEVENTHUB }}
# IOTHUBNAME: ${{ secrets.IOTHUBNAME }}
-
-#################################################################################
-
- system-test-offsite-matrix:
- strategy:
- matrix:
- rpi: [ m32sd10a, m32sd10b, m32sd10c, m32sd10d ]
- runs-on:
- - self-hosted
- - Linux
- - ARM
- - offsite_${{ matrix.rpi }}
- needs: install-and-use-rpi-matrix
-
- steps:
- - name: Checkout
- uses: actions/checkout@v3
-
- - name: Run all Tests
- run: bash ./ci/ci_run_all_tests.sh
- continue-on-error: true
- if: true
- env:
- C8YPASS: ${{ secrets.SECRET_C8YPASS }}
- C8YUSERNAME: ${{ secrets.SECRET_C8YUSERNAME }}
- C8YDEVICE: ${{ matrix.rpi }}
- C8YTENANT: ${{ secrets.SECRET_C8YTENANT }}
- C8YURL: https://thin-edge-io.eu-latest.cumulocity.com
- TEBASEDIR: /home/pi/actions-runner/_work/thin-edge.io/thin-edge.io/
- EXAMPLEDIR: /home/pi/examples
-
- - name: Run all plugin tests
- run: bash ./ci/ci_run_all_plugin_tests.sh
- continue-on-error: true
- if: true
- env:
- C8YPASS: ${{ secrets.SECRET_C8YPASS }}
- C8YUSERNAME: ${{ secrets.SECRET_C8YUSERNAME }}
- C8YDEVICE: ${{ matrix.rpi }}
- C8YTENANT: ${{ secrets.SECRET_C8YTENANT }}
- TEBASEDIR: /home/pi/actions-runner/_work/thin-edge.io/thin-edge.io/
- EXAMPLEDIR: /home/pi/examples
- C8YURL: https://thin-edge-io.eu-latest.cumulocity.com
-
- - name: Run all sm tests
- run: bash ./ci/ci_run_all_sm_tests.sh
- continue-on-error: true
- if: true
- env:
- C8YPASS: ${{ secrets.SECRET_C8YPASS }}
- C8YUSERNAME: ${{ secrets.SECRET_C8YUSERNAME }}
- C8YDEVICE: ${{ matrix.rpi }}
- C8YTENANT: ${{ secrets.SECRET_C8YTENANT }}
- TEBASEDIR: /home/pi/actions-runner/_work/thin-edge.io/thin-edge.io/
- EXAMPLEDIR: /home/pi/examples
- C8YURL: https://thin-edge-io.eu-latest.cumulocity.com
-
- - name: Run all statistics tests
- run: bash ./ci/ci_run_statistics.sh
- continue-on-error: true
- if: true
- env:
- C8YPASS: ${{ secrets.SECRET_C8YPASS }}
- C8YUSERNAME: ${{ secrets.SECRET_C8YUSERNAME }}
- C8YDEVICE: ${{ matrix.rpi }}
- C8YTENANT: ${{ secrets.SECRET_C8YTENANT }}
- C8YURL: https://thin-edge-io.eu-latest.cumulocity.com
- TEBASEDIR: /home/pi/actions-runner/_work/thin-edge.io/thin-edge.io/
- EXAMPLEDIR: /home/pi/examples
-
- - name: Upload results as zip
- # https://github.com/marketplace/actions/upload-a-build-artifact
- uses: actions/upload-artifact@v3
- with:
- name: results_pysys_offsite_${{ matrix.rpi }}
- path: tests/
-
-#############################################################################
-
- system-test-postprocessing:
- runs-on: Ubuntu-20.04
- needs: system-test-offsite-matrix
-
- steps:
- - name: Checkout
- uses: actions/checkout@v3
-
- # Trigger repo dispatch here.
- # This is here a limitation of the amount of workflows
- # that trigger each other (GitHub Bug).
- # It would be nicer to use the postprocess trigger instead
-
-# Disabled until analytics VM is available
-#
-# - name: Repository Dispatch
-# uses: peter-evans/repository-dispatch@v1
-# with:
-# token: ${{ secrets.SECRET_THEGHTOKEN }}
-# event-type: postprocess
-# repository: abelikt/thin-edge.io_analytics
-
- - name: Download result a
- uses: actions/download-artifact@v3
- # https://github.com/marketplace/actions/download-a-build-artifact
- with:
- name: results_pysys_offsite_m32sd10a
- path: results/results_pysys_offsite_m32sd10a
-
- - name: Download result b
- uses: actions/download-artifact@v3
- # https://github.com/marketplace/actions/download-a-build-artifact
- with:
- name: results_pysys_offsite_m32sd10b
- path: results/results_pysys_offsite_m32sd10b
-
- - name: Download result c
- uses: actions/download-artifact@v3
- # https://github.com/marketplace/actions/download-a-build-artifact
- with:
- name: results_pysys_offsite_m32sd10c
- path: results/results_pysys_offsite_m32sd10c
-
- - name: Download result d
- uses: actions/download-artifact@v3
- # https://github.com/marketplace/actions/download-a-build-artifact
- with:
- name: results_pysys_offsite_m32sd10d
- path: results/results_pysys_offsite_m32sd10d
-
- - name: Build report
- run: ./ci/report/build.sh
-
- - name: Upload report as zip
- # https://github.com/marketplace/actions/upload-a-build-artifact
- uses: actions/upload-artifact@v3
- with:
- name: report_matrix_${{ github.run_number }}
- path: results/report.zip
-
- - name: Upload report as html
- # https://github.com/marketplace/actions/upload-a-build-artifact
- uses: actions/upload-artifact@v3
- with:
- name: system-test-report-matrix_${{ github.run_number }}
- path: results/report-matrix.htm
-
- - name: Run ls on analysis folder
- run: |
- ls -l ./results
-
- - name: Deploy to GitHub Pages
- # peaceiris/actions-gh-pages@v3
- uses: peaceiris/actions-gh-pages@v3
- with:
- github_token: ${{ secrets.GITHUB_TOKEN }}
- publish_dir: ./results
- destination_dir: results
- commit_message: Results for ci pipeline run ${{ github.run_number }}
-
- - name: Final Result
- # This will fail if there are errors in the reports
- run: |
- python3 ./ci/report/final_result.py ./results/all_reports.xml
diff --git a/ci/ci_run_all_plugin_tests.sh b/ci/ci_run_all_plugin_tests.sh
deleted file mode 100755
index ce325e5b..00000000
--- a/ci/ci_run_all_plugin_tests.sh
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/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
-
-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/
-
-sudo tedge config set software.plugin.default apt
-
-set +e
-# Dont use -v DEBUG here, it will print the enviroment vars with passwords in them
-pysys.py run --record 'apt_*' -XmyPlatform='container'
-set -e
-
-mv __pysys_junit_xml pysys_junit_xml_apt
-
-set +e
-# Dont use -v DEBUG here, it will print the enviroment vars with passwords in them
-pysys.py run --record 'apama_*' -XmyPlatform='container'
-set -e
-
-mv __pysys_junit_xml pysys_junit_xml_apama
-
-sudo cp ../../plugins/tedge_docker_plugin/tedge_docker_plugin.sh /etc/tedge/sm-plugins/docker
-sudo chmod +x /etc/tedge/sm-plugins/docker
-
-set +e
-# Dont use -v DEBUG here, it will print the enviroment vars with passwords in them
-pysys.py run --record 'docker_*' -XmyPlatform='container' -Xdockerplugin='dockerplugin'
-set -e
-
-mv __pysys_junit_xml pysys_junit_xml_docker
-
-sudo rm -f /etc/tedge/sm-plugins/docker
-
-sudo tedge config unset software.plugin.default
-
-deactivate
diff --git a/ci/ci_run_all_sm_tests.sh b/ci/ci_run_all_sm_tests.sh
deleted file mode 100755
index 1f8b2ce4..00000000
--- a/ci/ci_run_all_sm_tests.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/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
-
-set -e
-
-
-cd $TEBASEDIR
-
-# Check if clients are installed
-dpkg -s mosquitto-clients
-
-sudo cp plugins/tedge_docker_plugin/tedge_docker_plugin.sh /etc/tedge/sm-plugins/docker
-
-# Assume that the pi user has a precompiled dummy plugin
-# use a standard path for the others
-if [ $(whoami) == "pi" ];
- then
- sudo cp /home/pi/tedge_dummy_plugin/tedge_dummy_plugin /etc/tedge/sm-plugins/fruits
- else
- sudo cp $HOME/thin-edge.io/target/release/tedge_dummy_plugin /etc/tedge/sm-plugins/fruits
-fi
-
-sudo chmod +x /etc/tedge/sm-plugins/docker
-sudo chmod +x /etc/tedge/sm-plugins/fruits
-
-sudo tedge config set software.plugin.default apt
-
-sudo mkdir -p /tmp/.tedge_dummy_plugin/
-
-sudo cp tests/PySys/software_management_end_to_end/dummy_plugin_configuration/list-valid.0 /tmp/.tedge_dummy_plugin/list-valid.0
-
-# 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/
-
-# Run all software management tests, including the ones for the
-# fake- and the docker plugin
-set +e
-# Dont use -v DEBUG here, it will print the enviroment vars with passwords in them
-pysys.py run --record 'SoftwareManagement.*' -XmyPlatform='container' -Xdockerplugin='dockerplugin' -Xfakeplugin='fakeplugin'
-set -e
-
-deactivate
-
-sudo tedge config unset software.plugin.default
-sudo rm -f /etc/tedge/sm-plugins/docker
-sudo rm -f /etc/tedge/sm-plugins/fruits
-
-mv __pysys_junit_xml pysys_junit_xml_sm
diff --git a/ci/ci_run_all_tests.sh b/ci/ci_run_all_tests.sh
deleted file mode 100755
index 587629ac..00000000
--- a/ci/ci_run_all_tests.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/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
-# Dont use -v DEBUG here, it will print the enviroment vars with passwords in them
-pysys.py run --exclude analytics --record
-set -e
-
-deactivate
-
-mv __pysys_junit_xml pysys_junit_xml_all