Build and dev system improvements (#4193)

* fix shellcheck warnings; add some ci ignore test entries

* fix(make): Redirect build stderr to a file #4112

* enh(dev): add vscode run script and launch items for tests
This commit is contained in:
Aleksandar Fabijanic 2023-10-18 18:48:20 +02:00 committed by GitHub
parent 8a268d4413
commit 701c8dae2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 391 additions and 56 deletions

1
.gitignore vendored
View File

@ -144,6 +144,7 @@ cmake-build/
*.bak
stage/
releases/
poco_build_stderr.out
# vim #
#######

261
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,261 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Linux GDB Foundation Test",
"variables": {
"libName": "Foundation"
},
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/${libName}/testsuite/bin/${env:OSNAME}/${env:OSARCH}/testrunnerd",
"args": ["-all"],
"environment": [ { "name": "PATH", "value": "${env:PATH}:${workspaceFolder}/${libName}/testsuite/bin/${env:OSNAME}/${env:OSARCH}" } ],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Linux GDB XML Test",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/XML/testsuite/bin/${env:OSNAME}/${env:OSARCH}/testrunnerd",
"args": ["-all"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Linux GDB JSON Test",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/JSON/testsuite/bin/${env:OSNAME}/${env:OSARCH}/testrunnerd",
"args": ["-all"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Linux GDB Util Test",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/Util/testsuite/bin/${env:OSNAME}/${env:OSARCH}/testrunnerd",
"args": ["-all"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Linux GDB Net Test",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/Net/testsuite/bin/${env:OSNAME}/${env:OSARCH}/testrunnerd",
"args": ["-all"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Linux GDB Crypto Test",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/Crypto/testsuite/bin/${env:OSNAME}/${env:OSARCH}/testrunnerd",
"args": ["-all"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Linux GDB Net SSL Test",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/NetSSL_OpenSSL/testsuite/bin/${env:OSNAME}/${env:OSARCH}/testrunnerd",
"args": ["-all"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Linux GDB Data Test",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/Data/testsuite/bin/${env:OSNAME}/${env:OSARCH}/testrunnerd",
"args": ["-all"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Linux GDB Data/SQLite Test",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/Data/SQLite/testsuite/bin/${env:OSNAME}/${env:OSARCH}/testrunnerd",
"args": ["-all"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Linux GDB Data/ODBC Test",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/Data/ODBC/testsuite/bin/${env:OSNAME}/${env:OSARCH}/testrunnerd",
"args": ["-all"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Linux GDB Data/MySQL Test",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/Data/MySQL/testsuite/bin/${env:OSNAME}/${env:OSARCH}/testrunnerd",
"args": ["-all"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Linux GDB Data/PostgreSQL Test",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/Data/PostgreSQL/testsuite/bin/${env:OSNAME}/${env:OSARCH}/testrunnerd",
"args": ["-all"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Linux GDB MongoDB Test",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/MongoDB/testsuite/bin/${env:OSNAME}/${env:OSARCH}/testrunnerd",
"args": ["-all"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Linux GDB Redis Test",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/Redis/testsuite/bin/${env:OSNAME}/${env:OSARCH}/testrunnerd",
"args": ["-all"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}

View File

@ -11,6 +11,9 @@
LINKMODE ?= SHARED
SANITIZEFLAGS ?=
#-fsanitize=address
#-fsanitize=undefined
#-fsanitize=thread
#
# Define Tools

View File

@ -41,69 +41,69 @@ $(OBJPATH_RELEASE_STATIC) $(OBJPATH_DEBUG_STATIC) $(OBJPATH_RELEASE_SHARED) $(OB
$(OBJPATH_DEBUG_STATIC)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(debug, static)"
$(CXX) $(INCLUDE) $(CXXFLAGS) $(DEBUGOPT_CXX) $(STATICOPT_CXX) -c $< -o $@
$(CXX) $(INCLUDE) $(CXXFLAGS) $(DEBUGOPT_CXX) $(STATICOPT_CXX) -c $< -o $@ $(POCO_BUILD_STDERR)
$(OBJPATH_RELEASE_STATIC)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(release, static)"
$(CXX) $(INCLUDE) $(CXXFLAGS) $(RELEASEOPT_CXX) $(STATICOPT_CXX) -c $< -o $@
$(CXX) $(INCLUDE) $(CXXFLAGS) $(RELEASEOPT_CXX) $(STATICOPT_CXX) -c $< -o $@ $(POCO_BUILD_STDERR)
$(OBJPATH_DEBUG_STATIC)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(debug, static)"
$(CC) $(INCLUDE) $(CFLAGS) $(DEBUGOPT_CC) $(STATICOPT_CC) -c $< -o $@
$(CC) $(INCLUDE) $(CFLAGS) $(DEBUGOPT_CC) $(STATICOPT_CC) -c $< -o $@ $(POCO_BUILD_STDERR)
$(OBJPATH_RELEASE_STATIC)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(release, static)"
$(CC) $(INCLUDE) $(CFLAGS) $(RELEASEOPT_CC) $(STATICOPT_CC) -c $< -o $@
$(CC) $(INCLUDE) $(CFLAGS) $(RELEASEOPT_CC) $(STATICOPT_CC) -c $< -o $@ $(POCO_BUILD_STDERR)
$(OBJPATH_DEBUG_SHARED)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(debug, shared)"
$(CXX) $(INCLUDE) $(CXXFLAGS) $(DEBUGOPT_CXX) $(SHAREDOPT_CXX) -c $< -o $@
$(CXX) $(INCLUDE) $(CXXFLAGS) $(DEBUGOPT_CXX) $(SHAREDOPT_CXX) -c $< -o $@ $(POCO_BUILD_STDERR)
$(OBJPATH_RELEASE_SHARED)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(release, shared)"
$(CXX) $(INCLUDE) $(CXXFLAGS) $(RELEASEOPT_CXX) $(SHAREDOPT_CXX) -c $< -o $@
$(CXX) $(INCLUDE) $(CXXFLAGS) $(RELEASEOPT_CXX) $(SHAREDOPT_CXX) -c $< -o $@ $(POCO_BUILD_STDERR)
$(OBJPATH_DEBUG_SHARED)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(debug, shared)"
$(CC) $(INCLUDE) $(CFLAGS) $(DEBUGOPT_CC) $(SHAREDOPT_CC) -c $< -o $@
$(CC) $(INCLUDE) $(CFLAGS) $(DEBUGOPT_CC) $(SHAREDOPT_CC) -c $< -o $@ $(POCO_BUILD_STDERR)
$(OBJPATH_RELEASE_SHARED)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(release, shared)"
$(CC) $(INCLUDE) $(CFLAGS) $(RELEASEOPT_CC) $(SHAREDOPT_CC) -c $< -o $@
$(CC) $(INCLUDE) $(CFLAGS) $(RELEASEOPT_CC) $(SHAREDOPT_CC) -c $< -o $@ $(POCO_BUILD_STDERR)
# Generated sources
$(OBJPATH_DEBUG_STATIC)/%.o: $(GENDIR)/%.cpp $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(debug, static)"
$(CXX) $(INCLUDE) $(CXXFLAGS) $(DEBUGOPT_CXX) $(STATICOPT_CXX) -c $< -o $@
$(CXX) $(INCLUDE) $(CXXFLAGS) $(DEBUGOPT_CXX) $(STATICOPT_CXX) -c $< -o $@ $(POCO_BUILD_STDERR)
$(OBJPATH_RELEASE_STATIC)/%.o: $(GENDIR)/%.cpp $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(release, static)"
$(CXX) $(INCLUDE) $(CXXFLAGS) $(RELEASEOPT_CXX) $(STATICOPT_CXX) -c $< -o $@
$(CXX) $(INCLUDE) $(CXXFLAGS) $(RELEASEOPT_CXX) $(STATICOPT_CXX) -c $< -o $@ $(POCO_BUILD_STDERR)
$(OBJPATH_DEBUG_STATIC)/%.o: $(GENDIR)/%.c $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(debug, static)"
$(CC) $(INCLUDE) $(CFLAGS) $(DEBUGOPT_CC) $(STATICOPT_CC) -c $< -o $@
$(CC) $(INCLUDE) $(CFLAGS) $(DEBUGOPT_CC) $(STATICOPT_CC) -c $< -o $@ $(POCO_BUILD_STDERR)
$(OBJPATH_RELEASE_STATIC)/%.o: $(GENDIR)/%.c $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(release, static)"
$(CC) $(INCLUDE) $(CFLAGS) $(RELEASEOPT_CC) $(STATICOPT_CC) -c $< -o $@
$(CC) $(INCLUDE) $(CFLAGS) $(RELEASEOPT_CC) $(STATICOPT_CC) -c $< -o $@ $(POCO_BUILD_STDERR)
$(OBJPATH_DEBUG_SHARED)/%.o: $(GENDIR)/%.cpp $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(debug, shared)"
$(CXX) $(INCLUDE) $(CXXFLAGS) $(DEBUGOPT_CXX) $(SHAREDOPT_CXX) -c $< -o $@
$(CXX) $(INCLUDE) $(CXXFLAGS) $(DEBUGOPT_CXX) $(SHAREDOPT_CXX) -c $< -o $@ $(POCO_BUILD_STDERR)
$(OBJPATH_RELEASE_SHARED)/%.o: $(GENDIR)/%.cpp $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(release, shared)"
$(CXX) $(INCLUDE) $(CXXFLAGS) $(RELEASEOPT_CXX) $(SHAREDOPT_CXX) -c $< -o $@
$(CXX) $(INCLUDE) $(CXXFLAGS) $(RELEASEOPT_CXX) $(SHAREDOPT_CXX) -c $< -o $@ $(POCO_BUILD_STDERR)
$(OBJPATH_DEBUG_SHARED)/%.o: $(GENDIR)/%.c $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(debug, shared)"
$(CC) $(INCLUDE) $(CFLAGS) $(DEBUGOPT_CC) $(SHAREDOPT_CC) -c $< -o $@
$(CC) $(INCLUDE) $(CFLAGS) $(DEBUGOPT_CC) $(SHAREDOPT_CC) -c $< -o $@ $(POCO_BUILD_STDERR)
$(OBJPATH_RELEASE_SHARED)/%.o: $(GENDIR)/%.c $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(release, shared)"
$(CC) $(INCLUDE) $(CFLAGS) $(RELEASEOPT_CC) $(SHAREDOPT_CC) -c $< -o $@
$(CC) $(INCLUDE) $(CFLAGS) $(RELEASEOPT_CC) $(SHAREDOPT_CC) -c $< -o $@ $(POCO_BUILD_STDERR)
#

View File

@ -42,6 +42,7 @@ include $(POCO_BASE)/build/rules/compile
# Rules for creating a dynamically loadable shared library
#
clean:
$(RM) $(POCO_BUILD_STDERR_FILE)
$(RM) $(OBJPATH)
$(RM) $(DYLIB_DEBUG) $(DYLIB_RELEASE) $(DYLIB_S_DEBUG) $(DYLIB_S_RELEASE)

View File

@ -29,6 +29,7 @@ include $(POCO_BASE)/build/rules/compile
# Rules for creating an executable
#
clean:
$(RM) $(POCO_BUILD_STDERR_FILE)
$(RM) $(OBJPATH)
$(RM) $(EXEC_RELEASE_STATIC) $(EXEC_DEBUG_STATIC) $(EXEC_RELEASE_SHARED) $(EXEC_DEBUG_SHARED)

View File

@ -7,6 +7,7 @@
# POCO_BASE: Path to POCO source tree. Must be defined.
# POCO_BUILD: Path to directory where build files are put.
# Defaults to $(POCO_BASE)
# POCO_BUILD_STDERR: Redirect command for build errors log file.
# POCO_CONFIG: Build configuration to use.
# Defaults to `uname`.
# POCO_TARGET_OSNAME: Target system operating system name (for cross builds)
@ -51,6 +52,15 @@ ifdef POCO_VERBOSE
$(info POCO_BUILD = $(POCO_BUILD))
endif
#
# Build errors/warnings output
#
ifndef POCO_BUILD_STDERR
POCO_BUILD_STDERR_FILE = "$(POCO_BASE)/build/poco_build_stderr.out"
$(shell rm -f $(POCO_BUILD_STDERR_FILE))
POCO_BUILD_STDERR = 2>&1|tee -a $(POCO_BUILD_STDERR_FILE)
endif
#
# POCO_BASE/POCO_BUILD/cwd sanity checks
#

View File

@ -46,6 +46,7 @@ include $(POCO_BASE)/build/rules/compile
# Rules for creating a library
#
clean:
$(RM) $(POCO_BUILD_STDERR_FILE)
$(RM) $(OBJPATH)
$(RM) $(LIB_RELEASE_STATIC) $(LIB_DEBUG_STATIC) $(LIB_RELEASE_SHARED) $(LIB_DEBUG_SHARED)
$(RM) $(LIB_DEBUG_SHARED_LINK) $(LIB_RELEASE_SHARED_LINK)

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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:^/::"

View File

@ -21,7 +21,7 @@
#
if [ "$POCO_BASE" = "" ] ; then
POCO_BASE=`pwd`
POCO_BASE=$(pwd)
fi
if [ "$POCO_BUILD" = "" ] ; then
@ -31,7 +31,7 @@ fi
TESTRUNNER=./testrunner
if [ "$1" = "" ] ; then
components=`cat $POCO_BASE/components`
components=$(cat "$POCO_BASE"/components)
else
components=$1
fi
@ -43,11 +43,11 @@ else
fi
if [ "$OSARCH" = "" ] ; then
OSARCH=`uname -m | tr ' /' _-`
OSARCH=$(uname -m | tr ' /' _-)
fi
if [ "$OSNAME" = "" ] ; then
OSNAME=`uname`
OSNAME=$(uname)
case $OSNAME in
CYGWIN*)
OSNAME=CYGWIN
@ -86,10 +86,10 @@ do
echo "****************************************"
echo ""
runs=`expr $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`
runs=$((runs + 1))
if ! sh -c "cd $POCO_BUILD/$comp/testsuite/$BINDIR && PATH=.:$PATH && LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH $TESTRUNNER $IGNORE $TESTRUNNERARGS";
then
failures=$((failures + 1))
failedTests="$failedTests $comp"
status=1
fi

View File

@ -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"

View File

@ -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

View File

@ -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

36
poco_env.bash Normal file
View File

@ -0,0 +1,36 @@
# usage:
# . env.bash
# or
# source env.bash
self="${BASH_SOURCE[0]}"
if [ "$self" == "$0" ] ; then
echo "This file must be sourced from bash, not run."
echo "Usage: . $0"
exit 1
fi
if [ -d "$self" ] ; then
basedir="$(cd "$self" || exit; pwd -P)"
else
basedir="$(cd "$(dirname "$self")" || exit; pwd -P)"
fi
OSNAME="${OSNAME:=$(uname -s)}"
export OSNAME
OSARCH="${OSARCH:=$(uname -m)}"
export OSARCH
POCO_BASE="$basedir"
export POCO_BASE
PATH=$POCO_BASE/lib/$OSNAME/$OSARCH:$POCO_BASE:$PATH
export PATH
# uncomment for sanitizer builds
#LSAN_OPTIONS=verbosity=1:log_threads=1
#export LSAN_OPTIONS
echo "\$OSNAME = $OSNAME"
echo "\$OSARCH = $OSARCH"
echo "\$POCO_BASE = $POCO_BASE"
echo "\$PATH = $PATH"

17
runVSCode.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
#
# this script sets the proper build/runtime
# environment before opening poco in vscode
self="${BASH_SOURCE[0]}"
if [ -d "$self" ] ; then
basedir="$(cd "$self" || exit; pwd -P)"
else
basedir="$(cd "$(dirname "$self")" || exit; pwd -P)"
fi
# shellcheck disable=SC1091
. "$basedir"/poco_env.bash
code "$basedir"