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
94d107c2
Commit
94d107c2
authored
13 years ago
by
an7s
Browse files
Options
Downloads
Patches
Plain Diff
Allow users to specify coverage file when in manual testing mode
Former-commit-id: 37282fe35788e62e7e92df70c8002feb9da2dc11
parent
832fc011
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tools/do_manualtests.sh
+26
-9
26 additions, 9 deletions
tools/do_manualtests.sh
tools/do_p1transform.sh
+4
-2
4 additions, 2 deletions
tools/do_p1transform.sh
tools/ps_analyze.sh
+6
-2
6 additions, 2 deletions
tools/ps_analyze.sh
with
36 additions
and
13 deletions
tools/do_manualtests.sh
+
26
−
9
View file @
94d107c2
#!/bin/sh
name
=
$1
newname
=
$2
test_script
=
$3
#
# $1 contains the user-supplied test input/output specification script
# assumption: this script is called from within the subdirectory created as part of
# ps_analyze.sh
# We support two forms of manual tests:
#
# (1) User supplies tests with input/output specifications
# - these are automatically identified by looking for the command: manual_test_import
# - coverage information is automatically computed using pin
# (2) User supplies black box regression test suite
# - coverage information is optionally supplied (format of coverage file: 1 address per line)
#
# Assumption: this script is called from within the subdirectory created as part of ps_analyze.sh
#
name
=
$1
# original basename of binary
newname
=
$2
# new name of protected binary
test_script
=
$3
# test script
manual_coverage_file
=
$4
# coverage file for black box regression test suite
PWD
=
`
pwd
`
echo
"Running specified test script at:
$3
Current working dir is:
$PWD
"
echo
"Running specified test script at:
$3
Current working dir is:
$PWD
coverage file:
$4
"
echo
"Current working dir is:
$PWD
command issued:
$*
"
if
[
!
-f
$test_script
]
;
then
echo
"Error -- could not find
manual input/output testing setup
script
:
$1
"
echo
"Error -- could not find
testing cript:
$test_
script
"
exit
1
else
mkdir
manual_tests 2>/dev/null
grep
manual_test_import
$test_script
if
[
$?
-eq
0
]
;
then
# execute the script to import manual test cases
sh
$test_script
else
# setup script for black box regression testing
# currently used with P1/Pn
cp
$test_script
manual_test_wrapper
echo
$newname
>
new_command_name
# optionally use coverage information (if provided)
if
[
-f
$manual_coverage_file
]
;
then
cp
$manual_coverage_file
manual_coverage.txt
fi
fi
ln
-s
$name
.sh
$newname
...
...
This diff is collapsed.
Click to expand it.
tools/do_p1transform.sh
+
4
−
2
View file @
94d107c2
...
...
@@ -99,11 +99,13 @@ do
break
done
#if no baseline comparison output exists, delete the coverage file
if
[
$baseline_flag
-eq
0
]
;
then
#if no baseline comparison output exists, delete the coverage file (when using Grace)
if
[
!
-f
$EXECUTED_ADDRESSES_MANUAL
]
;
then
if
[
$baseline_flag
-eq
0
]
;
then
echo
"do_p1transform.sh: no valid baseline comparison output, deleting coverage file"
rm
$COVERAGE_FILE
touch
$COVERAGE_FILE
fi
fi
#just in case something went wrong, touch the coverage file. An empty coverage file is permissible, but a missing one will cause PN to crash
...
...
This diff is collapsed.
Click to expand it.
tools/ps_analyze.sh
+
6
−
2
View file @
94d107c2
...
...
@@ -73,7 +73,7 @@ check_options()
# Note that we use `"$@"' to let each command-line parameter expand to a
# separate word. The quotes around `$@' are essential!
# We need TEMP as the `eval set --' would nuke the return value of getopt.
TEMP
=
`
getopt
-o
s:t:
--long
step:
--long
timeout
:
--long
manual_test_script:
-n
'ps_analyze.sh'
--
"
$@
"
`
TEMP
=
`
getopt
-o
s:t:
--long
step:
--long
timeout
:
--long
manual_test_script:
--long
manual_test_coverage_file:
-n
'ps_analyze.sh'
--
"
$@
"
`
# error check #
if
[
$?
!=
0
]
;
then
echo
"Terminating..."
>
&2
;
exit
-1
;
fi
...
...
@@ -92,6 +92,10 @@ check_options()
manual_test_script
=
$2
shift
2
;;
--manual_test_coverage_file
)
manual_test_coverage_file
=
$2
shift
2
;;
-t
|
--timeout
)
set_timer
$2
&
TIMER_PID
=
$!
shift
2
...
...
@@ -497,7 +501,7 @@ if [ -f $newname.ncexe.annot -a $varid -gt 0 ]; then
#
# Run script to setup manual tests
#
perform_step manual_test
$PEASOUP_HOME
/tools/do_manualtests.sh
$name
$stratafied_exe
$manual_test_script
perform_step manual_test
$PEASOUP_HOME
/tools/do_manualtests.sh
$name
$stratafied_exe
$manual_test_script
$manual_test_coverage_file
is_step_on manual_test
if
[
$?
-eq
0
]
;
then
...
...
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