Use and document EXIV2_PORT

v0.27.3
clanmills 5 years ago
parent daff2a1536
commit 1146031be6

@ -752,8 +752,9 @@ Environment Variables used by test suite
| Variable | Default | Platforms | Purpose | | Variable | Default | Platforms | Purpose |
|:-- |:-- |:-- |:-- | |:-- |:-- |:-- |:-- |
| EXIV2_BINDIR | **\<exiv2dir\>/build/bin** | All Platforms | Locatation of built binary object (exiv2.exe) | | EXIV2_BINDIR | **\<exiv2dir\>/build/bin** | All Platforms | Location of built binary objects (exiv2.exe) |
| EXIV2_EXT | **.exe** | msvc<br>Cygwin<br>Msys<br>MinGW | Extension used by executable binaries | | EXIV2_PORT | **1276** | All Platforms | Test TCP/IP Port |
| EXIV2_EXT | **.exe** | msvc<br>Cygwin<br>MinGW/msys2 | Extension used by executable binaries |
| EXIV2_EXT | _**not set**_ | Linux<br>macOS<br>Unix| | | EXIV2_EXT | _**not set**_ | Linux<br>macOS<br>Unix| |
| EXIV2_ECHO | _**not set**_ | All Platforms | For debugging Bash scripts | | EXIV2_ECHO | _**not set**_ | All Platforms | For debugging Bash scripts |
| VALGRIND | _**not set**_ | All Platforms | For debugging Bash scripts | | VALGRIND | _**not set**_ | All Platforms | For debugging Bash scripts |
@ -1167,4 +1168,4 @@ $ sudo pkg install developer/gcc-7
[TOC](#TOC) [TOC](#TOC)
Written by Robin Mills<br>robin@clanmills.com<br>Updated: 2020-04-21 Written by Robin Mills<br>robin@clanmills.com<br>Updated: 2020-04-23

@ -21,18 +21,20 @@ source ./functions.source
# Test http I/O # Test http I/O
( cd "${testdir}/.." # testdir is the tmp output directory ( cd "${testdir}/.." # testdir is the tmp output directory
>&2 printf "*** HTTP tests begin\n" >&2 printf "*** HTTP tests begin\n"
port=9999 if [ ! -z $EXIV2_PORT ]; then port=EXIV2_PORT ; else port=1276; fi
url=http://0.0.0.0:$port url=http://0.0.0.0:$port
python3 -m http.server $port 2>&1 > /dev/null & # start a background local HTTP server in the "real" test directory python3 -m http.server $port 2>&1 > /dev/null & # start a background local HTTP server in the "real" test directory
sleep 2 # wait for it to init sleep 2 # wait for it to init
cd "$testdir" cd "$testdir"
test_files="table.jpg Reagan.tiff exiv2-bug922a.jpg" test_files="table.jpg Reagan.tiff exiv2-bug922a.jpg"
for i in $test_files; do for i in $test_files; do
runTest exiv2 -pa -g City -g DateTime $url/data/$i runTest exiv2 -pa -g City -g DateTime $url/data/$i
done done
>&2 printf "*** HTTP tests end\n"
kill $! # kill the server kill $! # kill the server
>&2 printf "*** HTTP tests end\n"
) | tr -d '\r' | sed 's/[ \t]+$//' > $results ) | tr -d '\r' | sed 's/[ \t]+$//' > $results
reportTest reportTest

Loading…
Cancel
Save