Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gesh
GHC
Commits
df7cb092
Commit
df7cb092
authored
25 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1999-07-05 16:55:19 by sof]
New option, -fail, to indicate failure (whatever the return code).
parent
8ae0e52a
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
glafp-utils/runstdtest/runstdtest.prl
+9
-2
9 additions, 2 deletions
glafp-utils/runstdtest/runstdtest.prl
with
9 additions
and
2 deletions
glafp-utils/runstdtest/runstdtest.prl
+
9
−
2
View file @
df7cb092
...
...
@@ -45,6 +45,7 @@ $SaveStderr = 0;
$SaveStdout = 0;
$Status = 0;
@PgmArgs = ();
$PgmFail=0;
$PgmExitStatus = 0;
$PgmStdinFile = '/dev/null';
if ( $ENV{'TMPDIR'} ) { # where to make tmp file names
...
...
@@ -86,8 +87,9 @@ arg: while ($_ = $ARGV[0]) {
/^-i(.*)/ && do { $PgmStdinFile = &grab_arg_arg('-i',$1);
$Status++,
print STDERR "$Pgm: bogus -i input file: $PgmStdinFile\n"
if ! -f $PgmStdinFile;
if
$PgmStdinFile !~ /^\/dev\/.*$/ &&
! -f $PgmStdinFile;
next arg; };
/^-fail/ && do { $PgmFail=1; next arg; };
/^-x(.*)/ && do { $PgmExitStatus = &grab_arg_arg('-x',$1);
$Status++ ,
print STDERR "$Pgm: bogus -x expected exit status: $PgmExitStatus\n"
...
...
@@ -219,7 +221,12 @@ $PreScriptLines
$SpixifyLine1
$TimeCmd /bin/sh -c \'$ToRun $TimingMagic @PgmArgs < $PgmStdinFile 1> $TmpPrefix/runtest$$.1 2> $TmpPrefix/runtest$$.2 3> $TmpPrefix/runtest$$.3\'
progexit=\$?
if [ \$progexit -ne $PgmExitStatus ]; then
if [ \$progexit -eq 0 ] && [ $PgmFail -ne 0 ]; then
echo $ToRun @PgmArgs \\< $PgmStdinFile
echo "****" expected a failure, but was successful
myexit=1
fi
if [ \$progexit -ne $PgmExitStatus ] && [ $PgmFail -eq 0 ]; then
echo $ToRun @PgmArgs \\< $PgmStdinFile
echo "****" expected exit status $PgmExitStatus not seen \\; got \$progexit
myexit=1
...
...
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