Skip to content

Commit

Permalink
fix shellcheck warnings; add some ci ignore test entries
Browse files Browse the repository at this point in the history
  • Loading branch information
aleks-f committed Oct 16, 2023
1 parent 69fd22c commit bb51c87
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 34 deletions.
2 changes: 1 addition & 1 deletion build/script/makedepend.SunCC
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ shift
dir4=$1
shift

CC -xM1 $@ $source | sed "s#\(.*\.o$\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" >$target
CC -xM1 "$@" "$source" | sed "s#\(.*\.o$\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" >"$target"
8 changes: 4 additions & 4 deletions build/script/makedepend.aCC
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ shift
dir4=$1
shift

tmpfile=`basename $target`
aCC -E +maked $@ $source >/dev/null
sed "s#\(.*\.o$\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" <$tmpfile >$target
rm $tmpfile
tmpfile=$(basename $target)
aCC -E +maked "$@" "$source" >/dev/null
sed "s#\(.*\.o$\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" <"$tmpfile" >"$target"
rm "$tmpfile"
2 changes: 1 addition & 1 deletion build/script/makedepend.clang
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ else
CLANG=clang++
fi

$CLANG -MM $@ $source | sed "s#\(.*\.o\):#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1:#" >$target
$CLANG -MM "$@" "$source" | sed "s#\(.*\.o\):#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1:#" >"$target"
2 changes: 1 addition & 1 deletion build/script/makedepend.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ shift
dir4=$1
shift

cxx -M $@ $source | sed "s#\(.*\.o$\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" >$target
cxx -M "$@" "$source" | sed "s#\(.*\.o$\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" >"$target"
2 changes: 1 addition & 1 deletion build/script/makedepend.gcc
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ shift
dir4=$1
shift

$CC -MM $@ $source | sed "s#\(.*\.o\):#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1:#" >$target
$CC -MM "$@" "$source" | sed "s#\(.*\.o\):#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1:#" >"$target"
2 changes: 1 addition & 1 deletion build/script/makedepend.qcc
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ shift
dir4=$1
shift

$CC -E -Wp,-MM $@ $source | sed "s#\(.*\.o$\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" >$target
$CC -E -Wp,-MM "$@" "$source" | sed "s#\(.*\.o$\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" >"$target"
13 changes: 6 additions & 7 deletions build/script/makedepend.xlC
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ shift
dir4=$1
shift

cwd=`pwd`
cwd=$(pwd)

cd `dirname $target`
$CXX -qmakedep -E -w $@ $cwd/$source >/dev/null

ufile=`basename $source`
ufile=`echo $ufile | sed "s#\.cpp#\.u#"`
cat $ufile | sort | uniq | grep -v '/usr/include' | grep -v '/usr/vacpp' | sed "s#\(.*\.o$\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" >$target
cd "$(dirname "$target")" || exit
$CXX -qmakedep -E -w "$@" "$cwd"/"$source" >/dev/null

ufile=$(basename "$source")
ufile=$(echo "$ufile" | sed "s#\.cpp#\.u#")
sort "$ufile" | uniq | grep -v '/usr/include' | grep -v '/usr/vacpp' | sed "s#\(.*\.o$\)#$dir1/\1 $dir2/\1 $dir3/\1 $dir4/\1#" >"$target"
12 changes: 6 additions & 6 deletions build/script/makeldpath
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ if [ "$POCO_BASE" == "" ] ; then
exit 1
fi

projectList=`cat ${POCO_BASE}/components`
projectList=$(cat "${POCO_BASE}"/components)

OSNAME=`uname`
OSARCH=`uname -m | tr " /" "_-"`
OSNAME=$(uname)
OSARCH=$(uname -m | tr " /" "_-")

for proj in $projectList ;
do
path=${POCO_BASE}/${proj}/lib/${OSNAME}/${OSARCH}
echo $path
if [ -d $path ] ; then
echo -n ":"$path
echo "$path"
if [ -d "$path" ] ; then
printf ":%s" "$path"
fi
done
8 changes: 4 additions & 4 deletions build/script/projname
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#

PROJECT_BASE=$1
cdir=`sh -c pwd`
cd $PROJECT_BASE
projbase=`sh -c pwd`
cd "$cdir"
cdir=$(sh -c pwd)
cd "$PROJECT_BASE" || exit
projbase=$(sh -c pwd)
cd "$cdir" || exit
sh -c pwd | sed "s:^$projbase::" | sed "s:^/::"
4 changes: 2 additions & 2 deletions build/script/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ do
echo "****************************************"
echo ""

runs=`expr $runs + 1`
runs=$((runs + 1))
sh -c "cd $POCO_BUILD/$comp/testsuite/$BINDIR && PATH=.:$PATH && LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH $TESTRUNNER $IGNORE $TESTRUNNERARGS"
if [ $? -ne 0 ] ; then
failures=`expr $failures + 1`
failures=$(("failures" + 1))
failedTests="$failedTests $comp"
status=1
fi
Expand Down
15 changes: 9 additions & 6 deletions ci/runtests.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#!/bin/sh

set -ev
osname=`uname`
osarch=`uname -m`
export POCO_BASE=`pwd`
export PATH=$PATH:.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.:$POCO_BASE/lib/$osname/$osarch
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:.:$POCO_BASE/lib/$osname/$osarch
osname=$(uname)
osarch=$(uname -m)
POCO_BASE=$(pwd)
export POCO_BASE
export PATH="$PATH":.
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":.:"$POCO_BASE"/lib/"$osname"/"$osarch"
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH":.:"$POCO_BASE"/lib/"$osname"/"$osarch"
if [ "TSAN" = "$1" ]
then
export TSAN_OPTIONS="suppressions=$POCO_BASE/tsan.suppress,second_deadlock_stack=1"
Expand Down
1 change: 1 addition & 0 deletions cppignore.lnx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CppUnit::TestCaller<FileChannelTest>.testPurgeAge
CppUnit::TestCaller<FileTest>.testFileAttributes2
CppUnit::TestCaller<PathTest>.testExpand
CppUnit::TestCaller<PathTest>.testExpandVariableFromPath
CppUnit::TestCaller<SyslogTest>.testOldBSD
CppUnit::TestCaller<ClockTest>.testClock
CppUnit::TestCaller<TimerTest>.testScheduleAtFixedRate
CppUnit::TestCaller<TimerTest>.testScheduleInterval
Expand Down
1 change: 1 addition & 0 deletions cppignore.win
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ class CppUnit::TestCaller<class WinServiceTest>.testServiceReturnsTrueIfStopped
class CppUnit::TestCaller<class ICMPSocketTest>.testSendToReceiveFrom
class CppUnit::TestCaller<class ICMPSocketTest>.testMTU
class CppUnit::TestCaller<class HTTPSClientSessionTest>.testCachedSession
class CppUnit::TestCaller<class PollSetTest>.testPollClosedServer

0 comments on commit bb51c87

Please sign in to comment.