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
db51cca1
Commit
db51cca1
authored
3 years ago
by
Simon Rose
Browse files
Options
Downloads
Patches
Plain Diff
Fixed some shfmt/shellcheck errors
parent
6b17c23b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_versions/test.sh
+8
-7
8 additions, 7 deletions
tests/test_versions/test.sh
with
8 additions
and
7 deletions
tests/test_versions/test.sh
+
8
−
7
View file @
db51cca1
...
@@ -10,7 +10,7 @@ if which ack &>/dev/null; then
...
@@ -10,7 +10,7 @@ if which ack &>/dev/null; then
__SEARCH_COMMAND__
=
"ack --passthru"
__SEARCH_COMMAND__
=
"ack --passthru"
else
else
echo
"ack is not installed; defaulting to grep, but note that the log will be missing the IOC log"
>
&2
echo
"ack is not installed; defaulting to grep, but note that the log will be missing the IOC log"
>
&2
__SEARCH_COMMAND__
=
grep
__SEARCH_COMMAND__
=
"
grep
"
fi
fi
function
usage
{
function
usage
{
...
@@ -28,11 +28,11 @@ function show_header {
...
@@ -28,11 +28,11 @@ function show_header {
}
}
function
install_vers
{
function
install_vers
{
for
ver
in
$@
;
do
for
ver
in
"
$@
"
;
do
echo
"=========================================="
echo
"=========================================="
echo
"Installing local version version '
$ver
'"
echo
"Installing local version version '
$ver
'"
echo
"=========================================="
echo
"=========================================="
make
-C
test
clean cellinstall
__DEBUG_VERSION
=
$ver
__EPICS_BASE_LOCATION
=
"
$EPICS_BASE
"
__REQUIRE_VERSION
=
"
$REQUIRE_VER
"
E3_NO_TEST
=
true
make
-C
test
clean cellinstall
__DEBUG_VERSION
=
"
$ver
"
__EPICS_BASE_LOCATION
=
"
$EPICS_BASE
"
__REQUIRE_VERSION
=
"
$REQUIRE_VER
"
E3_NO_TEST
=
true
done
done
}
}
...
@@ -65,8 +65,8 @@ function test_require {
...
@@ -65,8 +65,8 @@ function test_require {
echo
"Installed:
$args
"
echo
"Installed:
$args
"
echo
"============================================================"
echo
"============================================================"
required
=
$
(
sed
's/+/\\+/g'
<<<
$required
)
required
=
$
{
required
//+/\\+
}
expected
=
$
(
sed
's/+/\\+/g'
<<<
$expected
)
expected
=
$
{
expected
//+/\\+
}
clean_vers
clean_vers
...
@@ -90,7 +90,7 @@ function test_require {
...
@@ -90,7 +90,7 @@ function test_require {
# we are looking for. If we simply cut it out then we seem to be able to more consistently
# we are looking for. If we simply cut it out then we seem to be able to more consistently
# get meaningful tests.
# get meaningful tests.
echo exit
|
eval
iocsh.bash
"
$iocsh_args
"
|
echo exit
|
eval
iocsh.bash
"
$iocsh_args
"
|
sed
-e
'1h;2,$H;$!d;g'
-e
's/Starting iocInit\niocRun: All initialization complete\n//'
|
sed
-e
'1
h;
2,$
H;
$!
d;
g'
-e
's/Starting iocInit\niocRun: All initialization complete\n//'
|
$__SEARCH_COMMAND__
"
${
search_string
}
"
$__SEARCH_COMMAND__
"
${
search_string
}
"
}
}
...
@@ -109,7 +109,7 @@ function format_output {
...
@@ -109,7 +109,7 @@ function format_output {
result_str
=
"
\0
33[31mfailed
\0
33[0m"
result_str
=
"
\0
33[31mfailed
\0
33[0m"
fi
fi
printf
"Test:
$result_str
\n
"
printf
"Test:
%s
\n
"
"
$result_str
"
printf
"requested: %-20s expected: %-20s
\n
"
"
$requested
"
"
$expected
"
printf
"requested: %-20s expected: %-20s
\n
"
"
$requested
"
"
$expected
"
printf
"Given versions: %s
\n
"
"
$versions
"
printf
"Given versions: %s
\n
"
"
$versions
"
printf
"============================================================
\n
"
printf
"============================================================
\n
"
...
@@ -150,6 +150,7 @@ if [ ! -f "$ENV_SRC" ]; then
...
@@ -150,6 +150,7 @@ if [ ! -f "$ENV_SRC" ]; then
echo
"setE3Env.bash not found at location
$ENV_SRC
"
>
&2
echo
"setE3Env.bash not found at location
$ENV_SRC
"
>
&2
exit
1
exit
1
fi
fi
# shellcheck disable=SC1090
source
"
$ENV_SRC
"
&>/dev/null
source
"
$ENV_SRC
"
&>/dev/null
show_header
show_header
...
...
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