Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
taste-setup
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TASTE
taste-setup
Commits
666ff6ba
Commit
666ff6ba
authored
Oct 14, 2017
by
Maxime Perrotin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix taste-generate-skeletons
the progress bar can now works when running in the background
parent
3390ed73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
20 deletions
+22
-20
misc/helper-scripts/taste-generate-skeletons
misc/helper-scripts/taste-generate-skeletons
+22
-20
No files found.
misc/helper-scripts/taste-generate-skeletons
View file @
666ff6ba
...
...
@@ -4,8 +4,17 @@
# this script builds a unique dataview.aadl file and calls buildsupport with --gw --aadlv2 -o $2 --keep-case
# Initialise the progress bar
(
cat
)
| taste-progress-dialog.py &
log_pid
=
$!
myfifo
=
/tmp/
$$$RANDOM
mkfifo
$myfifo
tail
-f
$myfifo
| taste-progress-dialog.py &
function
quit
{
echo
'QUIT'
rm
$myfifo
tailps
=
$(
pstree
-p
$$
|
grep tail
| python
-c
"import sys, re; print re.search(r'tail
\(
(.*)
\)
', [x for x in sys.stdin][0]).group(1)"
)
kill
$tailps
||
xterm
-e
"echo Internal Error, unable to kill subprocess. Open a terminal and type 'pkill tail' to (hopefully) recover"
exit
$1
}
# First check if an existing file is given as first argument (interface view)
# If not, check for the presence of a file called "InterfaceView.aadl".
...
...
@@ -16,11 +25,9 @@ then
then
INTERFACEVIEW
=
InterfaceView.aadl
else
echo
'
Error: i
nterface view not found
echo
'
[ERROR] I
nterface view not found
Usage: [FORCE=1] taste-generate-skeletons [InterfaceView.aadl] [output-directory]'
# Must kill the cat command still running in the background to release TASTE GUI
kill
$(
pstree
-p
$(
jobs
-x
echo
%1
)
|
grep cat
|
cut
-d
\(
-f
3 |
cut
-d
\)
-f
1
)
exit
-1
quit 1
fi
else
INTERFACEVIEW
=
"
$1
"
...
...
@@ -34,9 +41,7 @@ grep -i taste-directives.aadl "$INTERFACEVIEW" >/dev/null && {
echo
" taste-upgrade-IF-view oldIFview newIFview"
echo
echo
...and use the newIFview instead.
# Must kill the cat command still running in the background to release TASTE GUI
kill
$(
pstree
-p
$(
jobs
-x
echo
%1
)
|
grep cat
|
cut
-d
\(
-f
3 |
cut
-d
\)
-f
1
)
exit
1
quit 1
}
# Second, check if an output directory is passed as second argument
...
...
@@ -59,9 +64,7 @@ then
If you want to force generation of the skeletons anyway, type:
$ FORCE=1 taste-generate-skeletons
'
# Must kill the cat command still running in the background to release TASTE GUI
kill
$(
pstree
-p
$(
jobs
-x
echo
%1
)
|
grep cat
|
cut
-d
\(
-f
3 |
cut
-d
\)
-f
1
)
exit
0
quit 0
fi
fi
...
...
@@ -70,25 +73,25 @@ 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'
echo
'20 Analyse Interface View'
>
/proc/
$log_pid
/fd/0
echo
'20 Analyse Interface View'
>
$myfifo
cp
-f
"
$INTERFACEVIEW
"
"
$output_dir
"
/__interfaceview-v2.aadl
TASTE
--load-interface-view
"
$output_dir
"
/__interfaceview-v2.aadl
--export-interface-view-to-1_3
"
$INTERFACEVIEW
"
}
;
mkdir
-p
"
$output_dir
"
2>/dev/null
&&
shift
||
output_dir
=
.
echo
'[INFO] Collecting ASN.1 files'
echo
'40 Collect and process ASN.1 models'
>
/proc/
$log_pid
/fd/0
echo
'40 Collect and process ASN.1 models'
>
$myfifo
mono
$(
which taste-extract-asn-from-design.exe
)
-i
"
$INTERFACEVIEW
"
-j
"
$output_dir
"
/dataview-uniq.asn
echo
'[INFO] Generating AADL data view'
asn2aadlPlus
"
$output_dir
"
/dataview-uniq.asn
"
$output_dir
"
/dataview-uniq.aadl
-aadlv2
asn2aadlPlus
"
$output_dir
"
/dataview-uniq.asn
"
$output_dir
"
/dataview-uniq-v1.aadl
mono
$(
which taste-extract-asn-from-design.exe
)
-i
"
$INTERFACEVIEW
"
-k
"
$output_dir
"
/dataview-uniq.asn
echo
'[INFO] Parsing AADL and generating skeletons with buildsupport'
echo
'80 Generate code skeletons'
>
/proc/
$log_pid
/fd/0
echo
'80 Generate code skeletons'
>
$myfifo
buildsupport
-i
"
$INTERFACEVIEW
"
-d
"
$output_dir
"
/dataview-uniq.aadl
--gw
--aadlv2
-o
"
$output_dir
"
--keep-case
"
$AADL_PROPERTIES
"
"
$@
"
if
[
$?
-eq
0
]
then
echo
'100 Done'
>
/proc/
$log_pid
/fd/0
echo
'100 Done'
>
$myfifo
ret
=
0
else
ret
=
1
...
...
@@ -97,9 +100,8 @@ cp -f __interfaceview-v2.aadl "$INTERFACEVIEW" 2>/dev/null || :
rm
-f
"
$output_dir
"
/dataview-uniq.asn
"
$output_dir
"
/dataview-uniq.aadl
"
$output_dir
"
/dataview-uniq-v1.aadl
\
"
$output_dir
"
/__interfaceview-v2.aadl
echo
'100 Done'
>
/proc/
$log_pid
/fd/0
# Must kill the cat command still running in the background to release TASTE GUI
kill
$(
pstree
-p
$(
jobs
-x
echo
%1
)
|
grep cat
|
cut
-d
\(
-f
3 |
cut
-d
\)
-f
1
)
exit
$ret
echo
'100 Done'
>
$myfifo
quit
$ret
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment