Skip to content
Snippets Groups Projects
Commit f5760eec authored by Erik von Reis's avatar Erik von Reis
Browse files

rtcds: most commands now enforce lowercase models names

uppercase characters in model names cause problems with the build system, so they are forbidden for most commands.
parent 1acdd802
No related branches found
No related tags found
1 merge request!274rtcds improvements
......@@ -6,6 +6,7 @@ Changes for NEXT
- Fixed bug that leads to incorrect ordering of calculations, adding unneeded latency.
- 'rtcds restart --all' fixed to also restart IOP model.
- rtcds will now start every model listed on the command line even if some models are already started
- rtcds now enforces lowercase model names on most commands
==================================================================================================
Changes for 4.2.3
==================================================================================================
......
......@@ -364,6 +364,17 @@ disable_sys() {
done
}
check_case() {
for sys ; do
lcsys=$(echo $sys | tr '[:upper:]' '[:lower:]')
if [ "$lcsys" != "$sys" ]
then
log "*** Error: ${sys} has uppercase letters. Model names must not have uppercase letters."
exit 3
fi
done
}
_lsmod() {
local systems=($(list_host_sys))
local rts=(mbuf gpstime)
......@@ -603,6 +614,7 @@ case $cmd in
build_world
elif [[ $1 ]] ; then
check_env
check_case $@
prep_buildd
build_sys $@
else
......@@ -621,6 +633,7 @@ case $cmd in
install_world
elif [[ $1 ]] ; then
check_env
check_case $@
prep_target
install_sys $@
else
......@@ -632,6 +645,7 @@ case $cmd in
if [[ -n $ALL_FLAG ]] ; then
start_sys $(list_host_sys)
elif [[ $1 ]] ; then
check_case $@
start_sys $@
else
log "You must specify at least one system to start (or '--all')."
......@@ -644,6 +658,7 @@ case $cmd in
stop_sys $(list_host_sys | tac)
start_sys $(list_host_sys)
elif [[ $1 ]] ; then
check_case $@
stop_sys $@
start_sys $@
else
......@@ -656,6 +671,7 @@ case $cmd in
# we do this in reverse so the IOP is stopped last
stop_sys $(list_host_sys | tac)
elif [[ $1 ]] ; then
check_case $@
stop_sys $@
else
log "You must specify at least one system to stop (or '--all')."
......@@ -672,6 +688,7 @@ case $cmd in
# we do this in reverse so the IOP is stopped last
${cmd}_sys $(list_host_sys | tac)
elif [[ $1 ]] ; then
check_case $@
${cmd}_sys $@
else
log "You must specify at least one system to $cmd (or '--all')."
......@@ -707,6 +724,7 @@ case $cmd in
log "You must specify system to view."
exit 2
fi
check_case $1
olog="${RCG_BUILDD}/${1}.log"
elog="${RCG_BUILDD}/${1}_error.log"
echo $olog
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment