Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
e3-require
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
Anders Lindh Olsson
e3-require
Commits
6e5ea127
Commit
6e5ea127
authored
3 years ago
by
Simon Rose
Browse files
Options
Downloads
Patches
Plain Diff
use grep -E
parent
d7b9b623
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
tests/test_versions/test.sh
+4
-13
4 additions, 13 deletions
tests/test_versions/test.sh
with
4 additions
and
13 deletions
tests/test_versions/test.sh
+
4
−
13
View file @
6e5ea127
...
...
@@ -7,14 +7,12 @@ EPICS_BASE=${EPICS_BASE:-/epics/base-7.0.5}
REQUIRE_VER
=
${
E3_REQUIRE_VERSION
:-
3
.4.1
}
if
which ack &>/dev/null
;
then
__
use_ack
=
t
ru
e
__
SEARCH_COMMAND__
=
"ack --passth
ru
"
else
echo
"ack is not installed; defaulting to grep, but note that the log will be missing the IOC log"
>
&2
__
use_ack
=
false
__
SEARCH_COMMAND__
=
"grep -E"
fi
#__use_ack=false
function
usage
{
echo
"Usage:"
echo
" bash test.sh [-b <EPICS_BASE>] [-r <REQUIRE_VER>] [-h] testfile"
...
...
@@ -67,13 +65,8 @@ function test_require {
echo
"Installed:
${
args
[*]
}
"
echo
"============================================================"
if
[
"
$__use_ack
"
=
true
]
;
then
required
=
${
required
//+/\\+
}
expected
=
${
expected
//+/\\+
}
__SEARCH_COMMAND__
=
"ack --passthru"
else
__SEARCH_COMMAND__
=
"grep"
fi
required
=
${
required
//+/\\+
}
expected
=
${
expected
//+/\\+
}
clean_vers
...
...
@@ -91,8 +84,6 @@ function test_require {
search_string
=
"^Loaded
$MODULENAME
version
$expected
\$
"
fi
echo
"SEARCH STRING:
$search_string
"
# The funny sed command here is from https://unix.stackexchange.com/a/235016/445931
# The reason this is needed is because the "Starting iocInit" message seems to be threaded
# differently than the regular flow of output and sometimes will separate the strings that
...
...
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