mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-21 20:50:07 +00:00
removed old createDockerImages added explicit words SUCCESS and FAILURE in browser_tests
This commit is contained in:
parent
658b064604
commit
32f37576d5
@ -199,8 +199,8 @@ Typically, most users, will run one of the following "top-level" scripts:
|
||||
`pdf2htmlEX`, installs it and `poppler-data` into a Debian archive
|
||||
(`*.deb`).
|
||||
|
||||
- **`createDockerImage`**: Using an already compile version of
|
||||
`pdf2htmlEX`, installs it and `poppler-data` into a Docker image.
|
||||
- **`createDockerUbuntuImageFromDeb`**: Installs the Debian archive of
|
||||
`pdf2htmlEX` created by `createDebianPackage` into a Docker image.
|
||||
|
||||
- **`getBuildTools`**: Locally `apt` installs all development *tools*
|
||||
required to build `pdf2htmlEX`.
|
||||
|
@ -50,7 +50,7 @@ set -ev
|
||||
|
||||
#./buildScripts/createAppImage
|
||||
|
||||
#./buildScripts/createDockerImage
|
||||
#./buildScripts/createDockerUbuntuImageFromDeb
|
||||
|
||||
#./buildScripts/uploadGitHubRelease
|
||||
|
||||
|
@ -1,46 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This bash script creates a docker image from an existing pdf2htmlEX
|
||||
#
|
||||
# This is the part which can run *inside* a docker container.
|
||||
|
||||
echo ""
|
||||
echo "-------------------------------------------------------------------"
|
||||
echo "CREATING pdf2htmlEX Docker Image (run inside a docker container)"
|
||||
echo "-------------------------------------------------------------------"
|
||||
echo ""
|
||||
|
||||
# Collect everything that will be needed...
|
||||
|
||||
source buildScripts/reSourceVersionEnvs
|
||||
|
||||
source buildScripts/dockerFunctions
|
||||
|
||||
set -ev
|
||||
|
||||
mkdir -p imageBuild/dockerDir
|
||||
|
||||
cd pdf2htmlEX/build
|
||||
|
||||
sudo rm -rf install_manifest.txt
|
||||
|
||||
make install DESTDIR=../../imageBuild/dockerDir
|
||||
|
||||
cd ../../poppler-data
|
||||
|
||||
make install \
|
||||
prefix=$PDF2HTMLEX_PREFIX \
|
||||
datadir=$PDF2HTMLEX_PREFIX/share/pdf2htmlEX \
|
||||
DESTDIR=../imageBuild/dockerDir
|
||||
|
||||
cd ../imageBuild/dockerDir
|
||||
|
||||
copy_deps
|
||||
|
||||
# Make sure directories can be traversed by nobody
|
||||
#
|
||||
#find . -type d -exec chmod 755 {} \;
|
||||
#
|
||||
# Make sure files can be read by nobody
|
||||
#
|
||||
#find . -type f -exec chmod 644 {} \;
|
@ -1,62 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This bash script creates a docker image from an existing pdf2htmlEX
|
||||
#
|
||||
# This is the part which must be run *outside* of any docker container.
|
||||
|
||||
echo ""
|
||||
echo "-------------------------------------------------------------------"
|
||||
echo "CREATING pdf2htmlEX Docker Image (run outside any docker container)"
|
||||
echo "-------------------------------------------------------------------"
|
||||
echo ""
|
||||
|
||||
# Collect everything that will be needed...
|
||||
|
||||
source buildScripts/reSourceVersionEnvs
|
||||
|
||||
source buildScripts/dockerFunctions
|
||||
|
||||
set -ev
|
||||
|
||||
mkdir -p imageBuild/dockerDir
|
||||
|
||||
cd imageBuild/dockerDir
|
||||
|
||||
if [ -z "$DOCKER_FROM" ]; then
|
||||
echo ""
|
||||
read -p "Enter the docker image for the 'from' base: " DOCKER_FROM
|
||||
echo ""
|
||||
if [ -z "$DOCKER_FROM" ]; then
|
||||
echo "DOCKER_FROM not set... so we can not build the docker image"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$DOCKER_USERNAME" ]; then
|
||||
echo ""
|
||||
read -p "Enter a docker username: " DOCKER_USERNAME
|
||||
echo ""
|
||||
if [ -z "$DOCKER_USERNAME" ]; then
|
||||
echo "DOCKER_USERNAME not set... so we can not build the docker image"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
export DOCKER_NAME="$DOCKER_USERNAME/pdf2htmlex:$PDF2HTMLEX_BRANCH-$BUILD_TIME"
|
||||
|
||||
echo "export DOCKER_FROM=\"$DOCKER_FROM\"" >> ../../buildScripts/reSourceVersionEnvs
|
||||
echo "export DOCKER_USERNAME=\"$DOCKER_USERNAME\"" >> ../../buildScripts/reSourceVersionEnvs
|
||||
echo "export DOCKER_NAME=\"$DOCKER_NAME\"" >> ../../buildScripts/reSourceVersionEnvs
|
||||
|
||||
delete_blacklisted
|
||||
|
||||
cat > Dockerfile <<DOCKERFILE_HERE_DOC
|
||||
FROM $DOCKER_FROM
|
||||
COPY ./ /
|
||||
RUN /sbin/ldconfig
|
||||
ENTRYPOINT ["$PDF2HTMLEX_PREFIX/bin/pdf2htmlEX"]
|
||||
DOCKERFILE_HERE_DOC
|
||||
|
||||
cd ..
|
||||
|
||||
docker build -t $DOCKER_NAME dockerDir
|
@ -13,10 +13,8 @@ set -ev
|
||||
|
||||
./buildScripts/createDebianPackage
|
||||
|
||||
./buildScripts/createDockerImageInside
|
||||
|
||||
if [ -x "$(which docker)" ]; then
|
||||
./buildScripts/createDockerImageOutside
|
||||
./buildScripts/createDockerUbuntuImageFromDeb
|
||||
fi
|
||||
|
||||
|
||||
|
@ -35,7 +35,5 @@ export DEBIAN_FRONTEND=noninteractive
|
||||
./buildScripts/createAppImage
|
||||
./buildScripts/createDebianPackage
|
||||
./buildScripts/createDockerUbuntuImageFromDeb
|
||||
#./buildScripts/createDockerImageInside
|
||||
#./buildScripts/createDockerImageOutside
|
||||
./buildScripts/uploadGitHubRelease
|
||||
./buildScripts/uploadDockerImage
|
||||
#./buildScripts/uploadGitHubRelease
|
||||
#./buildScripts/uploadDockerImage
|
||||
|
@ -94,9 +94,9 @@ class BrowserTests(Common):
|
||||
print("\nTesting at: [", basefilename, "]")
|
||||
|
||||
if diff_bbox is None:
|
||||
print(" passed")
|
||||
print(" SUCCESS: ", basefilename)
|
||||
else:
|
||||
print(" diff bounding box: ", diff_bbox, " should be None")
|
||||
print(" FAILURE: ", basefilename, " diff bounding box: ", diff_bbox, " should be None")
|
||||
diff_size = (diff_bbox[2] - diff_bbox[0]) * (diff_bbox[3] - diff_bbox[1])
|
||||
img_size = ref_img.size[0] * ref_img.size[1]
|
||||
self.fail(('PNG files %s and %s differ by at most %d pixels, '+
|
||||
|
Loading…
Reference in New Issue
Block a user