Skip to content

Commit

Permalink
Merge pull request #6 from fledge-iot/2.0.1RC
Browse files Browse the repository at this point in the history
2.0.1RC
  • Loading branch information
dianomicbot authored Oct 27, 2022
2 parents e5a5982 + 4931d05 commit 4b45bd5
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 504 deletions.
62 changes: 62 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
timestamps {
node("ubuntu18-agent") {
catchError {
checkout scm
dir_exists = sh (
script: "test -d 'tests' && echo 'Y' || echo 'N' ",
returnStdout: true
).trim()

if (dir_exists == 'N'){
currentBuild.result= 'FAILURE'
echo "No tests directory found! Exiting."
return
}

try {
stage("Prerequisites"){
// Change to corresponding CORE_BRANCH as required
// e.g. FOGL-xxxx, main etc.
sh '''
CORE_BRANCH='develop'
${HOME}/buildFledge ${CORE_BRANCH} ${WORKSPACE}
'''
}
} catch (e) {
currentBuild.result = 'FAILURE'
echo "Failed to build Fledge; required to run the tests!"
return
}

try {
stage("Run Tests"){
echo "Executing tests..."
sh '''
. ${WORKSPACE}/PLUGIN_PR_ENV/bin/activate
export FLEDGE_ROOT=$HOME/fledge && export PYTHONPATH=$HOME/fledge/python
cd tests && python3 -m pytest -vv --ignore=system --ignore=api --junit-xml=test_result.xml
'''
echo "Done."
}
} catch (e) {
result = "TESTS FAILED"
currentBuild.result = 'FAILURE'
echo "Tests failed!"
}

try {
stage("Publish Test Report"){
junit "tests/test_result.xml"
}
} catch (e) {
result = "TEST REPORT GENERATION FAILED"
currentBuild.result = 'FAILURE'
echo "Failed to generate test reports!"
}
}
stage ("Cleanup"){
// Add here if any cleanup is required
echo "Done."
}
}
}
2 changes: 1 addition & 1 deletion VERSION.south.s7_python
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
fledge_south_s7_python_version=2.0.0
fledge_south_s7_python_version=2.0.1
fledge_version>=2.0
2 changes: 1 addition & 1 deletion python/fledge/plugins/south/s7_python/s7_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def plugin_info():

return {
'name': 's7_south_python',
'version': '2.0.0',
'version': '2.0.1',
'mode': 'poll',
'type': 'south',
'interface': '1.0',
Expand Down
2 changes: 1 addition & 1 deletion requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ elif apt --version 2>/dev/null; then
sudo apt install -y wget
sudo apt install -y p7zip
wget --content-disposition -c https://sourceforge.net/projects/snap7/files/1.4.2/snap7-full-1.4.2.7z/download
p7zip -d snap7-full-1.4.2.7z
echo "A" | p7zip -d snap7-full-1.4.2.7z
cd snap7-full-1.4.2/build/unix
make -f "$(uname -m)_linux.mk" install
else
Expand Down
Empty file added tests/__init__.py
Empty file.
Loading

0 comments on commit 4b45bd5

Please sign in to comment.