diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /graphics/asymptote/tests/output |
Initial commit
Diffstat (limited to 'graphics/asymptote/tests/output')
-rw-r--r-- | graphics/asymptote/tests/output/Makefile | 41 | ||||
-rw-r--r-- | graphics/asymptote/tests/output/circle.asy | 1 | ||||
-rw-r--r-- | graphics/asymptote/tests/output/line.asy | 1 |
3 files changed, 43 insertions, 0 deletions
diff --git a/graphics/asymptote/tests/output/Makefile b/graphics/asymptote/tests/output/Makefile new file mode 100644 index 0000000000..938625ab03 --- /dev/null +++ b/graphics/asymptote/tests/output/Makefile @@ -0,0 +1,41 @@ +# Automated testing to see if the output of Asymptote scripts changes when the +# program is modified. + +# How to call asy from the tests/output/name.out directory +ASY=../../../asy + +TESTS=$(basename $(wildcard *.asy)) + +# This command performs the testing on all scripts. +diff: $(TESTS:=.diff) + +# This builds the reference copies of the output using a trusted version of asy +ref: $(TESTS:=.ref) + +$(TESTS:=.ref) $(TESTS:=.out): %: + @echo Generating $@ + @rm -rf $@ + @mkdir $@ + @cd $@; \ + $(ASY) -keep ../$(basename $@) \ + >$(basename $@).stdout 2>$(basename $@).stderr; \ + ls >$(basename $@).ls; \ + rm -f *.dvi *.pdf *.gif *.jpg *.jpeg *.png + +# Ignore lines with timestamps of the form hh:mm, since the time changes between +# runs. This regex is fairly broad and it may need to be narrowed. +$(TESTS:=.diff): %.diff: %.out + diff -I "[0-9][0-9]:[0-9][0-9]" -u $(@:.diff=.ref) $(@:.diff=.out) + +clean: + rm -rf *.out + +# The reference copies should only be built at the start, or when the behaviour +# of Asymptote is intentionally changed, so they are not usually removed by make +# clean. +veryclean: clean + rm -rf *.ref + +# This tells make to build every dependency from scratch, ignoring the dates on +# files. +.PHONY: $(TESTS:=.ref) $(TESTS:=.out) $(TESTS:=.diff) diff ref clean veryclean diff --git a/graphics/asymptote/tests/output/circle.asy b/graphics/asymptote/tests/output/circle.asy new file mode 100644 index 0000000000..e0300acdb8 --- /dev/null +++ b/graphics/asymptote/tests/output/circle.asy @@ -0,0 +1 @@ +draw(unitcircle); diff --git a/graphics/asymptote/tests/output/line.asy b/graphics/asymptote/tests/output/line.asy new file mode 100644 index 0000000000..21acd4fc4e --- /dev/null +++ b/graphics/asymptote/tests/output/line.asy @@ -0,0 +1 @@ +draw((0,0)--(100,0)); |