Commit 296b0f28 authored by Maxime Perrotin's avatar Maxime Perrotin

Update helper scripts

- in case of V2: do the md5 on the v2 version, not on v1.3 converted IV
- concurrency view generator: support v2
parent 252803d0
#!/bin/bash
# TASTE Concurrency View Creator
# Logging with colors (only in a terminal)
if [ -t 1 ] ; then
COLORON="\e[1m\e[32m"
COLOROFF="\e[0m"
else
COLORON=""
COLOROFF=""
fi
INFO="${COLORON}[INFO]${COLOROFF}"
ERROR="${COLORON}[ERROR]${COLOROFF}"
error=0
NB_ARGS=3
......@@ -32,10 +44,23 @@ else
fi
fi
# Check if models are from V2 and convert to V1_3 accordingly
V2=0
grep "version => \"2" InterfaceView.aadl >/dev/null && {
echo -e "${INFO} Converting interface view from V2 to V1.3"
TASTE --load-interface-view InterfaceView.aadl --export-interface-view-to-1_3 __iv_1_3.aadl
INTERFACEVIEW=__iv_1_3.aadl
echo -e "${INFO} Converting deployment view from V2 to V1.3"
TASTE --load-deployment-view "$DEPLOYMENTVIEW" --export-deployment-view-to-1_3 __dv_1_3.aadl
DEPLOYMENTVIEW=__dv_1_3.aadl
V2=1
};
if [ $error -eq 1 ]
then
echo 'If you are using custom names for interface, deployment and data views, please specify them in order:
Usage: taste-edit-concurrency-view InterfaceView.aadl DeploymentView.aadl DataView.aadl'
echo -e "${ERROR} If you are using custom names for interface, deployment and data views, please specify them in order:
Usage: taste-edit-concurrency-view InterfaceView.aadl DeploymentView.aadl DataView.aadl"
exit -1
fi
......@@ -72,10 +97,10 @@ then
done
PROCESS+=,$OCARINA_COMPONENTS
else
echo "The following command failed:
echo -e "${ERROR} The following command failed:
${CMD}
"
echo 'Buildsupport reported errors - Fix your models before you can edit the Concurrency View'
echo -e "${ERROR} Buildsupport reported errors - Fix your models before you can edit the Concurrency View"
exit -2
fi
......@@ -88,4 +113,9 @@ From this tool you may:
PROPERTIES=ConcurrencyView.pro
[ ! -z $DEBUG ] && echo TASTE-CV --edit-aadl $PROCESS --update-properties $PROPERTIES
TASTE-CV --edit-aadl $PROCESS --update-properties $PROPERTIES
if [ $V2 -eq 0 ]
then
TASTE-CV --edit-aadl $PROCESS --update-properties $PROPERTIES
fi
......@@ -55,6 +55,8 @@ $ FORCE=1 taste-generate-skeletons
fi
fi
md5sum "$INTERFACEVIEW" > InterfaceView.md5
# Detect models from Ellidiss tools v2, and convert them to 1.3
grep "version => \"2" "$INTERFACEVIEW" >/dev/null && {
echo '[INFO] Converting interface view from V2 to V1.3'
......@@ -62,9 +64,6 @@ grep "version => \"2" "$INTERFACEVIEW" >/dev/null && {
TASTE --load-interface-view "$output_dir"/__interfaceview-v2.aadl --export-interface-view-to-1_3 "$INTERFACEVIEW"
};
md5sum "$INTERFACEVIEW" > InterfaceView.md5
mkdir -p "$output_dir" 2>/dev/null && shift || output_dir=.
echo '[INFO] Collecting ASN.1 files'
taste-extract-asn-from-design.exe -i "$INTERFACEVIEW" -j "$output_dir"/dataview-uniq.asn
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment