5 Commits

Author SHA1 Message Date
Tom Alexander
d90ff5891b Publish version 0.1.5.
All checks were successful
rustfmt Build rustfmt has succeeded
rust-test Build rust-test has succeeded
rust-foreign-document-test Build rust-foreign-document-test has succeeded
rust-build Build rust-build has succeeded
2023-09-06 16:19:42 -04:00
Tom Alexander
a3c01805b8 Merge branch 'foreign_document_test'
All checks were successful
rustfmt Build rustfmt has succeeded
rust-build Build rust-build has succeeded
rust-test Build rust-test has succeeded
rust-foreign-document-test Build rust-foreign-document-test has succeeded
2023-09-06 16:17:52 -04:00
Tom Alexander
e3d755317d Add a top-level makefile target for running the foreign document test. 2023-09-06 16:17:42 -04:00
Tom Alexander
b89607fc8b Handle CARGO_TARGET_DIR not being set.
All checks were successful
rust-test Build rust-test has succeeded
rust-foreign-document-test Build rust-foreign-document-test has succeeded
rust-build Build rust-build has succeeded
2023-09-06 16:12:41 -04:00
Tom Alexander
51c4e2b62a Only use local folder for docker context.
Some checks failed
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded
rust-foreign-document-test Build rust-foreign-document-test has failed
2023-09-06 16:03:59 -04:00
7 changed files with 13 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "organic" name = "organic"
version = "0.1.4" version = "0.1.5"
authors = ["Tom Alexander <tom@fizz.buzz>"] authors = ["Tom Alexander <tom@fizz.buzz>"]
description = "An org-mode parser." description = "An org-mode parser."
edition = "2021" edition = "2021"

View File

@@ -42,6 +42,10 @@ dockertest:
> $(MAKE) -C docker/organic_test > $(MAKE) -C docker/organic_test
> docker run --init --rm -i -t --read-only -v "$$(readlink -f ./):/source:ro" --mount type=tmpfs,destination=/tmp --mount source=cargo-cache,target=/usr/local/cargo/registry --mount source=rust-cache,target=/target --env CARGO_TARGET_DIR=/target -w /source organic-test --no-default-features --features compare --no-fail-fast --lib --test test_loader -- --test-threads $(TESTJOBS) > docker run --init --rm -i -t --read-only -v "$$(readlink -f ./):/source:ro" --mount type=tmpfs,destination=/tmp --mount source=cargo-cache,target=/usr/local/cargo/registry --mount source=rust-cache,target=/target --env CARGO_TARGET_DIR=/target -w /source organic-test --no-default-features --features compare --no-fail-fast --lib --test test_loader -- --test-threads $(TESTJOBS)
.PHONY: foreign_document_test
foreign_document_test:
> $(MAKE) -C docker/organic_test run_foreign_document_test
.PHONY: dockerclean .PHONY: dockerclean
dockerclean: dockerclean:
# Delete volumes created for running the tests in docker. This does not touch anything related to the jaeger docker container. # Delete volumes created for running the tests in docker. This does not touch anything related to the jaeger docker container.

View File

@@ -6,7 +6,7 @@ all: build push
.PHONY: build .PHONY: build
build: build:
docker build -t $(IMAGE_NAME) -f Dockerfile ../../ docker build -t $(IMAGE_NAME) -f Dockerfile .
.PHONY: push .PHONY: push
push: push:

View File

@@ -6,7 +6,7 @@ all: build push
.PHONY: build .PHONY: build
build: build:
docker build -t $(IMAGE_NAME) -f Dockerfile ../../ docker build -t $(IMAGE_NAME) -f Dockerfile .
.PHONY: push .PHONY: push
push: push:

View File

@@ -43,6 +43,6 @@ FROM tester as foreign-document-test
RUN apk add --no-cache bash RUN apk add --no-cache bash
RUN mkdir /foreign_documents RUN mkdir /foreign_documents
COPY --from=build-org-mode /root/org-mode/doc /foreign_documents/org-mode COPY --from=build-org-mode /root/org-mode/doc /foreign_documents/org-mode
COPY docker/organic_test/foreign_document_test_entrypoint.sh /entrypoint.sh COPY foreign_document_test_entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -6,11 +6,11 @@ all: build push
.PHONY: build .PHONY: build
build: build:
docker build -t $(IMAGE_NAME) -f Dockerfile --target tester ../../ docker build -t $(IMAGE_NAME) -f Dockerfile --target tester .
.PHONY: build_foreign_document_test .PHONY: build_foreign_document_test
build_foreign_document_test: build_foreign_document_test:
docker build -t $(IMAGE_NAME)-foreign-document -f Dockerfile --target foreign-document-test ../../ docker build -t $(IMAGE_NAME)-foreign-document -f Dockerfile --target foreign-document-test .
.PHONY: push .PHONY: push
push: push:

View File

@@ -18,6 +18,9 @@ function die {
function main { function main {
cargo build --no-default-features --features compare --profile release-lto cargo build --no-default-features --features compare --profile release-lto
if [ "${CARGO_TARGET_DIR:-}" = "" ]; then
CARGO_TARGET_DIR=$(realpath target/)
fi
PARSE="${CARGO_TARGET_DIR}/release-lto/parse" PARSE="${CARGO_TARGET_DIR}/release-lto/parse"
run_compare "org-mode/org-guide.org" "/foreign_documents/org-mode/org-guide.org" run_compare "org-mode/org-guide.org" "/foreign_documents/org-mode/org-guide.org"