Make the integration test script work from anywhere.
This commit is contained in:
parent
d3bb642a10
commit
8214efdfcb
23
org_mode_samples/property_drawer/Makefile
Normal file
23
org_mode_samples/property_drawer/Makefile
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
SHELL := bash
|
||||||
|
.ONESHELL:
|
||||||
|
.SHELLFLAGS := -eu -o pipefail -c
|
||||||
|
.DELETE_ON_ERROR:
|
||||||
|
MAKEFLAGS += --warn-undefined-variables
|
||||||
|
MAKEFLAGS += --no-builtin-rules
|
||||||
|
SRCFILES := $(wildcard *.org)
|
||||||
|
OUTFILES := $(patsubst %.org,%.tree.txt,$(SRCFILES))
|
||||||
|
|
||||||
|
ifeq ($(origin .RECIPEPREFIX), undefined)
|
||||||
|
$(error This Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later)
|
||||||
|
endif
|
||||||
|
.RECIPEPREFIX = >
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
all: $(OUTFILES)
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
> rm -rf $(OUTFILES)
|
||||||
|
|
||||||
|
%.tree.txt: %.org ../common.el ../dump_org_ast.bash
|
||||||
|
> ../dump_org_ast.bash $< $@
|
8
org_mode_samples/property_drawer/zeroth_section.org
Normal file
8
org_mode_samples/property_drawer/zeroth_section.org
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Blank lines and comments can come before property drawers in the zeroth section
|
||||||
|
:PROPERTIES:
|
||||||
|
:FOO: bar
|
||||||
|
:END:
|
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Blank lines and comments can come before property drawers in the zeroth section
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
:PROPERTIES:
|
||||||
|
:FOO: bar
|
||||||
|
:END:
|
@ -4,9 +4,7 @@ set -euo pipefail
|
|||||||
IFS=$'\n\t'
|
IFS=$'\n\t'
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
cd "$DIR/../"
|
samples_dir=$(readlink -f "$DIR/../org_mode_samples")
|
||||||
|
|
||||||
samples_dir=$(readlink -f "org_mode_samples")
|
|
||||||
|
|
||||||
function get_test_names {
|
function get_test_names {
|
||||||
for test_file in "$@"
|
for test_file in "$@"
|
||||||
@ -23,5 +21,5 @@ function get_test_names {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get_test_names "$@" | while read test; do
|
get_test_names "$@" | while read test; do
|
||||||
cargo test --no-fail-fast --test test_loader "$test"
|
(cd "$DIR/../" && cargo test --no-fail-fast --test test_loader "$test")
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user