Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zipr Toolchain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source Software
Zipr Toolchain
Commits
488f0c66
Commit
488f0c66
authored
9 years ago
by
jdh8d
Browse files
Options
Downloads
Patches
Plain Diff
added checking for unused --step name=on options
Former-commit-id: 2afcee6536378508582ebfe076d01e49aa02cc0f
parent
263c2708
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/ps_analyze.sh
+37
-6
37 additions, 6 deletions
tools/ps_analyze.sh
with
37 additions
and
6 deletions
tools/ps_analyze.sh
+
37
−
6
View file @
488f0c66
...
@@ -130,6 +130,7 @@ check_step_option()
...
@@ -130,6 +130,7 @@ check_step_option()
}
}
set_step_option
()
set_step_option
()
{
{
step
=
`
echo
$1
|
cut
-d
:
-f1
`
step
=
`
echo
$1
|
cut
-d
:
-f1
`
...
@@ -169,8 +170,8 @@ usage()
...
@@ -169,8 +170,8 @@ usage()
echo
" --tempdir <dir> Specify where the temporary analysis files are stored, default is peasoup_executable_directory.<exe>.<pid>"
echo
" --tempdir <dir> Specify where the temporary analysis files are stored, default is peasoup_executable_directory.<exe>.<pid>"
echo
" --backend <zipr|strata> Specify the backend rewriting technology to use. Default: Strata"
echo
" --backend <zipr|strata> Specify the backend rewriting technology to use. Default: Strata"
echo
" -b <zipr|strata> same as --backend "
echo
" -b <zipr|strata> same as --backend "
echo
" --stop
_
after <step> Stop ps_analyze after completeling the specified step."
echo
" --stop
-
after <step> Stop ps_analyze after completeling the specified step."
echo
" --stop
_
before <step> Stop ps_analyze before starting the specified step."
echo
" --stop
-
before <step> Stop ps_analyze before starting the specified step."
}
}
...
@@ -214,8 +215,8 @@ check_options()
...
@@ -214,8 +215,8 @@ check_options()
--long tempdir:
--long tempdir:
--long help
--long help
--long usage
--long usage
--long stop
_
after:
--long stop
-
after:
--long stop
_
before:
--long stop
-
before:
"
"
# solaris does not support long option names
# solaris does not support long option names
...
@@ -294,11 +295,11 @@ check_options()
...
@@ -294,11 +295,11 @@ check_options()
usage
usage
exit
1
exit
1
;;
;;
--stop
_
before
)
--stop
-
before
)
stop_before_step
=
$2
stop_before_step
=
$2
shift
2
shift
2
;;
;;
--stop
_
after
)
--stop
-
after
)
stop_after_step
=
$2
stop_after_step
=
$2
shift
2
shift
2
;;
;;
...
@@ -428,6 +429,33 @@ check_dependencies()
...
@@ -428,6 +429,33 @@ check_dependencies()
return
1
return
1
}
}
check_steps_completed
()
{
#echo "Checking steps: $phases_spec"
for
step_spec
in
$phases_spec
do
# if step is on.
if
[
$(
basename
"
$step_spec
"
=
off
)
=
"
$step_spec
"
]
;
then
# didn't find =off
step_name
=
$(
basename
$step_spec
=
on
)
#echo "step name is: $step_name"
echo
"
$performed_steps
"
| egrep
"
$step_name
"
>
/dev/null
grep_res
=
$?
if
[
$grep_res
-ne
0
]
;
then
echo
"*********************************************************"
echo
"*********************************************************"
echo
" Warning! Step requested, but not performed:
$step_name
"
echo
"*********************************************************"
echo
"*********************************************************"
warnings
=
1
fi
fi
done
}
#
#
# Detect if this step of the computation is on, and execute it.
# Detect if this step of the computation is on, and execute it.
#
#
...
@@ -439,6 +467,8 @@ perform_step()
...
@@ -439,6 +467,8 @@ perform_step()
shift
shift
command
=
"
$*
"
command
=
"
$*
"
performed_steps
=
"
$performed_steps
$step
"
logfile
=
logs/
$step
.log
logfile
=
logs/
$step
.log
if
[
"
$step
"
=
"
$stop_before_step
"
]
;
then
if
[
"
$step
"
=
"
$stop_before_step
"
]
;
then
...
@@ -1105,6 +1135,7 @@ if [ ! -z $TIMER_PID ]; then
...
@@ -1105,6 +1135,7 @@ if [ ! -z $TIMER_PID ]; then
kill
-9
$TIMER_PID
kill
-9
$TIMER_PID
fi
fi
check_steps_completed
#
#
# return success if we created a script to invoke the pgm and zipr is off.
# return success if we created a script to invoke the pgm and zipr is off.
...
...
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