Skip to content

Commit

Permalink
cleanup shell scripting
Browse files Browse the repository at this point in the history
avoid shellcheck warnings
  • Loading branch information
rgerhards committed Oct 31, 2018
1 parent 7a10ec1 commit 9a972ed
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 27 deletions.
10 changes: 10 additions & 0 deletions tests/exec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ cmd=../src/ln_test # regular case

. ./options.sh

no_solaris10() {
if (uname -a | grep -q "SunOS.*5.10"); then
printf 'platform: %s\n' "$(uname -a)"
printf 'This looks like solaris 10, we disable known-failing tests to\n'
printf 'permit OpenCSW to build packages. However, this are real failures\n'
printf 'and so a fix should be done as soon as time permits.\n'
exit 77
fi
}

test_def() {
test_file=$(basename $1)
test_name=$(echo $test_file | sed -e 's/\..*//g')
Expand Down
10 changes: 1 addition & 9 deletions tests/field_descent.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
# added 2014-12-11 by singh.janmejay
# This file is part of the liblognorm project, released under ASL 2.0

uname -a | grep "SunOS.*5.10"
if [ $? -eq 0 ] ; then
echo platform: $(uname -a)
echo This looks like solaris 10, we disable known-failing tests to
echo permit OpenCSW to build packages. However, this are real failurs
echo and so a fix should be done as soon as time permits.
exit 77
fi
. $srcdir/exec.sh
no_solaris10

test_def $0 "descent based parsing field"

Expand Down
10 changes: 1 addition & 9 deletions tests/field_descent_with_invalid_ruledef.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
# added 2014-12-15 by singh.janmejay
# This file is part of the liblognorm project, released under ASL 2.0

uname -a | grep "SunOS.*5.10"
if [ $? -eq 0 ] ; then
echo platform: $(uname -a)
echo This looks like solaris 10, we disable known-failing tests to
echo permit OpenCSW to build packages. However, this are real failurs
echo and so a fix should be done as soon as time permits.
exit 77
fi
. $srcdir/exec.sh
no_solaris10

test_def $0 "descent based parsing field, with invalid ruledef"

Expand Down
10 changes: 1 addition & 9 deletions tests/field_interpret.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
# added 2014-12-11 by singh.janmejay
# This file is part of the liblognorm project, released under ASL 2.0

uname -a | grep "SunOS.*5.10"
if [ $? -eq 0 ] ; then
echo platform: $(uname -a)
echo This looks like solaris 10, we disable known-failing tests to
echo permit OpenCSW to build packages. However, this are real failurs
echo and so a fix should be done as soon as time permits.
exit 77
fi
. $srcdir/exec.sh
no_solaris10

test_def $0 "value interpreting field"

Expand Down

0 comments on commit 9a972ed

Please sign in to comment.