Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (2)
Add patches: monitoring gui and config test bug fixes
· 7e3a5601
Emmanuel Promayon
authored
Jul 23, 2018
7e3a5601
update changelog
· 12b83293
Emmanuel Promayon
authored
Jul 23, 2018
12b83293
Hide whitespace changes
Inline
Side-by-side
debian/changelog
View file @
12b83293
...
...
@@ -4,6 +4,7 @@ camitk (4.1.2-1) UNRELEASED; urgency=medium
* control, rules, and autopkgtest updated for new release
* watch checks tag on upstream gilab
* fixed mispelling detected by lintian
* fixed config test and lib core dependencies
-- Emmanuel Promayon <Emmanuel.Promayon@univ-grenoble-alpes.fr> Wed, 18 Jul 2018 13:37:31 +0000
...
...
debian/patches/0004-FIXED-monitorgui-lib-should-not-depends-on-camitk-co.patch
0 → 100644
View file @
12b83293
From: Emmanuel Promayon <Emmanuel.Promayon@univ-grenoble-alpes.fr>
Date: Mon, 23 Jul 2018 08:39:47 +0200
Subject: FIXED monitorgui lib should not depends on camitk core lib
---
modeling/libraries/mml/monitoringgui/MonitoringGuiManager.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modeling/libraries/mml/monitoringgui/MonitoringGuiManager.cpp b/modeling/libraries/mml/monitoringgui/MonitoringGuiManager.cpp
index 4a121ed..6839f65 100644
--- a/modeling/libraries/mml/monitoringgui/MonitoringGuiManager.cpp
+++ b/modeling/libraries/mml/monitoringgui/MonitoringGuiManager.cpp
@@ -27,7 +27,7 @@
#include "MonitoringDialog.h"
#include "MonitoringDriver.h"
-#include <Log.h>
+#include <iostream>
#include <QApplication>
@@ -79,7 +79,7 @@
MonitoringManager* MonitoringGuiManager::getMonitoringManager() {
//--------------- doOneStep ---------------------------------
bool MonitoringGuiManager::doOneStep() {
if (monitoringManager->checkStop()) {
- CAMITK_INFO(tr("Simulation finished: the simulation is finished (Stopping Criterion reached)."))
+ std::cout << tr("Simulation finished: the simulation is finished (Stopping Criterion reached).").toStdString() << std::endl;
driver->stopTimer();
return false;
}
debian/patches/0005-FIXED-config-test-needs-to-ignore-stderr.patch
0 → 100644
View file @
12b83293
From: Emmanuel Promayon <Emmanuel.Promayon@univ-grenoble-alpes.fr>
Date: Mon, 23 Jul 2018 08:40:06 +0200
Subject: FIXED config test needs to ignore stderr
---
sdk/applications/config/testing/config-test.sh | 135 ++++++++++---------------
1 file changed, 55 insertions(+), 80 deletions(-)
diff --git a/sdk/applications/config/testing/config-test.sh b/sdk/applications/config/testing/config-test.sh
index f6b8b7a..9d05cf7 100644
--- a/sdk/applications/config/testing/config-test.sh
+++ b/sdk/applications/config/testing/config-test.sh
@@ -4,7 +4,8 @@
# This test entirely depends on the CamitK version (version string, number of extensions...)
# (see the expectedConfigOutput)
#
-# For a CamiTK major or minor version update the expected number and release date
+# For a CamiTK major or minor version please update the expected number and release date
+# in function initTestData
#
# echo $? get the last returned value of the script
# a return value of 0 indicates success (by convention)
@@ -17,6 +18,42 @@
set -e
# Uncomment next line to debug
# set -x
+# ---------------------- initTestData ----------------------
+# values to check
+initTestData() {
+ # fill test data
+ extensionCount=( [4.2]=41 [4.1]=41 [4.0]=31 )
+ componentExtensionCount=( [4.2]=14 [4.1]=14 [4.0]=14 )
+ actionExtensionCount=( [4.2]=27 [4.1]=27 [4.0]=27 )
+ fileExtensionCount=( [4.2]=37 [4.1]=37 [4.0]=37 )
+ actionCount=( [4.2]=105 [4.1]=105 [4.0]=105 )
+
+ # fill release date
+ releaseDate=( [4.2]="not yet released, current development version" \
+ [4.1]="15 July 2018" \
+ [4.0]="22 July 2016" \
+ [3.5]="29 January 2016"
+ [3.4]="31 October 2014" \
+ [3.3]="4 March 2014" \
+ [3.2]="26 June 2013" \
+ [3.1]="1 March 2013" \
+ [3.0]="7 July 2012" )
+
+}
+
+# ---------------------- declareTestData ----------------------
+declareTestData() {
+ # declare all associative arrays (-g is to declare the arrays
+ # in the global scope)
+ declare -Ag extensionCount
+ declare -Ag componentExtensionCount
+ declare -Ag actionExtensionCount
+ declare -Ag fileExtensionCount
+ declare -Ag actionCount
+ declare -Ag releaseDate
+}
+
+# ---------------------- cleanup ----------------------
# cleanup on exit
cleanup() {
# backup the current exit status
@@ -35,8 +72,8 @@
cleanup() {
}
# ---------------------- checkcommand ----------------------
+# usage: checkcommand name
checkcommand() {
- # usage: checkcommand name
if [ "$inBuild" == "0" ] ; then
# check if current build is on windows debug version
if ! hash ${1} 2>/dev/null; then
@@ -111,7 +148,7 @@
init() {
getconfig() {
# initialize config output
echo "===== Get CamiTK configuration ====="
- $camitkConfig --config > ./config-output 2>&1
+ $camitkConfig --config 2>/dev/null > ./config-output
camitkConfig=$(cat config-output | sed "s/QStandardPaths.*'.*'//")
echo "===== config-output ====="
@@ -133,45 +170,17 @@
getExpectedValue() {
echo $(pwd) | sed -e "s+^/c+C:+"
;;
"Number of Component Extensions")
- case "$shortVersion" in
- "4.0" | "4.1" | "4.2")
- echo "14" # 11 in sdk, imaging and modeling and 3 in tutorials
- ;;
- "3.3" | *)
- echo "12"
- ;;
- esac
+ echo ${componentExtensionCount[$shortVersion]}
;;
"Number of Action Extensions")
- case "$shortVersion" in
- "4.0" | "4.1" | "4.2")
- echo "27" # 19 in sdk, imaging and modeling and 8 in tutorials
- ;;
- "3.3" | *)
- echo "71"
- ;;
- esac
- ;;
+ echo ${actionExtensionCount[$shortVersion]}
+ ;;
"Number of File Extensions Supported")
- case "$shortVersion" in
- "4.0" | "4.1" | "4.2")
- echo "37" # 34 in sdk, imaging and modeling and 3 in tutorials
- ;;
- "3.3" | *)
- echo "35"
- ;;
- esac
- ;;
+ echo ${fileExtensionCount[$shortVersion]}
+ ;;
"Number of Actions")
- case "$shortVersion" in
- "4.0" | "4.1" | "4.2")
- echo "105" # 92 in sdk, imaging and modeling and 14 in tutorials
- ;;
- "3.3" | *)
- echo "81"
- ;;
- esac
- ;;
+ echo ${actionCount[$shortVersion]}
+ ;;
esac
}
@@ -182,40 +191,11 @@
getInstalledVersion() {
# ------------------- getReleaseDate -------------------
getReleaseDate() {
- # get the release date of minor version
- if [[ $1 =~ .*dev.* ]]; then
- echo "not yet released"
- else
- case "$1" in
- "3.0")
- echo "7 July 2012"
- ;;
- "3.1")
- echo "1 March 2013"
- ;;
- "3.2")
- echo "26 June 2013"
- ;;
- "3.3")
- echo "4 March 2014"
- ;;
- "3.4")
- echo "31 October 2014"
- ;;
- "3.5")
- echo "29 January 2016"
- ;;
- "4.0")
- echo "22 July 2016"
- ;;
- "4.1")
- echo "15 July 2018"
- ;;
- *)
- echo "unknown version"
- ;;
- esac
- fi
+ if [ ! ${releaseDate[$1]+validCamiTKVersion} ]; then
+ echo "unknown version"
+ else
+ echo ${releaseDate[$1]}
+ fi
}
# ---------------------- extension count ----------------------
@@ -224,14 +204,7 @@
getExtensionCount() {
}
getExpectedExtensionCount() {
- case "$1" in
- "4.0" | "4.1" | "4.2")
- echo "41" # 30 extensions in sdk, imaging and modeling and 11 extensions in tutorials
- ;;
- "3.3" | *)
- echo "12"
- ;;
- esac
+ echo ${extensionCount[$1]}
}
# ---------------------- get config ----------------------
@@ -269,6 +242,8 @@
checkValue() {
# if a problem occurs, call the clean method
trap "cleanup" 0 INT QUIT ABRT PIPE TERM EXIT
+declareTestData
+initTestData
init $*
getconfig
debian/patches/series
View file @
12b83293
0001-FIXED-spelling-errors-mispells.patch
0002-FIXED-spelling-in-examples.patch
0003-FIXED-warning-from-dpkg-about-no-newline.patch
0004-FIXED-monitorgui-lib-should-not-depends-on-camitk-co.patch
0005-FIXED-config-test-needs-to-ignore-stderr.patch