Docker image for running XSpec CI tests #643
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a
test/docker
directory with the files for creating a Docker image that contains all of the files needed to test an XSpec distribution. The Docker image currently does not contain the XSpec code. The XSpec distribution has to be mounted on the Docker container when the image is run:Since Docker has to be run as 'root' (even though running ordinary things as 'root' is generally a bad idea), the Docker container is set to run its program as a user with a UID and GID of '9998'. This doesn't make any difference on Windows, but when run on Linux, it's simplest if the entire XSpec distribution is owned by the '9998' UID:
(What XSpec really needs is a command-line parameter for generating files in a location other than under the directory that contains the XSpec file.)
I added
test/run-all-tests.sh
because a Docker image is supposed to run a single command.This is a work in progress. I'm still not sure whether or not it is a good idea, but I have multiple machines where I don't ordinarily have just the right versions of Saxon, etc., nor have a
SAXON_JAR
environment variable, so this is an attempt to have a set-up that will 'just work'. Prior to this, I couldn't getrun-bats.sh
to work properly under either Cygwin'sbash
or Git for Windows'bash
.