Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RadioHDL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RTSD
RadioHDL
Commits
a377eed2
Commit
a377eed2
authored
2 years ago
by
Pieter Donker
Browse files
Options
Downloads
Patches
Plain Diff
L2SDP-888
, changed reading in buildset file
parent
b5ce2974
No related branches found
No related tags found
1 merge request
!15
Resolve L2SDP-888
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
generic.sh
+8
-8
8 additions, 8 deletions
generic.sh
regressiontest/modelsim_regression_test_vhdl_cron.sh
+57
-56
57 additions, 56 deletions
regressiontest/modelsim_regression_test_vhdl_cron.sh
with
65 additions
and
64 deletions
generic.sh
+
8
−
8
View file @
a377eed2
...
@@ -40,7 +40,7 @@ hdl_error() {
...
@@ -40,7 +40,7 @@ hdl_error() {
echo
"usage: hdl_error <caller's name> <message> [<exitcode>]"
echo
"usage: hdl_error <caller's name> <message> [<exitcode>]"
exit
1
exit
1
fi
fi
caller
=
`
basename
${
caller
}
|
tr
[
a-z]
[
A-Z]
`
caller
=
$(
basename
${
caller
}
|
tr
[
a-z]
[
A-Z]
)
echo
-n
"
$(
tput setaf 6
)$(
tput bold
)
[
${
caller
}
] "
echo
-n
"
$(
tput setaf 6
)$(
tput bold
)
[
${
caller
}
] "
echo
-e
"
$(
tput setaf 1
)
ERROR -
${
msg
}
.
$(
tput sgr0
)
"
echo
-e
"
$(
tput setaf 1
)
ERROR -
${
msg
}
.
$(
tput sgr0
)
"
# Exit if $NO_EXIT does not exist, else only return
# Exit if $NO_EXIT does not exist, else only return
...
@@ -56,7 +56,7 @@ hdl_error_noexit() {
...
@@ -56,7 +56,7 @@ hdl_error_noexit() {
echo
"usage: hdl_error <caller's name> <message>"
echo
"usage: hdl_error <caller's name> <message>"
exit
1
exit
1
fi
fi
caller
=
`
basename
${
caller
}
|
tr
[
a-z]
[
A-Z]
`
caller
=
$(
basename
${
caller
}
|
tr
[
a-z]
[
A-Z]
)
echo
-n
"
$(
tput setaf 6
)$(
tput bold
)
[
${
caller
}
] "
echo
-n
"
$(
tput setaf 6
)$(
tput bold
)
[
${
caller
}
] "
echo
-e
"
$(
tput setaf 1
)
ERROR -
${
msg
}
.
$(
tput sgr0
)
"
echo
-e
"
$(
tput setaf 1
)
ERROR -
${
msg
}
.
$(
tput sgr0
)
"
}
}
...
@@ -68,7 +68,7 @@ hdl_warning() {
...
@@ -68,7 +68,7 @@ hdl_warning() {
echo
"usage: hdl_warning <caller's name> <message>"
echo
"usage: hdl_warning <caller's name> <message>"
exit
1
exit
1
fi
fi
caller
=
`
basename
${
caller
}
|
tr
[
a-z]
[
A-Z]
`
caller
=
$(
basename
${
caller
}
|
tr
[
a-z]
[
A-Z]
)
echo
-n
"
$(
tput setaf 6
)$(
tput bold
)
[
${
caller
}
] "
echo
-n
"
$(
tput setaf 6
)$(
tput bold
)
[
${
caller
}
] "
echo
-e
"
$(
tput setaf 3
)
WARNING -
${
msg
}
.
$(
tput sgr0
)
"
echo
-e
"
$(
tput setaf 3
)
WARNING -
${
msg
}
.
$(
tput sgr0
)
"
return
0
return
0
...
@@ -82,7 +82,7 @@ hdl_info() {
...
@@ -82,7 +82,7 @@ hdl_info() {
echo
"usage: hdl_info <scriptname> <msg1> [<msg2> .. <msgN>]"
echo
"usage: hdl_info <scriptname> <msg1> [<msg2> .. <msgN>]"
exit
1
exit
1
fi
fi
caller
=
`
basename
${
caller
}
|
tr
[
a-z]
[
A-Z]
`
caller
=
$(
basename
${
caller
}
|
tr
[
a-z]
[
A-Z]
)
echo
-e
"
$(
tput setaf 6
)$(
tput bold
)
[
${
caller
}
]
$*
$(
tput sgr0
)
"
echo
-e
"
$(
tput setaf 6
)$(
tput bold
)
[
${
caller
}
]
$*
$(
tput sgr0
)
"
return
0
return
0
}
}
...
@@ -110,16 +110,16 @@ hdl_exec() {
...
@@ -110,16 +110,16 @@ hdl_exec() {
case
${
ac
}
in
case
${
ac
}
in
output
=
*
)
output
=
*
)
# well allrighty then, override default msg
# well allrighty then, override default msg
output
=
`
echo
"
${
ac
}
"
|
sed
's/^output=//'
`
output
=
$(
echo
"
${
ac
}
"
|
sed
's/^output=//'
)
shift
shift
;;
;;
msg
=
*
)
msg
=
*
)
# well allrighty then, override default msg
# well allrighty then, override default msg
msg
=
`
echo
"
${
ac
}
"
|
sed
's/^msg=//'
`
msg
=
$(
echo
"
${
ac
}
"
|
sed
's/^msg=//'
)
shift
shift
;;
;;
expect
=
*
)
expect
=
*
)
expect
=
`
echo
"
${
ac
}
"
|
sed
's/^expect=//'
`
expect
=
$(
echo
"
${
ac
}
"
|
sed
's/^expect=//'
)
shift
shift
;;
;;
*
)
*
)
...
@@ -196,7 +196,7 @@ timestamp() {
...
@@ -196,7 +196,7 @@ timestamp() {
pathadd
()
{
pathadd
()
{
for
new_dir
in
${
@
:2
}
for
new_dir
in
${
@
:2
}
do
do
eval
dir_to_add
=
`
echo
${
new_dir
}
`
eval
dir_to_add
=
$(
echo
${
new_dir
}
)
if
[
!
-d
${
dir_to_add
}
]
;
then
if
[
!
-d
${
dir_to_add
}
]
;
then
echo
"WARNING: directory
${
dir_to_add
}
NOT added to
$1
because directory doesn't exist!"
echo
"WARNING: directory
${
dir_to_add
}
NOT added to
$1
because directory doesn't exist!"
else
else
...
...
This diff is collapsed.
Click to expand it.
regressiontest/modelsim_regression_test_vhdl_cron.sh
+
57
−
56
View file @
a377eed2
...
@@ -66,19 +66,22 @@ git_hash_filename="${RADIOHDL_LOG_DIR}"/modelsim_previous_git_hash.txt
...
@@ -66,19 +66,22 @@ git_hash_filename="${RADIOHDL_LOG_DIR}"/modelsim_previous_git_hash.txt
[[
-f
"
${
git_hash_filename
}
"
]]
&&
git_prev_hash
=
$(
cat
"
${
git_hash_filename
}
"
)
[[
-f
"
${
git_hash_filename
}
"
]]
&&
git_prev_hash
=
$(
cat
"
${
git_hash_filename
}
"
)
git_active_hash
=
$(
git rev-parse HEAD
)
git_active_hash
=
$(
git rev-parse HEAD
)
# make clean modelsim_build_list from given buildset_filename, skip lines starting with #
echo
".. Read buildsets to check from:
${
buildset_filename
}
"
echo
".. Read buildsets to check from:
${
buildset_filename
}
"
# array with builsets
# Modelsim test for each line in 'modelsim_used_buildset_list.txt'
buildsets
=()
while
read
-r
line
;
do
while
read
-r
line
;
if
[
-n
"
${
line
}
"
]
;
then
do
# skip empty lines and lines starting with #
# if line starts with # continue while (=~ is for regex)
[[
-z
"
$line
"
]]
&&
continue
[[
"
$line
"
=
~ ^#
]]
&&
continue
[[
"
$line
"
=
~ ^#
]]
&&
continue
# get firts word of line
echo
". Next buildset in 'modelsim_buildset_list.txt' is '
${
line
}
'"
buildset
=
$(
echo
"
${
line
}
"
|
cut
-d
" "
-f1
)
buildset
=
$(
echo
"
${
line
}
"
|
cut
-d
" "
-f1
)
buildsets+
=(
"
${
buildset
}
"
)
done
<
${
buildset_filename
}
# Modelsim test for each line in 'modelsim_buildset_list.txt'
for
buildset
in
"
${
buildsets
[@]
}
"
;
do
echo
".. Do all regressiontests for
${
buildset
}
"
echo
".. Do all regressiontests for
${
buildset
}
"
logfile
=
"
${
RADIOHDL_LOG_DIR
}
/
${
buildset
}
/modelsim_regressiontest.log"
logfile
=
"
${
RADIOHDL_LOG_DIR
}
/
${
buildset
}
/modelsim_regressiontest.log"
...
@@ -89,41 +92,39 @@ while read -r line; do
...
@@ -89,41 +92,39 @@ while read -r line; do
echo
".. Remove old /tmp/VSOUT* files"
echo
".. Remove old /tmp/VSOUT* files"
hdl_exec
"
$0
"
rm
-f
/tmp/VSOUT
*
1>>
"
${
logfile
}
"
2>&1
hdl_exec
"
$0
"
rm
-f
/tmp/VSOUT
*
1>>
"
${
logfile
}
"
2>&1
if
[
"
${
git_active_hash
}
"
==
"
${
git_prev_hash
}
"
]
;
then
# if [ "${git_active_hash}" == "${git_prev_hash}" ]; then
echo
".. Skip regression test, NO change in repository"
# echo ".. Skip regression test, NO change in repository"
# Send nothing changed mail (-n option)
# # Send nothing changed mail (-n option)
echo
".. Call modelsim_regression_test_vhdl_mail --nochange"
# echo ".. Call modelsim_regression_test_vhdl_mail --nochange"
hdl_exec
"
$0
"
modelsim_regression_test_vhdl_mail.py
"
${
buildset
}
"
--nochange
1>>
"
${
logfile
}
"
2>&1
# hdl_exec "$0" modelsim_regression_test_vhdl_mail.py "${buildset}" --nochange 1>> "${logfile}" 2>&1
continue
# continue
fi
# fi
# Cleanup last build if exists
# # Cleanup last build if exists
echo
".. Cleanup last build
${
buildset
}
"
# echo ".. Cleanup last build ${buildset}"
hdl_exec
"
$0
"
rm
-rf
"
${
HDL_BUILD_DIR
:?
}
"
/
"
${
buildset
}
"
1>>
"
${
logfile
}
"
2>&1
# hdl_exec "$0" rm -rf "${HDL_BUILD_DIR:?}"/"${buildset}" 1>> "${logfile}" 2>&1
# Build all IP
# # Build all IP
echo
".. Call compile_altera_simlibs"
# echo ".. Call compile_altera_simlibs"
hdl_exec
"
$0
"
compile_altera_simlibs
"
${
buildset
}
"
1>>
"
${
logfile
}
"
2>&1
# hdl_exec "$0" compile_altera_simlibs "${buildset}" 1>> "${logfile}" 2>&1
echo
".. Call generate_ip_libs"
# echo ".. Call generate_ip_libs"
hdl_exec
"
$0
"
generate_ip_libs
"
${
buildset
}
"
1>>
"
${
logfile
}
"
2>&1
# hdl_exec "$0" generate_ip_libs "${buildset}" 1>> "${logfile}" 2>&1
# re-create it with modelsim_config and quartus_config
# # re-create it with modelsim_config and quartus_config
echo
".. Call modelsim_config"
# echo ".. Call modelsim_config"
hdl_exec
"
$0
"
modelsim_config
"
${
buildset
}
"
1>>
"
${
logfile
}
"
2>&1
# hdl_exec "$0" modelsim_config "${buildset}" 1>> "${logfile}" 2>&1
echo
".. Call quartus_config"
# echo ".. Call quartus_config"
hdl_exec
"
$0
"
quartus_config
"
${
buildset
}
"
1>>
"
${
logfile
}
"
2>&1
# hdl_exec "$0" quartus_config "${buildset}" 1>> "${logfile}" 2>&1
# Perform the regression test and put the output in a log file
# # Perform the regression test and put the output in a log file
# -p 4: number of simultaneously test processes, each process needs a license
# # -p 4: number of simultaneously test processes, each process needs a license
echo
".. Call modelsim_regression_test_vhdl"
# echo ".. Call modelsim_regression_test_vhdl"
hdl_exec
"
$0
"
modelsim_regression_test_vhdl.py
"
${
buildset
}
"
-p
2 1>>
"
${
logfile
}
"
2>&1
# hdl_exec "$0" modelsim_regression_test_vhdl.py "${buildset}" -p 3 1>> "${logfile}" 2>&1
# Read the log file en send the result email
# # Read the log file en send the result email
echo
".. Call modelsim_regression_test_vhdl_mail"
# echo ".. Call modelsim_regression_test_vhdl_mail"
hdl_exec
"
$0
"
modelsim_regression_test_vhdl_mail.py
"
${
buildset
}
"
1>>
"
${
logfile
}
"
2>&1
# hdl_exec "$0" modelsim_regression_test_vhdl_mail.py "${buildset}" 1>> "${logfile}" 2>&1
done
fi
done
<
${
buildset_filename
}
# save hash for next run
# save hash for next run
echo
"
${
git_active_hash
}
"
>
"
${
git_hash_filename
}
"
echo
"
${
git_active_hash
}
"
>
"
${
git_hash_filename
}
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment