README | 10 ++++++++-- t/.gitignore | 1 - t/apenwarr-000-set-minus-e.t | 1 + t/apenwarr-010-jobserver.t | 1 + t/apenwarr-100-args.t | 1 + t/apenwarr-101-atime.t | 1 + t/apenwarr-102-empty.t | 1 + t/apenwarr-103-unicode.t | 1 + t/apenwarr-104-space.t | 1 + t/apenwarr-105-sympath.t | 1 + t/apenwarr-110-compile.t | 1 + t/apenwarr-111-example.t | 1 + t/apenwarr-120-defaults-flat.t | 1 + t/apenwarr-121-defaults-nested.t | 1 + t/apenwarr-122-defaults-parent.t | 1 + t/apenwarr-130-mode.t | 1 + t/apenwarr/000-set-minus-e/.gitignore | 1 + t/apenwarr/000-set-minus-e/all.do | 4 ++++ t/apenwarr/000-set-minus-e/clean.do | 1 + t/apenwarr/000-set-minus-e/fatal.do | 4 ++++ t/apenwarr/010-jobserver/.gitignore | 6 ++++++ t/apenwarr/010-jobserver/all.do | 5 +++++ t/apenwarr/010-jobserver/clean.do | 2 ++ t/apenwarr/010-jobserver/default.spin.do | 4 ++++ t/apenwarr/010-jobserver/default.x.do | 1 + t/apenwarr/010-jobserver/first.do | 24 ++++++++++++++++++++++++ t/apenwarr/010-jobserver/second.do | 8 ++++++++ t/apenwarr/010-jobserver/serialtest.do | 3 +++ t/apenwarr/100-args/.gitignore | 1 + t/apenwarr/100-args/all.do | 1 + t/apenwarr/100-args/clean.do | 1 + t/apenwarr/100-args/default.args.do | 3 +++ t/apenwarr/100-args/noargs/all.do | 1 + t/apenwarr/100-args/noargs/run.do | 3 +++ t/apenwarr/100-args/passfail.do | 6 ++++++ t/apenwarr/100-args/passfailtest.do | 13 +++++++++++++ t/apenwarr/100-args/test2.args.do | 3 +++ t/apenwarr/101-atime/.gitignore | 1 + t/apenwarr/101-atime/all.do | 1 + t/apenwarr/101-atime/atime.do | 1 + t/apenwarr/101-atime/atime2.do | 6 ++++++ t/apenwarr/101-atime/clean.do | 1 + t/apenwarr/101-atime/tick.py | 6 ++++++ t/apenwarr/102-empty/.gitignore | 3 +++ t/apenwarr/102-empty/all.do | 1 + t/apenwarr/102-empty/blank.do | 3 +++ t/apenwarr/102-empty/clean.do | 1 + t/apenwarr/102-empty/silencetest.do | 11 +++++++++++ t/apenwarr/102-empty/touchtest.do | 41 +++++++++++++++++++++++++++++++++++++++++ t/apenwarr/103-unicode/all.do | 1 + t/apenwarr/103-unicode/clean.do | 1 + t/apenwarr/103-unicode/unicode.do | 16 ++++++++++++++++ t/apenwarr/104-space/all.do | 1 + t/apenwarr/104-space/clean.do | 1 + t/apenwarr/104-space/space dir/.gitignore | 2 ++ t/apenwarr/104-space/space dir/clean.do | 1 + t/apenwarr/104-space/space dir/space 2.do | 1 + t/apenwarr/104-space/space dir/space file.do | 1 + t/apenwarr/104-space/space dir/test.do | 6 ++++++ t/apenwarr/105-sympath/.gitignore | 5 +++++ t/apenwarr/105-sympath/all.do | 26 ++++++++++++++++++++++++++ t/apenwarr/105-sympath/clean.do | 2 ++ t/apenwarr/105-sympath/default.dyn.do | 2 ++ t/apenwarr/110-compile/.gitignore | 5 +++++ t/apenwarr/110-compile/CC.do | 5 +++++ t/apenwarr/110-compile/LD.do | 7 +++++++ t/apenwarr/110-compile/all.do | 6 ++++++ t/apenwarr/110-compile/bellow.do | 3 +++ t/apenwarr/110-compile/clean.do | 3 +++ t/apenwarr/110-compile/hello.c | 7 +++++++ t/apenwarr/110-compile/hello.do | 3 +++ t/apenwarr/110-compile/hello.o.do | 11 +++++++++++ t/apenwarr/110-compile/yellow.do | 3 +++ t/apenwarr/110-compile/yellow.o.do | 3 +++ t/apenwarr/111-example/.gitignore | 3 +++ t/apenwarr/111-example/CC.do | 11 +++++++++++ t/apenwarr/111-example/Makefile | 6 ++++++ t/apenwarr/111-example/all.do | 6 ++++++ t/apenwarr/111-example/clean.do | 1 + t/apenwarr/111-example/config.sh | 1 + t/apenwarr/111-example/default.o.do | 2 ++ t/apenwarr/111-example/hello.do | 4 ++++ t/apenwarr/111-example/main.c | 8 ++++++++ t/apenwarr/111-example/mystr.c | 4 ++++ t/apenwarr/111-example/mystr.h | 6 ++++++ t/apenwarr/120-defaults-flat/.gitignore | 6 ++++++ t/apenwarr/120-defaults-flat/all.do | 1 + t/apenwarr/120-defaults-flat/c.c.c.b.b.a | 1 + t/apenwarr/120-defaults-flat/c.do | 3 +++ t/apenwarr/120-defaults-flat/clean.do | 2 ++ t/apenwarr/120-defaults-flat/default.b.do | 10 ++++++++++ t/apenwarr/120-defaults-flat/default.c.c.do | 4 ++++ t/apenwarr/120-defaults-flat/default.c.do | 4 ++++ t/apenwarr/120-defaults-flat/default.do | 4 ++++ t/apenwarr/121-defaults-nested/.gitignore | 15 +++++++++++++++ t/apenwarr/121-defaults-nested/a/b/default.y.z.do | 1 + t/apenwarr/121-defaults-nested/a/b/file.x.y.z.do | 1 + t/apenwarr/121-defaults-nested/a/d/default.do | 1 + t/apenwarr/121-defaults-nested/a/default.x.y.z.do | 2 ++ t/apenwarr/121-defaults-nested/a/default.z.do | 1 + t/apenwarr/121-defaults-nested/all.do | 1 + t/apenwarr/121-defaults-nested/clean.do | 6 ++++++ t/apenwarr/121-defaults-nested/default.do | 1 + t/apenwarr/121-defaults-nested/test.do | 36 ++++++++++++++++++++++++++++++++++++ t/apenwarr/122-defaults-parent/.gitignore | 1 + t/apenwarr/122-defaults-parent/all.do | 32 ++++++++++++++++++++++++++++++++ t/apenwarr/122-defaults-parent/clean.do | 2 ++ t/apenwarr/122-defaults-parent/inner/default.do | 2 ++ t/apenwarr/122-defaults-parent/inner2/default.do | 2 ++ t/apenwarr/130-mode/.gitignore | 1 + t/apenwarr/130-mode/all.do | 5 +++++ t/apenwarr/130-mode/clean.do | 1 + t/apenwarr/130-mode/mode1.do | 1 + t/apenwarr/README | 13 +++++++++++++ t/apenwarr/all.do | 9 +++++++++ t/apenwarr/clean.do | 3 +++ t/apenwarr/sleep | 4 ++++ t/apenwarr/wrapper.rc | 13 +++++++++++++ t/clean.do | 7 ++----- t/prepare.do | 17 ----------------- t/redo-sh.tests/README | 3 +++ t/redo-sh.tests/clean.do | 4 ++++ t/redo-sh.tests/dependency_ne_dofile_1/test | 30 ++++++++++++++++++++++++++++++ t/redo-sh.tests/dependency_ne_dofile_2/test | 42 ++++++++++++++++++++++++++++++++++++++++++ t/redo-sh.tests/dependency_ne_nobuild_1/test | 15 +++++++++++++++ t/redo-sh.tests/dependency_ne_rebuild_1/test | 16 ++++++++++++++++ t/redo-sh.tests/dependency_nobuild_1/test | 16 ++++++++++++++++ t/redo-sh.tests/dependency_nobuild_2/test | 20 ++++++++++++++++++++ t/redo-sh.tests/dependency_nobuild_3/test | 24 ++++++++++++++++++++++++ t/redo-sh.tests/dependency_rebuild_1/test | 16 ++++++++++++++++ t/redo-sh.tests/dependency_rebuild_2/test | 20 ++++++++++++++++++++ t/redo-sh.tests/dependency_rebuild_3/test | 24 ++++++++++++++++++++++++ t/redo-sh.tests/dofile_generated_1/test | 17 +++++++++++++++++ t/redo-sh.tests/dofile_generated_2/test | 22 ++++++++++++++++++++++ t/redo-sh.tests/parallel_1/test | 25 +++++++++++++++++++++++++ t/redo-sh.tests/whichdo_absolute_1/test | 46 ++++++++++++++++++++++++++++++++++++++++++++++ t/redo-sh.tests/whichdo_absolute_2/test | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ t/redo-sh.tests/whichdo_absolute_default_1/test | 22 ++++++++++++++++++++++ t/redo-sh.tests/whichdo_absolute_default_2/test | 21 +++++++++++++++++++++ t/redo-sh.tests/whichdo_relative_1/test | 46 ++++++++++++++++++++++++++++++++++++++++++++++ t/redo-sh.tests/whichdo_relative_2/test | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ t/redo-sh.tests/whichdo_relative_default_1/test | 22 ++++++++++++++++++++++ t/redo-sh.tests/whichdo_relative_default_2/test | 21 +++++++++++++++++++++ t/redo-sh.tests/wrapper.rc | 13 +++++++++++++ t/redosh-dependency_ne_dofile_1.t | 1 + t/redosh-dependency_ne_dofile_2.t | 1 + t/redosh-dependency_ne_nobuild_1.t | 1 + t/redosh-dependency_ne_rebuild_1.t | 1 + t/redosh-dependency_nobuild_1.t | 1 + t/redosh-dependency_nobuild_2.t | 1 + t/redosh-dependency_nobuild_3.t | 1 + t/redosh-dependency_rebuild_1.t | 1 + t/redosh-dependency_rebuild_2.t | 1 + t/redosh-dependency_rebuild_3.t | 1 + t/redosh-dofile_generated_1.t | 1 + t/redosh-dofile_generated_2.t | 1 + t/redosh-parallel_1.t | 1 + t/redosh-whichdo_absolute_1.t | 1 + t/redosh-whichdo_absolute_2.t | 1 + t/redosh-whichdo_absolute_default_1.t | 1 + t/redosh-whichdo_absolute_default_2.t | 1 + t/redosh-whichdo_relative_1.t | 1 + t/redosh-whichdo_relative_2.t | 1 + t/redosh-whichdo_relative_default_1.t | 1 + t/redosh-whichdo_relative_default_2.t | 1 + t/runner.rc | 10 ---------- usage.go | 4 ++-- diff --git a/README b/README index f68ffe4c43815d27f64304c75683714a3377f4f674002323e081e3677643832b..d64f295818f531765ffb8d6d419a81753056a9b185f4598a66d8d1d1967da246 100644 --- a/README +++ b/README @@ -9,6 +9,9 @@ apenwarr/redo (https://redo.readthedocs.io/en/latest/) were also implemented. Why yet another implementation? It is feature full and has better performance comparing to shell and Python implementation. +It passes tests from dieweltistgarnichtso.net's redo-sh.tests and +implementation-neutral from apenwarr/redo. + goredo is free software: see the file COPYING for copying conditions. Home page: http://www.goredo.cypherpunks.ru/ @@ -25,7 +28,7 @@ problems with the authenticity on your side, then build it manually: > $ git clone git://git.cypherpunks.ru/goredo.git $ cd goredo - $ git tag -v v0.5.0 + $ git tag -v v0.6.0 $ git clone git://git.cypherpunks.ru/gorecfile.git $ ( cd gorecfile ; git tag -v v0.3.0 ) $ echo "replace go.cypherpunks.ru/recfile => `pwd`/gorecfile" >> go.mod @@ -46,7 +49,10 @@ * .do search goes up to / by default, but can be limited with either $REDO_TOP_DIR environment variable, or by having .redo/top file in it * target's completion messages are written after they finish * executable .do is run as is, non-executable is run with /bin/sh -e[x] -* tracing (-x) can be done only for non-executable .do +* tracing (-x) can be obviously done only for non-executable .do +* parallizable build is done only during redo-ifchange for human + convenience: you can globally enable REDO_JOBS, but still do for + example: redo htmls infos index upload FEATURES *goredo-features* diff --git a/t/.gitignore b/t/.gitignore deleted file mode 100644 index 1a3ea16715105868f06458516688df82052e1c20ab245b9b1ed5ba9f3ac7de11..0000000000000000000000000000000000000000 --- a/t/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/*.t diff --git a/t/apenwarr-000-set-minus-e.t b/t/apenwarr-000-set-minus-e.t new file mode 120000 index 0000000000000000000000000000000000000000..5b698cda62b3e2881aa0458ad0d715053fcdeb6dc55ab0dc958fa5daf2a392f8 --- /dev/null +++ b/t/apenwarr-000-set-minus-e.t @@ -0,0 +1 @@ +apenwarr/wrapper.rc \ No newline at end of file diff --git a/t/apenwarr-010-jobserver.t b/t/apenwarr-010-jobserver.t new file mode 120000 index 0000000000000000000000000000000000000000..5b698cda62b3e2881aa0458ad0d715053fcdeb6dc55ab0dc958fa5daf2a392f8 --- /dev/null +++ b/t/apenwarr-010-jobserver.t @@ -0,0 +1 @@ +apenwarr/wrapper.rc \ No newline at end of file diff --git a/t/apenwarr-100-args.t b/t/apenwarr-100-args.t new file mode 120000 index 0000000000000000000000000000000000000000..5b698cda62b3e2881aa0458ad0d715053fcdeb6dc55ab0dc958fa5daf2a392f8 --- /dev/null +++ b/t/apenwarr-100-args.t @@ -0,0 +1 @@ +apenwarr/wrapper.rc \ No newline at end of file diff --git a/t/apenwarr-101-atime.t b/t/apenwarr-101-atime.t new file mode 120000 index 0000000000000000000000000000000000000000..5b698cda62b3e2881aa0458ad0d715053fcdeb6dc55ab0dc958fa5daf2a392f8 --- /dev/null +++ b/t/apenwarr-101-atime.t @@ -0,0 +1 @@ +apenwarr/wrapper.rc \ No newline at end of file diff --git a/t/apenwarr-102-empty.t b/t/apenwarr-102-empty.t new file mode 120000 index 0000000000000000000000000000000000000000..5b698cda62b3e2881aa0458ad0d715053fcdeb6dc55ab0dc958fa5daf2a392f8 --- /dev/null +++ b/t/apenwarr-102-empty.t @@ -0,0 +1 @@ +apenwarr/wrapper.rc \ No newline at end of file diff --git a/t/apenwarr-103-unicode.t b/t/apenwarr-103-unicode.t new file mode 120000 index 0000000000000000000000000000000000000000..5b698cda62b3e2881aa0458ad0d715053fcdeb6dc55ab0dc958fa5daf2a392f8 --- /dev/null +++ b/t/apenwarr-103-unicode.t @@ -0,0 +1 @@ +apenwarr/wrapper.rc \ No newline at end of file diff --git a/t/apenwarr-104-space.t b/t/apenwarr-104-space.t new file mode 120000 index 0000000000000000000000000000000000000000..5b698cda62b3e2881aa0458ad0d715053fcdeb6dc55ab0dc958fa5daf2a392f8 --- /dev/null +++ b/t/apenwarr-104-space.t @@ -0,0 +1 @@ +apenwarr/wrapper.rc \ No newline at end of file diff --git a/t/apenwarr-105-sympath.t b/t/apenwarr-105-sympath.t new file mode 120000 index 0000000000000000000000000000000000000000..5b698cda62b3e2881aa0458ad0d715053fcdeb6dc55ab0dc958fa5daf2a392f8 --- /dev/null +++ b/t/apenwarr-105-sympath.t @@ -0,0 +1 @@ +apenwarr/wrapper.rc \ No newline at end of file diff --git a/t/apenwarr-110-compile.t b/t/apenwarr-110-compile.t new file mode 120000 index 0000000000000000000000000000000000000000..5b698cda62b3e2881aa0458ad0d715053fcdeb6dc55ab0dc958fa5daf2a392f8 --- /dev/null +++ b/t/apenwarr-110-compile.t @@ -0,0 +1 @@ +apenwarr/wrapper.rc \ No newline at end of file diff --git a/t/apenwarr-111-example.t b/t/apenwarr-111-example.t new file mode 120000 index 0000000000000000000000000000000000000000..5b698cda62b3e2881aa0458ad0d715053fcdeb6dc55ab0dc958fa5daf2a392f8 --- /dev/null +++ b/t/apenwarr-111-example.t @@ -0,0 +1 @@ +apenwarr/wrapper.rc \ No newline at end of file diff --git a/t/apenwarr-120-defaults-flat.t b/t/apenwarr-120-defaults-flat.t new file mode 120000 index 0000000000000000000000000000000000000000..5b698cda62b3e2881aa0458ad0d715053fcdeb6dc55ab0dc958fa5daf2a392f8 --- /dev/null +++ b/t/apenwarr-120-defaults-flat.t @@ -0,0 +1 @@ +apenwarr/wrapper.rc \ No newline at end of file diff --git a/t/apenwarr-121-defaults-nested.t b/t/apenwarr-121-defaults-nested.t new file mode 120000 index 0000000000000000000000000000000000000000..5b698cda62b3e2881aa0458ad0d715053fcdeb6dc55ab0dc958fa5daf2a392f8 --- /dev/null +++ b/t/apenwarr-121-defaults-nested.t @@ -0,0 +1 @@ +apenwarr/wrapper.rc \ No newline at end of file diff --git a/t/apenwarr-122-defaults-parent.t b/t/apenwarr-122-defaults-parent.t new file mode 120000 index 0000000000000000000000000000000000000000..5b698cda62b3e2881aa0458ad0d715053fcdeb6dc55ab0dc958fa5daf2a392f8 --- /dev/null +++ b/t/apenwarr-122-defaults-parent.t @@ -0,0 +1 @@ +apenwarr/wrapper.rc \ No newline at end of file diff --git a/t/apenwarr-130-mode.t b/t/apenwarr-130-mode.t new file mode 120000 index 0000000000000000000000000000000000000000..5b698cda62b3e2881aa0458ad0d715053fcdeb6dc55ab0dc958fa5daf2a392f8 --- /dev/null +++ b/t/apenwarr-130-mode.t @@ -0,0 +1 @@ +apenwarr/wrapper.rc \ No newline at end of file diff --git a/t/apenwarr/000-set-minus-e/.gitignore b/t/apenwarr/000-set-minus-e/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..6570cbdddab2960d1052378f7e2a10e2ba40fee6d1543634f40ea806b025e83c --- /dev/null +++ b/t/apenwarr/000-set-minus-e/.gitignore @@ -0,0 +1 @@ +log diff --git a/t/apenwarr/000-set-minus-e/all.do b/t/apenwarr/000-set-minus-e/all.do new file mode 100644 index 0000000000000000000000000000000000000000..eab830329fba139289eef9aa9918090dcac5830d20c4fbbd3ff5cd294fbaf0c9 --- /dev/null +++ b/t/apenwarr/000-set-minus-e/all.do @@ -0,0 +1,4 @@ +rm -f log +redo fatal >/dev/null 2>&1 || true + +[ "$(cat log)" = "ok" ] || exit 5 diff --git a/t/apenwarr/000-set-minus-e/clean.do b/t/apenwarr/000-set-minus-e/clean.do new file mode 100644 index 0000000000000000000000000000000000000000..7fc56ceded9299500d5bfe19d486cc304e985118fef38b313c34795871b752ce --- /dev/null +++ b/t/apenwarr/000-set-minus-e/clean.do @@ -0,0 +1 @@ +rm -f log *~ .*~ diff --git a/t/apenwarr/000-set-minus-e/fatal.do b/t/apenwarr/000-set-minus-e/fatal.do new file mode 100644 index 0000000000000000000000000000000000000000..23898388e3ea09009314f14fae5e035bf14350a5125f7fcbd240e3b8361032a0 --- /dev/null +++ b/t/apenwarr/000-set-minus-e/fatal.do @@ -0,0 +1,4 @@ +rm -f log +echo ok >>log +this-should-cause-a-fatal-error +echo fail >>log # this line should never run diff --git a/t/apenwarr/010-jobserver/.gitignore b/t/apenwarr/010-jobserver/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..55f919e5cb0d7bedb1a05c37ee72c032657091797fb243955a242aac428ae3c5 --- /dev/null +++ b/t/apenwarr/010-jobserver/.gitignore @@ -0,0 +1,6 @@ +*.end +*.start +*.sub +*.spin +*.log +*.x diff --git a/t/apenwarr/010-jobserver/all.do b/t/apenwarr/010-jobserver/all.do new file mode 100644 index 0000000000000000000000000000000000000000..afadbaca35a28ee54514372c367dee22aef6d7bf41f1146e40ebb50071f9b9ee --- /dev/null +++ b/t/apenwarr/010-jobserver/all.do @@ -0,0 +1,5 @@ +# We put the -j options at this toplevel to detect an earlier bug +# where the sub-jobserver wasn't inherited by sub-sub-processes, which +# accidentally reverted to the parent jobserver instead. + +redo -j 1 serialtest diff --git a/t/apenwarr/010-jobserver/clean.do b/t/apenwarr/010-jobserver/clean.do new file mode 100644 index 0000000000000000000000000000000000000000..d548d2452f8f64737ba6ebbbbc10a15e5d1ebe61a6da46ad8da365776923c82f --- /dev/null +++ b/t/apenwarr/010-jobserver/clean.do @@ -0,0 +1,2 @@ +rm -f *~ .*~ *.log *.sub *.spin *.x *.start *.end \ + first second parallel parallel2 diff --git a/t/apenwarr/010-jobserver/default.spin.do b/t/apenwarr/010-jobserver/default.spin.do new file mode 100644 index 0000000000000000000000000000000000000000..48c79d00ef24a2ce4dac2cdb5c92bd26f0aa27f56945d9a339894cfdb7a12416 --- /dev/null +++ b/t/apenwarr/010-jobserver/default.spin.do @@ -0,0 +1,4 @@ +for d in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19; do + redo $2.$d.x +done +echo hello diff --git a/t/apenwarr/010-jobserver/default.x.do b/t/apenwarr/010-jobserver/default.x.do new file mode 100644 index 0000000000000000000000000000000000000000..1bb6f15096dc70efbcde3bc8e235d4b245fe82f94c35b37d3c7a895b44a86132 --- /dev/null +++ b/t/apenwarr/010-jobserver/default.x.do @@ -0,0 +1 @@ +echo world diff --git a/t/apenwarr/010-jobserver/first.do b/t/apenwarr/010-jobserver/first.do new file mode 100644 index 0000000000000000000000000000000000000000..1ed1d99f9f41a543c65c92be921e59de3364231c4374284c68cc75d705e837c8 --- /dev/null +++ b/t/apenwarr/010-jobserver/first.do @@ -0,0 +1,24 @@ +# in case we're (erroneously) running in parallel, give second.do some +# time to start but not finish. +echo 'first sleep' >&2 +sleep 1 + +# Because of --shuffle, we can't be sure if first or second ran first, but +# because all.do uses -j1, we *should* expect that if second ran first, it +# at least ran to completion before we ran at all. +if [ -e second.start ]; then + echo 'first: second already started before we did...' >&2 + [ -e second.end ] || exit 21 + echo 'first: ...and it finished as it should.' >&2 + # no sense continuing the test; can't test anything if second already + # ran. + exit 0 +fi +echo 'first: second has not started yet, good.' >&2 + +echo 'first spin' >&2 +redo 1.a.spin +[ -e 1.a.spin ] || exit 11 +echo 'first spin complete' >&2 + +! [ -e second.start ] || exit 22 diff --git a/t/apenwarr/010-jobserver/second.do b/t/apenwarr/010-jobserver/second.do new file mode 100644 index 0000000000000000000000000000000000000000..c2882b36a19b58498391fbe3e02d9a0707f75f481c102690f41dca7c1cc7ec35 --- /dev/null +++ b/t/apenwarr/010-jobserver/second.do @@ -0,0 +1,8 @@ +rm -f $1.start $1.end +echo 'second start' >&2 +: >$1.start +redo 2.x +echo 'second sleep' >&2 +redo-ifchange first # wait until 'first' finishes, if it's running +echo 'second end' >&2 +: >$1.end diff --git a/t/apenwarr/010-jobserver/serialtest.do b/t/apenwarr/010-jobserver/serialtest.do new file mode 100644 index 0000000000000000000000000000000000000000..85b9375cb9fef4c6aa8a317249cab751bb64c9bae1fdd9a17c97913b21d22d1d --- /dev/null +++ b/t/apenwarr/010-jobserver/serialtest.do @@ -0,0 +1,3 @@ +# Test that -j1 really serializes all sub-redo processes. +rm -f *.sub *.spin *.x first second *.start *.end +redo first second diff --git a/t/apenwarr/100-args/.gitignore b/t/apenwarr/100-args/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..e5807a4202344117f377eba21d805b76b57101e607ad2faa9cb51043d623d1d2 --- /dev/null +++ b/t/apenwarr/100-args/.gitignore @@ -0,0 +1 @@ +passfail diff --git a/t/apenwarr/100-args/all.do b/t/apenwarr/100-args/all.do new file mode 100644 index 0000000000000000000000000000000000000000..8b2be60100df4661b098b3de3dd8c4d9e4429ff688e64ab0cf0588da5aa51b5d --- /dev/null +++ b/t/apenwarr/100-args/all.do @@ -0,0 +1 @@ +redo test.args test2.args passfailtest noargs/run diff --git a/t/apenwarr/100-args/clean.do b/t/apenwarr/100-args/clean.do new file mode 100644 index 0000000000000000000000000000000000000000..5c6d39e713982ed213aeefcf6b2cbafc33c26b9d373ac71c73026a3c2e0f0ecd --- /dev/null +++ b/t/apenwarr/100-args/clean.do @@ -0,0 +1 @@ +rm -f passfail *~ .*~ */*~ */.*~ noargs/all diff --git a/t/apenwarr/100-args/default.args.do b/t/apenwarr/100-args/default.args.do new file mode 100644 index 0000000000000000000000000000000000000000..b2ef499cb13b53e00c37b84f956787e75d8b89cf811c8eb223ad4463983eb6f8 --- /dev/null +++ b/t/apenwarr/100-args/default.args.do @@ -0,0 +1,3 @@ +[ "$1" = "test.args" ] +[ "$2" = "test" ] +[ "$3" != "test.args" ] diff --git a/t/apenwarr/100-args/noargs/all.do b/t/apenwarr/100-args/noargs/all.do new file mode 100644 index 0000000000000000000000000000000000000000..80bf8254ef1d6c65da1dc78468bff43b85ff3340589d0022778791b13daf045e --- /dev/null +++ b/t/apenwarr/100-args/noargs/all.do @@ -0,0 +1 @@ +echo RAN >$3 diff --git a/t/apenwarr/100-args/noargs/run.do b/t/apenwarr/100-args/noargs/run.do new file mode 100644 index 0000000000000000000000000000000000000000..b331eb20a7e0614253be78767425a9ac1061f8109910a98e5efb5671c0465b47 --- /dev/null +++ b/t/apenwarr/100-args/noargs/run.do @@ -0,0 +1,3 @@ +rm -f all +redo-ifchange # should not default to 'all' since not running from top level +[ ! -e all ] || exit 11 diff --git a/t/apenwarr/100-args/passfail.do b/t/apenwarr/100-args/passfail.do new file mode 100644 index 0000000000000000000000000000000000000000..1694b18911dda5ae3f6b43f0161152fa4973525c99daf0dfda0e5106d9d803f8 --- /dev/null +++ b/t/apenwarr/100-args/passfail.do @@ -0,0 +1,6 @@ +echo $$ +if [ -e pleasefail ]; then + exit 1 +else + exit 0 +fi diff --git a/t/apenwarr/100-args/passfailtest.do b/t/apenwarr/100-args/passfailtest.do new file mode 100644 index 0000000000000000000000000000000000000000..caee5d8d6751965e4ecf41134e53a2991c94178fa361da8bf64df64ce5dc718a --- /dev/null +++ b/t/apenwarr/100-args/passfailtest.do @@ -0,0 +1,13 @@ +rm -f pleasefail +redo passfail +[ -e passfail ] || exit 42 +PF1=$(cat passfail) +touch pleasefail +redo passfail 2>/dev/null && exit 43 +[ -e passfail ] || exit 44 +PF2=$(cat passfail) +[ "$PF1" = "$PF2" ] || exit 45 +rm -f pleasefail +redo passfail || exit 46 +PF3=$(cat passfail) +[ "$PF1" != "$PF3" ] || exit 47 diff --git a/t/apenwarr/100-args/test2.args.do b/t/apenwarr/100-args/test2.args.do new file mode 100644 index 0000000000000000000000000000000000000000..8dd5e7e31cb12c99736eab93232f4e35ca749e6b652a538e998a4e1d113d7a05 --- /dev/null +++ b/t/apenwarr/100-args/test2.args.do @@ -0,0 +1,3 @@ +[ "$1" = "test2.args" ] +[ "$2" = "test2.args" ] +[ "$3" != "test2.args" ] diff --git a/t/apenwarr/101-atime/.gitignore b/t/apenwarr/101-atime/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..d102fe408ed3a26c86d701480d0c45f3040a36f51fab7c69522d2c2c60950d0f --- /dev/null +++ b/t/apenwarr/101-atime/.gitignore @@ -0,0 +1 @@ +atime2 diff --git a/t/apenwarr/101-atime/all.do b/t/apenwarr/101-atime/all.do new file mode 100644 index 0000000000000000000000000000000000000000..b8b61bfde0a234ad48b0e90bfa379c01e5c95589d00c72c5ed4ead03aa4aad3c --- /dev/null +++ b/t/apenwarr/101-atime/all.do @@ -0,0 +1 @@ +redo atime diff --git a/t/apenwarr/101-atime/atime.do b/t/apenwarr/101-atime/atime.do new file mode 100644 index 0000000000000000000000000000000000000000..9d17a9a6ec9aa2da98e3c4b6c505d5f7c0d53744a9958e90aab4b5c0db8ebf40 --- /dev/null +++ b/t/apenwarr/101-atime/atime.do @@ -0,0 +1 @@ +redo atime2 diff --git a/t/apenwarr/101-atime/atime2.do b/t/apenwarr/101-atime/atime2.do new file mode 100644 index 0000000000000000000000000000000000000000..09066011e3a4b140d30ad0651eb145e7726cd5006e60ec8c58c957bb23132b80 --- /dev/null +++ b/t/apenwarr/101-atime/atime2.do @@ -0,0 +1,6 @@ +# make sure redo doesn't think merely *reading* the old file counts as +# modifying it in-place. +cat $1 >/dev/null 2>/dev/null || true +${PYTHON:-python} tick.py +cat $1 >/dev/null 2>/dev/null || true +echo hello diff --git a/t/apenwarr/101-atime/clean.do b/t/apenwarr/101-atime/clean.do new file mode 100644 index 0000000000000000000000000000000000000000..716b49587ef3943efb71289ff92d9c4d2e754091dfd9a6f43990d563bd2c5139 --- /dev/null +++ b/t/apenwarr/101-atime/clean.do @@ -0,0 +1 @@ +rm -f atime2 *~ .*~ diff --git a/t/apenwarr/101-atime/tick.py b/t/apenwarr/101-atime/tick.py new file mode 100644 index 0000000000000000000000000000000000000000..4654ce0d4bdb802562c0cbc20a758cebd182145a67d8afa3e8743d106f5950cb --- /dev/null +++ b/t/apenwarr/101-atime/tick.py @@ -0,0 +1,6 @@ +import time +t2 = int(time.time()) + 1.0 +while 1: + t = time.time() + if t >= t2: break + time.sleep(t2 - t + 0.01) diff --git a/t/apenwarr/102-empty/.gitignore b/t/apenwarr/102-empty/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..5c6e89ade3161bf53b392a87b7c4b826704ead391cad2b8521c6fe7d239b1c0a --- /dev/null +++ b/t/apenwarr/102-empty/.gitignore @@ -0,0 +1,3 @@ +touch1 +silence +silence.do diff --git a/t/apenwarr/102-empty/all.do b/t/apenwarr/102-empty/all.do new file mode 100644 index 0000000000000000000000000000000000000000..d63a38272ee6a4d320649858f8f71c4f45a242314e76f4782e431fc7890cbe80 --- /dev/null +++ b/t/apenwarr/102-empty/all.do @@ -0,0 +1 @@ +redo silencetest touchtest blank diff --git a/t/apenwarr/102-empty/blank.do b/t/apenwarr/102-empty/blank.do new file mode 100644 index 0000000000000000000000000000000000000000..d80986984b8383428a51c23947f2706eca88290a32cb30f13c9a0fb25bceec18 --- /dev/null +++ b/t/apenwarr/102-empty/blank.do @@ -0,0 +1,3 @@ +redo-ifchange +redo-ifcreate +redo diff --git a/t/apenwarr/102-empty/clean.do b/t/apenwarr/102-empty/clean.do new file mode 100644 index 0000000000000000000000000000000000000000..7244d2880dfd0e927ae8957f9265cb9767951fd97fcb2a7f4227fe0ba445cc52 --- /dev/null +++ b/t/apenwarr/102-empty/clean.do @@ -0,0 +1 @@ +rm -f touch1 touch1-ran *~ .*~ silence.do diff --git a/t/apenwarr/102-empty/silencetest.do b/t/apenwarr/102-empty/silencetest.do new file mode 100644 index 0000000000000000000000000000000000000000..0cfa2515efe232e43df9627ce28e377692e843f09dc50273c4953abc64e38444 --- /dev/null +++ b/t/apenwarr/102-empty/silencetest.do @@ -0,0 +1,11 @@ +# This may have been leftover from a previous run, when switching +# between "real" redo and minimal/do, so clean it up. +rm -f silence + +echo 'echo hello' >silence.do +redo silence +[ -e silence ] || exit 55 +echo 'true' >silence.do +redo silence +[ ! -e silence ] || exit 66 +rm -f silence.do diff --git a/t/apenwarr/102-empty/touchtest.do b/t/apenwarr/102-empty/touchtest.do new file mode 100644 index 0000000000000000000000000000000000000000..b5cb203dd8ce9669345cc3e55749b9bf04b0288a29027899d02d86088d631055 --- /dev/null +++ b/t/apenwarr/102-empty/touchtest.do @@ -0,0 +1,41 @@ +# This may have been leftover from a previous run, when switching +# between "real" redo and minimal/do, so clean it up. +rm -f touch1 + +# simply create touch1 +echo 'echo hello' >touch1.do +redo touch1 +[ -e touch1 ] || exit 55 +[ "$(cat touch1)" = "hello" ] || exit 56 + +# ensure that 'redo touch1' always re-runs touch1.do even if we have +# already built touch1 in this session, and even if touch1 already exists. +echo 'echo hello2' >touch1.do +redo touch1 +[ "$(cat touch1)" = "hello2" ] || exit 57 + +# ensure that touch1 is rebuilt even if it got deleted after the last redo +# inside the same session. Also ensure that we can produce a zero-byte +# output file explicitly. +rm -f touch1 +echo 'touch $3' >touch1.do +redo touch1 +[ -e touch1 ] || exit 66 +[ -z "$(cat touch1)" ] || exit 67 + +# Also test that zero bytes of output does not create the file at all, as +# opposed to creating a zero-byte file. +rm -f touch1 +echo 'touch touch1-ran' >touch1.do +redo touch1 +[ -e touch1 ] && exit 75 +[ -e touch1-ran ] || exit 76 +rm -f touch1-ran + +# Make sure that redo-ifchange *won't* rebuild touch1 if we have already +# built it, even if building it did not produce an output file. +redo-ifchange touch1 +[ -e touch1 ] && exit 77 +[ -e touch1-ran ] && exit 78 + +rm -f touch1.do diff --git a/t/apenwarr/103-unicode/all.do b/t/apenwarr/103-unicode/all.do new file mode 100644 index 0000000000000000000000000000000000000000..505f859c3fc47908ea6fbf1cae6a8ec712c406fcc5e420fa2a022aea96f973ef --- /dev/null +++ b/t/apenwarr/103-unicode/all.do @@ -0,0 +1 @@ +redo unicode diff --git a/t/apenwarr/103-unicode/clean.do b/t/apenwarr/103-unicode/clean.do new file mode 100644 index 0000000000000000000000000000000000000000..29aecfb6eabe022254bdae501ddd757bfa30b0a1343e5148f8731538e3a08927 --- /dev/null +++ b/t/apenwarr/103-unicode/clean.do @@ -0,0 +1 @@ +rm -rf *.tmp diff --git a/t/apenwarr/103-unicode/unicode.do b/t/apenwarr/103-unicode/unicode.do new file mode 100644 index 0000000000000000000000000000000000000000..7652e31333781f36d0236d4c9e0b05259c259f7eb06d6bcf4f8f3eff918d5a12 --- /dev/null +++ b/t/apenwarr/103-unicode/unicode.do @@ -0,0 +1,16 @@ +# Test that redo can handle a script whose path contains non-ASCII characters. +# Note: the test directory is intentionally *not* a normalized unicode +# string, ie. filesystems like macOS will convert it to a different string +# at creation time. This tests weird normalization edge cases. +# +# Unfortunately, on macOS with APFS, it may helpfully normalize the path at +# *create* time, but not on future *open* attempts. Thus, we let the shell +# figure out what directory name actually got created, then pass that to redo. +# Hence the weird wildcard expansion loop. +rm -rf test-uni*.tmp +mkdir "test-uniçøðë.tmp" +for p in test-uni*.tmp; do + : >$p/test1.do + redo "$p/test1" +done + diff --git a/t/apenwarr/104-space/all.do b/t/apenwarr/104-space/all.do new file mode 100644 index 0000000000000000000000000000000000000000..be0f906eee98945a9f81d58ff6613f2a59deaf2bff925a243c4a5ba92ee99f2c --- /dev/null +++ b/t/apenwarr/104-space/all.do @@ -0,0 +1 @@ +redo "space dir/test" diff --git a/t/apenwarr/104-space/clean.do b/t/apenwarr/104-space/clean.do new file mode 100644 index 0000000000000000000000000000000000000000..92f7ec7f9d8de31b7e8867598fffc5ce41a2a88f40f6ed0a699198dcd13d6745 --- /dev/null +++ b/t/apenwarr/104-space/clean.do @@ -0,0 +1 @@ +redo "space dir/clean" diff --git a/t/apenwarr/104-space/space dir/.gitignore b/t/apenwarr/104-space/space dir/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..b30ad1ed8c0f5247d9f89f57dd7379b56a3239085a5026d8e22c6e665e3809eb --- /dev/null +++ b/t/apenwarr/104-space/space dir/.gitignore @@ -0,0 +1,2 @@ +/space file +/space 2 diff --git a/t/apenwarr/104-space/space dir/clean.do b/t/apenwarr/104-space/space dir/clean.do new file mode 100644 index 0000000000000000000000000000000000000000..05325e2656705a7bb38c776f805a9a88af87c4651605f7e82cf16f80a76761c9 --- /dev/null +++ b/t/apenwarr/104-space/space dir/clean.do @@ -0,0 +1 @@ +rm -f *~ .*~ "space 2" diff --git a/t/apenwarr/104-space/space dir/space 2.do b/t/apenwarr/104-space/space dir/space 2.do new file mode 100644 index 0000000000000000000000000000000000000000..ab448b5612703e74719da16095941578bbd421f9b3e8fe18bcb3184b400a7e5f --- /dev/null +++ b/t/apenwarr/104-space/space dir/space 2.do @@ -0,0 +1 @@ +echo $$ diff --git a/t/apenwarr/104-space/space dir/space file.do b/t/apenwarr/104-space/space dir/space file.do new file mode 100644 index 0000000000000000000000000000000000000000..d6e5179e0822e7b79124aad5457d3b8cb38d97242861206bccda7b2ad90eae74 --- /dev/null +++ b/t/apenwarr/104-space/space dir/space file.do @@ -0,0 +1 @@ +redo-ifchange "space 2" diff --git a/t/apenwarr/104-space/space dir/test.do b/t/apenwarr/104-space/space dir/test.do new file mode 100644 index 0000000000000000000000000000000000000000..965b6e9d2581d1607d96a6996d9d2dd17f40767fe9988f0a16bc865263056562 --- /dev/null +++ b/t/apenwarr/104-space/space dir/test.do @@ -0,0 +1,6 @@ +redo "space file" +F1="$(cat "space 2")" +redo "../space dir/space file" +F2="$(cat "space 2")" +[ "$F1" = "$F2" ] || exit 2 +[ -n "$F1" ] || exit 3 diff --git a/t/apenwarr/105-sympath/.gitignore b/t/apenwarr/105-sympath/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..f5f663bf41755c1576d274f06b63fdee25915dbe4de3a81770a118d457cdf879 --- /dev/null +++ b/t/apenwarr/105-sympath/.gitignore @@ -0,0 +1,5 @@ +/*.dyn +/src +/x +/y + diff --git a/t/apenwarr/105-sympath/all.do b/t/apenwarr/105-sympath/all.do new file mode 100644 index 0000000000000000000000000000000000000000..98162668d980967cf1103cf2a1e1411cf775ebca149364831c006fa9bcc10b3a --- /dev/null +++ b/t/apenwarr/105-sympath/all.do @@ -0,0 +1,26 @@ +rm -f src +: >src + +for iter in 10 20; do + rm -rf y + rm -f x *.dyn static + mkdir y + : >y/static + ln -s . y/x + + ( + cd y/x/x/x/x/x + IFS=$(printf '\n') + redo-ifchange static x/x/x/static $PWD/static \ + $(/bin/pwd)/static /etc/passwd + # goredo: that symlink path is not resolving even at OS level + # redo-ifchange $PWD/../static 2>/dev/null && exit 35 + redo-ifchange 1.dyn x/x/x/2.dyn $PWD/3.dyn \ + $PWD/../4.dyn $(/bin/pwd)/5.dyn + ) + [ -e y/1.dyn ] || exit $((iter + 1)) + [ -e y/2.dyn ] || exit $((iter + 2)) + [ -e y/3.dyn ] || exit $((iter + 3)) + # [ -e 4.dyn ] || exit $((iter + 4)) + [ -e y/5.dyn ] || exit $((iter + 5)) +done diff --git a/t/apenwarr/105-sympath/clean.do b/t/apenwarr/105-sympath/clean.do new file mode 100644 index 0000000000000000000000000000000000000000..e25bd27f51912e6fa8921de7214f7143a066eb6b0d646e2cdcc54157632c322f --- /dev/null +++ b/t/apenwarr/105-sympath/clean.do @@ -0,0 +1,2 @@ +rm -rf y +rm -f src x *.dyn *~ .*~ diff --git a/t/apenwarr/105-sympath/default.dyn.do b/t/apenwarr/105-sympath/default.dyn.do new file mode 100644 index 0000000000000000000000000000000000000000..68ec94bb31285d6a2a3a5f589c0fda996fa58265e0099d4eab10efd871ed1966 --- /dev/null +++ b/t/apenwarr/105-sympath/default.dyn.do @@ -0,0 +1,2 @@ +redo-ifchange src +echo dynamic >$3 diff --git a/t/apenwarr/110-compile/.gitignore b/t/apenwarr/110-compile/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..0371933a52bb159a1a5d29c771fe6780ada62bc77c6ed4cdb54cb91794ae5f3b --- /dev/null +++ b/t/apenwarr/110-compile/.gitignore @@ -0,0 +1,5 @@ +CC +LD +[yb]ellow +hello +*.o diff --git a/t/apenwarr/110-compile/CC.do b/t/apenwarr/110-compile/CC.do new file mode 100644 index 0000000000000000000000000000000000000000..e8de376f5b92a34ed1008b72ad22735a768b5fcc857fe13928dd3fd42e342c20 --- /dev/null +++ b/t/apenwarr/110-compile/CC.do @@ -0,0 +1,5 @@ +exec >$3 +cat <<-EOF + cc -Wall -o /dev/fd/1 -c "\$1" +EOF +chmod a+x $3 diff --git a/t/apenwarr/110-compile/LD.do b/t/apenwarr/110-compile/LD.do new file mode 100644 index 0000000000000000000000000000000000000000..52d94c515e848ee17f5bb21d3fdc3b7e8b8612c05eb9f62d644a0e212ba47246 --- /dev/null +++ b/t/apenwarr/110-compile/LD.do @@ -0,0 +1,7 @@ +exec >$3 +cat <<-EOF + OUT="\$1" + shift + cc -Wall -o "\$OUT" "\$@" +EOF +chmod a+x $3 diff --git a/t/apenwarr/110-compile/all.do b/t/apenwarr/110-compile/all.do new file mode 100644 index 0000000000000000000000000000000000000000..be74d3ea46c70a430ffecf642cec3effb8af902d35394e07d8bbd7aa1e05408b --- /dev/null +++ b/t/apenwarr/110-compile/all.do @@ -0,0 +1,6 @@ +if type cc >/dev/null 2>&1; then + redo-ifchange hello yellow bellow +else + echo "$0: No C compiler installed; skipping this test." >&2 + redo-ifcreate /usr/bin/cc +fi diff --git a/t/apenwarr/110-compile/bellow.do b/t/apenwarr/110-compile/bellow.do new file mode 100644 index 0000000000000000000000000000000000000000..d725e39ca347335d0fcbd94e4c4e79b24a23ed837f16293128868b53647b1682 --- /dev/null +++ b/t/apenwarr/110-compile/bellow.do @@ -0,0 +1,3 @@ +redo-ifchange LD yellow.o +./LD "$3" yellow.o +../sleep 2 diff --git a/t/apenwarr/110-compile/clean.do b/t/apenwarr/110-compile/clean.do new file mode 100644 index 0000000000000000000000000000000000000000..d92d170effaf6c35b7870c16ef66664b164c6f312ee83096baa17b5f8a113250 --- /dev/null +++ b/t/apenwarr/110-compile/clean.do @@ -0,0 +1,3 @@ +rm -f hello [by]ellow *.o CC LD *~ .*~ + + diff --git a/t/apenwarr/110-compile/hello.c b/t/apenwarr/110-compile/hello.c new file mode 100644 index 0000000000000000000000000000000000000000..b9158c7428d88d457817faea93a2f3e29bedf5bcfd6600b99bbcbb685ba8514b --- /dev/null +++ b/t/apenwarr/110-compile/hello.c @@ -0,0 +1,7 @@ +#include + +int main() +{ + printf("hello, world!\n"); + return 0; +} diff --git a/t/apenwarr/110-compile/hello.do b/t/apenwarr/110-compile/hello.do new file mode 100644 index 0000000000000000000000000000000000000000..1f8cad60e93e24af8a422feef3d143ef9b52a02bc03507a48659ef765db61fa8 --- /dev/null +++ b/t/apenwarr/110-compile/hello.do @@ -0,0 +1,3 @@ +redo-ifchange LD hello.o +../sleep 1 +./LD "$3" hello.o diff --git a/t/apenwarr/110-compile/hello.o.do b/t/apenwarr/110-compile/hello.o.do new file mode 100644 index 0000000000000000000000000000000000000000..27c1f5054ed1f986d11e3946f646782c0915b0136774db42dc66138929961cb5 --- /dev/null +++ b/t/apenwarr/110-compile/hello.o.do @@ -0,0 +1,11 @@ +# This test is meant to confirm some basic redo functionality +# related to static files not in the build tree. But if your +# system doesn't happen to have stdio.h in the usual location, +# let's not explode just for that. +stdio=/usr/include/stdio.h +[ -e "$stdio" ] || stdio= + +redo-ifchange CC hello.c $stdio +redo-ifcreate stdio.h +../sleep 3 +./CC hello.c diff --git a/t/apenwarr/110-compile/yellow.do b/t/apenwarr/110-compile/yellow.do new file mode 100644 index 0000000000000000000000000000000000000000..301ae6feca4572c19b9d32d3b05f493ec87214bb14281612a6058e85516cc79d --- /dev/null +++ b/t/apenwarr/110-compile/yellow.do @@ -0,0 +1,3 @@ +redo-ifchange LD yellow.o +../sleep 1.5 +./LD "$3" yellow.o diff --git a/t/apenwarr/110-compile/yellow.o.do b/t/apenwarr/110-compile/yellow.o.do new file mode 100644 index 0000000000000000000000000000000000000000..c253227721e1316c3a750590bac5208aeba8e25b1bd51a0863f0828a209cb42f --- /dev/null +++ b/t/apenwarr/110-compile/yellow.o.do @@ -0,0 +1,3 @@ +redo-ifchange CC hello.c +../sleep 2 +cc -o $3 -c hello.c diff --git a/t/apenwarr/111-example/.gitignore b/t/apenwarr/111-example/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..133460dfc814b5549890bb861ecae99df7e9ac02b80fc620762a7de32bbf3da1 --- /dev/null +++ b/t/apenwarr/111-example/.gitignore @@ -0,0 +1,3 @@ +*.o +CC +hello diff --git a/t/apenwarr/111-example/CC.do b/t/apenwarr/111-example/CC.do new file mode 100644 index 0000000000000000000000000000000000000000..81ba86c00be2b9166c13d4e48ed4e47010f2e803d8b81bbae02c554fa1e4c247 --- /dev/null +++ b/t/apenwarr/111-example/CC.do @@ -0,0 +1,11 @@ +redo-ifchange config.sh +. ./config.sh +exec >$3 +cat <<-EOF + redo-ifchange \$2.c + cc $CFLAGS -MD -MF \$3.deps -o \$3 -c \$2.c + read DEPS <\$3.deps + rm -f \$3.deps + redo-ifchange \${DEPS#*:} +EOF +chmod +x $3 diff --git a/t/apenwarr/111-example/Makefile b/t/apenwarr/111-example/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..27da35cfc85b3af52adf5a0b95721bbc3cf7c7cdee811e2b1624f7970f3fe481 --- /dev/null +++ b/t/apenwarr/111-example/Makefile @@ -0,0 +1,6 @@ +all: + +%: FORCE + +redo $@ + +.PHONY: FORCE diff --git a/t/apenwarr/111-example/all.do b/t/apenwarr/111-example/all.do new file mode 100644 index 0000000000000000000000000000000000000000..6f755f32aafe8b70bd2782aad5e2f47a38607ed25376558cef3480c83a6bb729 --- /dev/null +++ b/t/apenwarr/111-example/all.do @@ -0,0 +1,6 @@ +if type cc >/dev/null 2>&1; then + redo-ifchange hello +else + echo "$0: No C compiler installed; skipping this test." >&2 + redo-ifcreate /usr/bin/cc +fi diff --git a/t/apenwarr/111-example/clean.do b/t/apenwarr/111-example/clean.do new file mode 100644 index 0000000000000000000000000000000000000000..57a80b5c545b27039e4fe3e6a6775df1df2ecca137548241ac60842569898967 --- /dev/null +++ b/t/apenwarr/111-example/clean.do @@ -0,0 +1 @@ +rm -f *.tmp *~ *.o hello CC diff --git a/t/apenwarr/111-example/config.sh b/t/apenwarr/111-example/config.sh new file mode 100644 index 0000000000000000000000000000000000000000..91d0a74d57e16d8e59c54da4cc83abce4caa3459ad2d7e5f91acbd91c6e17744 --- /dev/null +++ b/t/apenwarr/111-example/config.sh @@ -0,0 +1 @@ +CFLAGS="-Wall" diff --git a/t/apenwarr/111-example/default.o.do b/t/apenwarr/111-example/default.o.do new file mode 100644 index 0000000000000000000000000000000000000000..58a60deace76e095af3a17e5f8990bbb30bc22164ead55325636e184cba4c153 --- /dev/null +++ b/t/apenwarr/111-example/default.o.do @@ -0,0 +1,2 @@ +redo-ifchange CC +. ./CC "$@" diff --git a/t/apenwarr/111-example/hello.do b/t/apenwarr/111-example/hello.do new file mode 100644 index 0000000000000000000000000000000000000000..dc736160801e580f0a9c4b3528d86b66901e6224514058c5706f602ac7e1b748 --- /dev/null +++ b/t/apenwarr/111-example/hello.do @@ -0,0 +1,4 @@ +DEPS="main.o +mystr.o" +redo-ifchange $DEPS +cc -o $3 $DEPS diff --git a/t/apenwarr/111-example/main.c b/t/apenwarr/111-example/main.c new file mode 100644 index 0000000000000000000000000000000000000000..930685a76996f61ceded262b1bffcd804bdc8137a2cda57421907493b2654e00 --- /dev/null +++ b/t/apenwarr/111-example/main.c @@ -0,0 +1,8 @@ +#include +#include "mystr.h" + +int main() +{ + printf("%s\n", mystr); + return 0; +} diff --git a/t/apenwarr/111-example/mystr.c b/t/apenwarr/111-example/mystr.c new file mode 100644 index 0000000000000000000000000000000000000000..a54c7e9199151f961c044342392f51f157d1ec25efb0dd4a2f2ceb65f0a93899 --- /dev/null +++ b/t/apenwarr/111-example/mystr.c @@ -0,0 +1,4 @@ + +#include "mystr.h" + +char *mystr = "Hello, world!"; diff --git a/t/apenwarr/111-example/mystr.h b/t/apenwarr/111-example/mystr.h new file mode 100644 index 0000000000000000000000000000000000000000..1f81bf257f5efc73113f590b590f3179e667555ac4fee29e8b8cedcf8b7f9cd3 --- /dev/null +++ b/t/apenwarr/111-example/mystr.h @@ -0,0 +1,6 @@ +#ifndef __MYSTR_H +#define __MYSTR_H + +extern char *mystr; + +#endif diff --git a/t/apenwarr/120-defaults-flat/.gitignore b/t/apenwarr/120-defaults-flat/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..8a8d4d4eb08e4a314e784bb2dfda89c56356ebbbe3321bef925445a6ff9ad2db --- /dev/null +++ b/t/apenwarr/120-defaults-flat/.gitignore @@ -0,0 +1,6 @@ +c +c.c +c.c.c +c.c.c.b +c.c.c.b.b +d diff --git a/t/apenwarr/120-defaults-flat/all.do b/t/apenwarr/120-defaults-flat/all.do new file mode 100644 index 0000000000000000000000000000000000000000..38334b11ead319f8a202b7270792291945312011340bb09040eef220521db762 --- /dev/null +++ b/t/apenwarr/120-defaults-flat/all.do @@ -0,0 +1 @@ +redo-ifchange c d diff --git a/t/apenwarr/120-defaults-flat/c.c.c.b.b.a b/t/apenwarr/120-defaults-flat/c.c.c.b.b.a new file mode 100644 index 0000000000000000000000000000000000000000..8751962d9af200ee221f0940651faa11cd11a4c13ad0809adc5bafe54509c5b6 --- /dev/null +++ b/t/apenwarr/120-defaults-flat/c.c.c.b.b.a @@ -0,0 +1 @@ +chicken diff --git a/t/apenwarr/120-defaults-flat/c.do b/t/apenwarr/120-defaults-flat/c.do new file mode 100644 index 0000000000000000000000000000000000000000..3c06f1bc1db6783a09d31207e4a4a730c34bee02a1509f0c8dd6c2605117311e --- /dev/null +++ b/t/apenwarr/120-defaults-flat/c.do @@ -0,0 +1,3 @@ +redo-ifchange $1.c +echo c.do +cat $1.c diff --git a/t/apenwarr/120-defaults-flat/clean.do b/t/apenwarr/120-defaults-flat/clean.do new file mode 100644 index 0000000000000000000000000000000000000000..3bd22cbd374504c3507a3ab5c9e7b01c7aacf154e74cd8abaf943ee98e7b5ccf --- /dev/null +++ b/t/apenwarr/120-defaults-flat/clean.do @@ -0,0 +1,2 @@ +rm -f c c.c c.c.c c.c.c.b c.c.c.b.b d \ + *~ .*~ diff --git a/t/apenwarr/120-defaults-flat/default.b.do b/t/apenwarr/120-defaults-flat/default.b.do new file mode 100644 index 0000000000000000000000000000000000000000..408d58bb8140727443819f0819dc5733435c41ac9b1ff029349cf2643612b0f3 --- /dev/null +++ b/t/apenwarr/120-defaults-flat/default.b.do @@ -0,0 +1,10 @@ +if [ -e "$1.a" -o -e "default${1#$2}.a" ]; then + redo-ifchange "$1.a" + echo a-to-b + cat "$1.a" +else + redo-ifchange "$1.b" + echo b-to-b + cat "$1.b" +fi +../sleep 1.1 diff --git a/t/apenwarr/120-defaults-flat/default.c.c.do b/t/apenwarr/120-defaults-flat/default.c.c.do new file mode 100644 index 0000000000000000000000000000000000000000..3537f61ce4c12c7751c167bb0604f969035fc38156c9d105f3519f2654f2c85b --- /dev/null +++ b/t/apenwarr/120-defaults-flat/default.c.c.do @@ -0,0 +1,4 @@ +redo-ifchange $1.b +echo b-to-cc +cat $1.b +../sleep 1.2 diff --git a/t/apenwarr/120-defaults-flat/default.c.do b/t/apenwarr/120-defaults-flat/default.c.do new file mode 100644 index 0000000000000000000000000000000000000000..225b4d0b6e25e1f63d0f9f7e24a1b282ecdc3a1a06e6c4b24a07ce8b11b3d620 --- /dev/null +++ b/t/apenwarr/120-defaults-flat/default.c.do @@ -0,0 +1,4 @@ +redo-ifchange $1.c +echo c-to-c +cat $1.c +../sleep 1.3 diff --git a/t/apenwarr/120-defaults-flat/default.do b/t/apenwarr/120-defaults-flat/default.do new file mode 100644 index 0000000000000000000000000000000000000000..1afdd37b8d54d3f8a0d8869323ffad2300aaf435e62dbb0409beafa94f92ea81 --- /dev/null +++ b/t/apenwarr/120-defaults-flat/default.do @@ -0,0 +1,4 @@ +redo-ifchange c +echo default-rule +cat c +../sleep 1.4 diff --git a/t/apenwarr/121-defaults-nested/.gitignore b/t/apenwarr/121-defaults-nested/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..26a63ce3615fe7385f21671f4d9d7da682bde2e7271c0e06480e4533a24a1aee --- /dev/null +++ b/t/apenwarr/121-defaults-nested/.gitignore @@ -0,0 +1,15 @@ +/a/b/file +/a/b/file.x.y.z +/a/b/file.y.z +/a/b/file.z +/a/d/file +/a/d/file.x.y.z +/a/d/file.y.z +/a/d/file.z +/a/file +/a/file.x.y.z +/a/file.y.z +/a/file.z +/file.x.y.z +/file.z +/file diff --git a/t/apenwarr/121-defaults-nested/a/b/default.y.z.do b/t/apenwarr/121-defaults-nested/a/b/default.y.z.do new file mode 100644 index 0000000000000000000000000000000000000000..5d823185ce2616e22ae47bb6be7149e1de83baee5377e3c52c906c607aa303c8 --- /dev/null +++ b/t/apenwarr/121-defaults-nested/a/b/default.y.z.do @@ -0,0 +1 @@ +echo default.y.z $2 ${1#$2} diff --git a/t/apenwarr/121-defaults-nested/a/b/file.x.y.z.do b/t/apenwarr/121-defaults-nested/a/b/file.x.y.z.do new file mode 100644 index 0000000000000000000000000000000000000000..563a91fb46aae5918ffe6e4d01532c0a0594a75a439e49087370729a34c99369 --- /dev/null +++ b/t/apenwarr/121-defaults-nested/a/b/file.x.y.z.do @@ -0,0 +1 @@ +echo file $2 ${1#$2} diff --git a/t/apenwarr/121-defaults-nested/a/d/default.do b/t/apenwarr/121-defaults-nested/a/d/default.do new file mode 100644 index 0000000000000000000000000000000000000000..1504b75ea74131e25d04b9af43be17b0336c624e6cb950ec7bf0053c0fc78e0e --- /dev/null +++ b/t/apenwarr/121-defaults-nested/a/d/default.do @@ -0,0 +1 @@ +echo default $2 ${1#$2} diff --git a/t/apenwarr/121-defaults-nested/a/default.x.y.z.do b/t/apenwarr/121-defaults-nested/a/default.x.y.z.do new file mode 100644 index 0000000000000000000000000000000000000000..ae4d394a9139fd1acf8a41cd009253fe1157c6a41959c4813edac9475c65d76c --- /dev/null +++ b/t/apenwarr/121-defaults-nested/a/default.x.y.z.do @@ -0,0 +1,2 @@ +echo default.x.y.z $2 ${1#$2} + diff --git a/t/apenwarr/121-defaults-nested/a/default.z.do b/t/apenwarr/121-defaults-nested/a/default.z.do new file mode 100644 index 0000000000000000000000000000000000000000..1720a0c27933d83bc097bf992fc77059f03bc6926688735b9703be72c081c49a --- /dev/null +++ b/t/apenwarr/121-defaults-nested/a/default.z.do @@ -0,0 +1 @@ +echo default.z $2 ${1#$2} diff --git a/t/apenwarr/121-defaults-nested/all.do b/t/apenwarr/121-defaults-nested/all.do new file mode 100644 index 0000000000000000000000000000000000000000..e333e3e5d9e7bab12c7c0e94bac2d639078322b9e796b093a406eb9d5d972c4d --- /dev/null +++ b/t/apenwarr/121-defaults-nested/all.do @@ -0,0 +1 @@ +redo test diff --git a/t/apenwarr/121-defaults-nested/clean.do b/t/apenwarr/121-defaults-nested/clean.do new file mode 100644 index 0000000000000000000000000000000000000000..a878fbd06d2aafa2576ff9909e76b2bf3a03af0a6d58f89cbeb30b5f553384b0 --- /dev/null +++ b/t/apenwarr/121-defaults-nested/clean.do @@ -0,0 +1,6 @@ +exec >&2 +find . -name '*~' -exec rm -f {} \; +rm -f a/b/file a/b/file.x.y.z a/b/file.y.z a/b/file.z \ + a/d/file a/d/file.x.y.z a/d/file.y.z a/d/file.z \ + a/file a/file.x.y.z a/file.y.z a/file.z \ + file.x.y.z file.z file diff --git a/t/apenwarr/121-defaults-nested/default.do b/t/apenwarr/121-defaults-nested/default.do new file mode 100644 index 0000000000000000000000000000000000000000..3c10652a9e827e9bd0c0ad6a313576ecf2cd297b930d7980f5628560334068ff --- /dev/null +++ b/t/apenwarr/121-defaults-nested/default.do @@ -0,0 +1 @@ +echo root $2 ${1#$2} "$(dirname $3)" diff --git a/t/apenwarr/121-defaults-nested/test.do b/t/apenwarr/121-defaults-nested/test.do new file mode 100644 index 0000000000000000000000000000000000000000..39a9b19bb2120f4219eb294fad38f4a957cd12cd857fb96d00fe1049822ecd53 --- /dev/null +++ b/t/apenwarr/121-defaults-nested/test.do @@ -0,0 +1,36 @@ +exec >&2 +redo-ifchange \ + file.x.y.z file.z file \ + a/b/file.x.y.z a/b/file.y.z a/b/file.z a/b/file \ + a/d/file.x.y.z a/d/file.y.z a/d/file.z a/d/file + +(cd a/b && redo-ifchange ../file.x.y.z ../file.y.z ../file.z ../file) + +check() +{ + if [ "$(cat $1)" != "$2" ]; then + echo "$1 should contain '$2'" + echo " ...got '$(cat $1)'" + exit 44 + fi +} + +check file.x.y.z "root file.x.y.z ." +check file.z "root file.z ." +check file "root file ." + +check a/file.x.y.z "default.x.y.z file .x.y.z" +check a/file.y.z "default.z file.y .z" +check a/file.z "default.z file .z" +check a/file "root a/file a" + +check a/b/file.x.y.z "file file.x.y.z" +check a/b/file.y.z "default.y.z file .y.z" +check a/b/file.z "default.z b/file .z" +check a/b/file "root a/b/file a/b" + +check a/d/file.x.y.z "default file.x.y.z" +check a/d/file.y.z "default file.y.z" +check a/d/file.z "default file.z" +check a/d/file "default file" + diff --git a/t/apenwarr/122-defaults-parent/.gitignore b/t/apenwarr/122-defaults-parent/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..71400798337884f2bc9acdb9b91afa5087b6961849ae72be1b791ddba8b1af2c --- /dev/null +++ b/t/apenwarr/122-defaults-parent/.gitignore @@ -0,0 +1 @@ +/*.log diff --git a/t/apenwarr/122-defaults-parent/all.do b/t/apenwarr/122-defaults-parent/all.do new file mode 100644 index 0000000000000000000000000000000000000000..f1de0033a1d1c894dc91c301ea6169ac4624d5856515306c823b891c1a44a508 --- /dev/null +++ b/t/apenwarr/122-defaults-parent/all.do @@ -0,0 +1,32 @@ +rm -f x/shouldfail + +log=$PWD/$1.log + +expect_fail() { + local rv=$1 + shift + if ("$@") >>$log 2>&1; then + cat "$log" >&2 + echo "unexpected success:" "$@" >&2 + return $rv + else + return 0 + fi +} + +# These should all fail because there is no matching .do file. +# In previous versions of redo, it would accidentally try to use +# $PWD/default.do even for ../path/file, which is incorrect. That +# could cause it to return success accidentally. + +rm -f "$log" +cd inner +expect_fail 11 redo ../x/shouldfail +expect_fail 12 redo-ifchange ../x/shouldfail + +rm -f "$log" +cd ../inner2 +expect_fail 21 redo ../x/shouldfail2 +expect_fail 22 redo-ifchange ../x/shouldfail2 + +exit 0 diff --git a/t/apenwarr/122-defaults-parent/clean.do b/t/apenwarr/122-defaults-parent/clean.do new file mode 100644 index 0000000000000000000000000000000000000000..44e45f17ba4789f9f307b11a05e9f52ef54d8112329611b317f973d659aacf90 --- /dev/null +++ b/t/apenwarr/122-defaults-parent/clean.do @@ -0,0 +1,2 @@ +rm -f *~ .*~ */*~ */.*~ *.tmp */*.tmp x/shouldfail *.log */*.log + diff --git a/t/apenwarr/122-defaults-parent/inner/default.do b/t/apenwarr/122-defaults-parent/inner/default.do new file mode 100644 index 0000000000000000000000000000000000000000..605e3577d430690b3b2c75383176acf08854ff8fd3f626cd2181f8e55cfbc2b3 --- /dev/null +++ b/t/apenwarr/122-defaults-parent/inner/default.do @@ -0,0 +1,2 @@ +echo "inner/default.do: PWD=$PWD '$1' '$2' '$3'" >&2 +echo SUSPICIOUS diff --git a/t/apenwarr/122-defaults-parent/inner2/default.do b/t/apenwarr/122-defaults-parent/inner2/default.do new file mode 100644 index 0000000000000000000000000000000000000000..5cb6f667bc67decf2b65954b1f54a5e977c7f40fb7ba2ec15767359043d3b277 --- /dev/null +++ b/t/apenwarr/122-defaults-parent/inner2/default.do @@ -0,0 +1,2 @@ +echo "inner/default.do: PWD=$PWD '$1' '$2' '$3'" >&2 +# output file is left empty diff --git a/t/apenwarr/122-defaults-parent/x/file b/t/apenwarr/122-defaults-parent/x/file new file mode 100644 index 0000000000000000000000000000000000000000..473a0f4c3be8a93681a267e3b1e9a7dcda1185436fe141f7749120a303721813 Binary files /dev/null and b/t/apenwarr/122-defaults-parent/x/file differ diff --git a/t/apenwarr/130-mode/.gitignore b/t/apenwarr/130-mode/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..ed487cc62f79881eeb9aaf9e052991680479f300349a4b728466c3df30b8b438 --- /dev/null +++ b/t/apenwarr/130-mode/.gitignore @@ -0,0 +1 @@ +mode1 \ No newline at end of file diff --git a/t/apenwarr/130-mode/all.do b/t/apenwarr/130-mode/all.do new file mode 100644 index 0000000000000000000000000000000000000000..de96b3645fde66d2eaf79f06fcfa7aee3237efa04862d34d38636aefa536f341 --- /dev/null +++ b/t/apenwarr/130-mode/all.do @@ -0,0 +1,5 @@ +umask 0022 +redo mode1 +MODE=$(${PYTHON:-python} -c \ + 'import os; print(oct(os.stat("mode1").st_mode & 0o7777))') +[ "$MODE" = "0644" -o "$MODE" = "0o644" ] || exit 78 diff --git a/t/apenwarr/130-mode/clean.do b/t/apenwarr/130-mode/clean.do new file mode 100644 index 0000000000000000000000000000000000000000..6589c52987159864677692a26c4e47e2255411a9c6b125bc5d04e472517e181a --- /dev/null +++ b/t/apenwarr/130-mode/clean.do @@ -0,0 +1 @@ +rm -f mode1 *~ .*~ diff --git a/t/apenwarr/130-mode/mode1.do b/t/apenwarr/130-mode/mode1.do new file mode 100644 index 0000000000000000000000000000000000000000..77695a89d4186e1635d0adbe4c0fd3b93c151d7e9b39cb532ced550dedb520a5 --- /dev/null +++ b/t/apenwarr/130-mode/mode1.do @@ -0,0 +1 @@ +echo hello diff --git a/t/apenwarr/README b/t/apenwarr/README new file mode 100644 index 0000000000000000000000000000000000000000..54f030a8f4e0d55980fe264dc66ff2808da3e919458bef731f4f003e6426352d --- /dev/null +++ b/t/apenwarr/README @@ -0,0 +1,13 @@ +Those tests are taken from https://github.com/apenwarr/redo. + +* Only basic ([01]*) tests taken, because other ones are too apenwarr + implementation specific. +* 140-shuffle and 141-keep-going removed, because apenwarr specific +* flush-cache removed, as it works directly with apenwarr's database +* redo/sh and redo/py targets replaced with /bin/sh and ${PYTHON} +* skip-if-minimal-do.sh removed +* 010-jobserver/parallel* removed, because goredo intentionally does not + parallelize targets building through plain redo invocation for human + convenience +* one of 105-sympath tests commented out, because its symlink path can + not be resolved even at OS level diff --git a/t/apenwarr/all.do b/t/apenwarr/all.do new file mode 100644 index 0000000000000000000000000000000000000000..5603f96a8f548ec431ac66eda6d1cbc73a1a6f566ed1af4aa00f58084106255c --- /dev/null +++ b/t/apenwarr/all.do @@ -0,0 +1,9 @@ +rm -f 000-set-minus-e/log +redo 000-set-minus-e/all +if [ "$(cat 000-set-minus-e/log)" != "ok" ]; then + echo "FATAL! .do file not run with 'set -e' in effect!" >&2 + exit 5 +fi + +/bin/ls 1[0-9][0-9]*/all.do | sed 's/\.do$//' | xargs redo +110-compile/hello >&2 diff --git a/t/apenwarr/clean.do b/t/apenwarr/clean.do new file mode 100644 index 0000000000000000000000000000000000000000..2e81a03fbb041565a96b008d0757cfff0d804c4793e9c6bfb66704f21f93dd27 --- /dev/null +++ b/t/apenwarr/clean.do @@ -0,0 +1,3 @@ +/bin/ls [0-9s][0-9][0-9]*/clean.do | +sed 's/\.do$//' | +xargs redo diff --git a/t/apenwarr/sleep b/t/apenwarr/sleep new file mode 100755 index 0000000000000000000000000000000000000000..04eaa8d1a2f69eb684bc4ef89791efb332e045ee8c07c2284faf10c0931b847c --- /dev/null +++ b/t/apenwarr/sleep @@ -0,0 +1,4 @@ +PATH=/bin:/usr/bin +if [ -n "$SLEEP" ]; then + exec sleep "$@" +fi diff --git a/t/apenwarr/wrapper.rc b/t/apenwarr/wrapper.rc new file mode 100755 index 0000000000000000000000000000000000000000..1aab51e96854f2bc28f5766250dd4c635f669dac337cb9d5fd514a4ab65d6654 --- /dev/null +++ b/t/apenwarr/wrapper.rc @@ -0,0 +1,13 @@ +#!/bin/sh + +testname=`basename "$0"` +testname=${testname#apenwarr-} +testname=${testname%.t} +testdir=`dirname $0`/apenwarr/$testname +cd $testdir +testdir=`pwd` +test_description="none" +. $SHARNESS_TEST_SRCDIR/sharness.sh +cd $testdir +test_expect_success itself redo +test_done diff --git a/t/clean.do b/t/clean.do index 4b1b48f635cde555458abb5a3c3c81d8410ea799c05b507fd5a8176b592d86f4..2169a3222f2308d19209a2de75d616033bac17b4f481ee3e49c05eed8143de9c 100644 --- a/t/clean.do +++ b/t/clean.do @@ -1,5 +1,2 @@ -rm -f *.t -[ -e redo-sh.tests ] || exit 0 -cd redo-sh.tests/ -redo-cleanup full >&2 -find . -type f ! -name test -delete +redo apenwarr/clean redo-sh.tests/clean +for d in apenwarr redo-sh.tests ; do ( cd $d ; redo-cleanup full >/dev/null ) ; done diff --git a/t/prepare.do b/t/prepare.do deleted file mode 100644 index 8fcf7632bcb4cf85570958f17f2d1f509fcdb2fa595a585812f45988873e86b6..0000000000000000000000000000000000000000 --- a/t/prepare.do +++ /dev/null @@ -1,17 +0,0 @@ -tests=redo-sh.tests -[ -e $tests ] || { - cat >&2 <&2 -rm parallel_2.t diff --git a/t/redo-sh.tests/README b/t/redo-sh.tests/README new file mode 100644 index 0000000000000000000000000000000000000000..87ff722b8781660c0f2d026fdeb0ef3f9350b86d6b5875f32377a8695048ef45 --- /dev/null +++ b/t/redo-sh.tests/README @@ -0,0 +1,3 @@ +Those tests are taken from http://news.dieweltistgarnichtso.net/bin.git. +Test parallel_2 removed, because goredo has no --jobs. +Test always_rebuild_1 removed, because always-target is rebuilt once per run. diff --git a/t/redo-sh.tests/clean.do b/t/redo-sh.tests/clean.do new file mode 100644 index 0000000000000000000000000000000000000000..0b4f0e8cc1db59dc4dc8589fe1788c167d6817c6d9da0f79647a0895b3d03245 --- /dev/null +++ b/t/redo-sh.tests/clean.do @@ -0,0 +1,4 @@ +for f in * ; do + [ -d $f ] || continue + find $f ! -name test -delete +done diff --git a/t/redo-sh.tests/dependency_ne_dofile_1/test b/t/redo-sh.tests/dependency_ne_dofile_1/test new file mode 100755 index 0000000000000000000000000000000000000000..b44de919e81775fbe1a29df91aa47eab73afb91048015ac439305b50daa1f00b --- /dev/null +++ b/t/redo-sh.tests/dependency_ne_dofile_1/test @@ -0,0 +1,30 @@ +#!/bin/sh -eu +# A target built with a default dofile in the same directory must be rebuilt if a more specific dofile appears. + +test -e a.b.c && \ + rm -- a.b.c + +>all.do cat <"${dofile}" cat <&2 printf 'a.b.c was built with %s, should have been built with %s\n' \ + "${text}" "${dofile}" + exit 1 + fi +done diff --git a/t/redo-sh.tests/dependency_ne_dofile_2/test b/t/redo-sh.tests/dependency_ne_dofile_2/test new file mode 100755 index 0000000000000000000000000000000000000000..50489577e43a493f0806cfc36387424010be45be113661ca0fa21a5c656e8d30 --- /dev/null +++ b/t/redo-sh.tests/dependency_ne_dofile_2/test @@ -0,0 +1,42 @@ +#!/bin/sh -eu +# A target built with a default dofile in the parent directory must be rebuilt if a more specific dofile appears. + +[ -e dir ] \ + || mkdir dir + +[ -e default.do ] \ + && rm default.do + +[ -e dir/default.do ] \ + && rm dir/default.do + +[ -e dir/a.do ] \ + && rm dir/a.do + +>default.do cat <dir/default.do cat <dir/a.do cat <all.do printf 'redo-ifchange a\n' +>a.do printf 'test -e b || redo-ifcreate b\ndate +%s\n' + +redo +all.do printf 'redo-ifchange a\n' +>a.do printf 'test -e b || redo-ifcreate b\ndate +%s\n' + +redo +b : +sleep 1 + +redo +all.do printf 'redo-ifchange a\n' +>a.do printf 'redo-ifchange b\ndate +%s\n' +>b printf '1' + +redo +b printf '1' + +redo +all.do printf 'redo-ifchange a\n' +>a.do printf 'redo-ifchange b\ndate +%s\n' +>b.do printf 'redo-ifchange c\ndate +%s\n' +>c printf '1' + +redo +c printf '1' + +redo +all.do printf 'redo-ifchange a\n' +>a.do printf 'redo-ifchange b\ndate +%s\n' +>b.do printf 'redo-ifchange c\ndate +%s\n' +>c.do printf 'redo-ifchange d\ndate +%s\n' +>d printf '1' + +redo +d printf '1' + +redo +all.do printf 'redo-ifchange a\n' +>a.do printf 'redo-ifchange b\ndate +%s\n' +>b printf '1' + +redo +b printf '2' + +redo +all.do printf 'redo-ifchange a\n' +>a.do printf 'redo-ifchange b\ndate +%s\n' +>b.do printf 'redo-ifchange c\ndate +%s\n' +>c printf '1' + +redo +c printf '2' + +redo +all.do printf 'redo-ifchange a\n' +>a.do printf 'redo-ifchange b\ndate +%s\n' +>b.do printf 'redo-ifchange c\ndate +%s\n' +>c.do printf 'redo-ifchange d\ndate +%s\n' +>d printf '1' + +redo +d printf '2' + +redo +a.do.do cat <a.do.do.do cat <all.do cat <default.do cat <"${dofile}" cat <&2 printf 'redo-whichdo prints %s as nonexistent dofile, but it exists.\n' \ + "${whichdo_dofile_nonexistent}" + exit 1 + fi + done + + whichdo_dofile_existent=$( + printf '%s\n' "${whichdo_dofiles}" \ + |tail -n1 + ) + if ! test -e "${whichdo_dofile_existent}"; then + >&2 printf 'redo-whichdo prints %s as existent dofile, but it does not exist.\n' \ + "${whichdo_dofile_existent}" + exit 1 + fi + +done diff --git a/t/redo-sh.tests/whichdo_absolute_2/test b/t/redo-sh.tests/whichdo_absolute_2/test new file mode 100755 index 0000000000000000000000000000000000000000..a25d6afadd72f99abe8ede5b7852aba0fc68a5695420ad979f2b599f02dafd5a --- /dev/null +++ b/t/redo-sh.tests/whichdo_absolute_2/test @@ -0,0 +1,50 @@ +#!/bin/sh -eu +# When invoked with an absolute path name as an argument, redo-whichdo +# must output non-existent dofiles in the parent directory and the +# same directory until it outputs one that exists. + +if ! test -d a; then + mkdir a +fi + +dofiles="default.do default.c.do default.b.c.do a/default.do a/default.c.do a/default.b.c.do a/a.b.c.do" + +for dofile in ${dofiles}; do + if test -e "${dofile}"; then + rm -- "${dofile}" + fi +done + +for dofile in ${dofiles}; do + >"${dofile}" cat <&2 printf 'redo-whichdo prints %s as nonexistent dofile, but it exists.\n' \ + "${whichdo_dofile_nonexistent}" + exit 1 + fi + done + + whichdo_dofile_existent=$( + printf '%s\n' "${whichdo_dofiles}" \ + |tail -n1 + ) + if ! test -e "${whichdo_dofile_existent}"; then + >&2 printf 'redo-whichdo prints %s as existent dofile, but it does not exist.\n' \ + "${whichdo_dofile_existent}" + exit 1 + fi + +done diff --git a/t/redo-sh.tests/whichdo_absolute_default_1/test b/t/redo-sh.tests/whichdo_absolute_default_1/test new file mode 100755 index 0000000000000000000000000000000000000000..f7e757ee13cc540d6c0e7e6194c1a027faf331f06aa2224beb38d32b1a00f255 --- /dev/null +++ b/t/redo-sh.tests/whichdo_absolute_default_1/test @@ -0,0 +1,22 @@ +#!/bin/sh -eu +# When invoked with an absolute path name with the prefix “default” as +# an argument, redo-whichdo must not output any dofile filename twice. + +default_files="default default.a default.a.b default.do default.a.do default.a.b.do" + +for default_file in ${default_files}; do + whichdo_dofiles_duplicates=$( + redo-whichdo "${PWD}/${default_file}" \ + |tr '\0' '\n' \ + |sort \ + |uniq -d + ) + case "${whichdo_dofiles_duplicates}" in + '') + ;; + *) + >&2 printf 'redo-whichdo duplicate output: %s \n' ${whichdo_dofiles_duplicates} + exit 1 + ;; + esac +done diff --git a/t/redo-sh.tests/whichdo_absolute_default_2/test b/t/redo-sh.tests/whichdo_absolute_default_2/test new file mode 100755 index 0000000000000000000000000000000000000000..cf429bff2b19fc0ab379bef987af57ee1aa4c31fc8759cf113da54f4a4fd8253 --- /dev/null +++ b/t/redo-sh.tests/whichdo_absolute_default_2/test @@ -0,0 +1,21 @@ +#!/bin/sh -eu +# When invoked with an absolute filename for the file “default.do” as +# an argument, redo-whichdo must not output that filename as possible +# dofile. + +default_dofile="${PWD}/default.do" + +whichdo_dofiles=$( + redo-whichdo "${default_dofile}" \ + |tr '\0' '\n' +) + +for whichdo_dofile in ${whichdo_dofiles}; do + case "${whichdo_dofile}" in + "${default_dofile}") + >&2 printf 'redo-whichdo outputs that this file is its own dofile: %s\n' \ + "${whichdo_dofile}" + exit 1 + ;; + esac +done diff --git a/t/redo-sh.tests/whichdo_relative_1/test b/t/redo-sh.tests/whichdo_relative_1/test new file mode 100755 index 0000000000000000000000000000000000000000..872361ba4ede1da527cefa9a08858507c20259e0fb9f54e82e0a0361d7f5b8f2 --- /dev/null +++ b/t/redo-sh.tests/whichdo_relative_1/test @@ -0,0 +1,46 @@ +#!/bin/sh -eu +# When invoked with a relative path name as an argument, redo-whichdo +# must output non-existent dofiles in the same directory until it +# outputs one that exists. + +dofiles="default.do default.c.do default.b.c.do a.b.c.do" + +for dofile in ${dofiles}; do + if test -e "${dofile}"; then + rm -- "${dofile}" + fi +done + +for dofile in ${dofiles}; do + >"${dofile}" cat <&2 printf 'redo-whichdo prints %s as nonexistent dofile, but it exists.\n' \ + "${whichdo_dofile_nonexistent}" + exit 1 + fi + done + + whichdo_dofile_existent=$( + printf '%s\n' "${whichdo_dofiles}" \ + |tail -n1 + ) + if ! test -e "${whichdo_dofile_existent}"; then + >&2 printf 'redo-whichdo prints %s as existent dofile, but it does not exist.\n' \ + "${whichdo_dofile_existent}" + exit 1 + fi + +done diff --git a/t/redo-sh.tests/whichdo_relative_2/test b/t/redo-sh.tests/whichdo_relative_2/test new file mode 100755 index 0000000000000000000000000000000000000000..a109a3864b4d8b428835483139167272931b5fa00752c87bae8c12a918fefab6 --- /dev/null +++ b/t/redo-sh.tests/whichdo_relative_2/test @@ -0,0 +1,50 @@ +#!/bin/sh -eu +# When invoked with a relative path name as an argument, redo-whichdo +# must output non-existent dofiles in the parent directory and the +# same directory until it outputs one that exists. + +if ! test -d a; then + mkdir a +fi + +dofiles="default.do default.c.do default.b.c.do a/default.do a/default.c.do a/default.b.c.do a/a.b.c.do" + +for dofile in ${dofiles}; do + if test -e "${dofile}"; then + rm -- "${dofile}" + fi +done + +for dofile in ${dofiles}; do + >"${dofile}" cat <&2 printf 'redo-whichdo prints %s as nonexistent dofile, but it exists.\n' \ + "${whichdo_dofile_nonexistent}" + exit 1 + fi + done + + whichdo_dofile_existent=$( + printf '%s\n' "${whichdo_dofiles}" \ + |tail -n1 + ) + if ! test -e "${whichdo_dofile_existent}"; then + >&2 printf 'redo-whichdo prints %s as existent dofile, but it does not exist.\n' \ + "${whichdo_dofile_existent}" + exit 1 + fi + +done diff --git a/t/redo-sh.tests/whichdo_relative_default_1/test b/t/redo-sh.tests/whichdo_relative_default_1/test new file mode 100755 index 0000000000000000000000000000000000000000..7b12ebfd9ea073d72a23acf24be98f69d87027281cdec4ec73dac4f6327841f6 --- /dev/null +++ b/t/redo-sh.tests/whichdo_relative_default_1/test @@ -0,0 +1,22 @@ +#!/bin/sh -eu +# When invoked with a relative path name with the prefix “default” as +# an argument, redo-whichdo must not output any dofile filename twice. + +default_files="default default.a default.a.b default.do default.a.do default.a.b.do" + +for default_file in ${default_files}; do + whichdo_dofiles_duplicates=$( + redo-whichdo "${default_file}" \ + |tr '\0' '\n' \ + |sort \ + |uniq -d + ) + case "${whichdo_dofiles_duplicates}" in + '') + ;; + *) + >&2 printf 'redo-whichdo duplicate output: %s \n' ${whichdo_dofiles_duplicates} + exit 1 + ;; + esac +done diff --git a/t/redo-sh.tests/whichdo_relative_default_2/test b/t/redo-sh.tests/whichdo_relative_default_2/test new file mode 100755 index 0000000000000000000000000000000000000000..54de05644b6f2e54a1cc99eb27bf618c220d0ccd27cad1d30c5e8d87b5f40247 --- /dev/null +++ b/t/redo-sh.tests/whichdo_relative_default_2/test @@ -0,0 +1,21 @@ +#!/bin/sh -eu +# When invoked with a relative filename for the file “default.do” as +# an argument, redo-whichdo must not output that filename as possible +# dofile. + +default_dofile="default.do" + +whichdo_dofiles=$( + redo-whichdo "${default_dofile}" \ + |tr '\0' '\n' +) + +for whichdo_dofile in ${whichdo_dofiles}; do + case "${whichdo_dofile}" in + "${PWD}/${default_dofile}") + >&2 printf 'redo-whichdo outputs that this file is its own dofile: %s\n' \ + "${whichdo_dofile}" + exit 1 + ;; + esac +done diff --git a/t/redo-sh.tests/wrapper.rc b/t/redo-sh.tests/wrapper.rc new file mode 100755 index 0000000000000000000000000000000000000000..7bfc96dc8437da89cbe9cfb079ece4a37bbca213608deaef080cdf9272d5086d --- /dev/null +++ b/t/redo-sh.tests/wrapper.rc @@ -0,0 +1,13 @@ +#!/bin/sh + +testname=`basename "$0"` +testname=${testname#redosh-} +testname=${testname%.t} +testdir=`dirname $0`/redo-sh.tests/$testname +cd $testdir +testdir=`pwd` +test_description="`sed -n '2,/^$/p' test | sed 's/# //'`" +. $SHARNESS_TEST_SRCDIR/sharness.sh +cd $testdir +test_expect_success itself ./test +test_done diff --git a/t/redosh-dependency_ne_dofile_1.t b/t/redosh-dependency_ne_dofile_1.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-dependency_ne_dofile_1.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/redosh-dependency_ne_dofile_2.t b/t/redosh-dependency_ne_dofile_2.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-dependency_ne_dofile_2.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/redosh-dependency_ne_nobuild_1.t b/t/redosh-dependency_ne_nobuild_1.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-dependency_ne_nobuild_1.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/redosh-dependency_ne_rebuild_1.t b/t/redosh-dependency_ne_rebuild_1.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-dependency_ne_rebuild_1.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/redosh-dependency_nobuild_1.t b/t/redosh-dependency_nobuild_1.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-dependency_nobuild_1.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/redosh-dependency_nobuild_2.t b/t/redosh-dependency_nobuild_2.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-dependency_nobuild_2.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/redosh-dependency_nobuild_3.t b/t/redosh-dependency_nobuild_3.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-dependency_nobuild_3.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/redosh-dependency_rebuild_1.t b/t/redosh-dependency_rebuild_1.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-dependency_rebuild_1.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/redosh-dependency_rebuild_2.t b/t/redosh-dependency_rebuild_2.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-dependency_rebuild_2.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/redosh-dependency_rebuild_3.t b/t/redosh-dependency_rebuild_3.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-dependency_rebuild_3.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/redosh-dofile_generated_1.t b/t/redosh-dofile_generated_1.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-dofile_generated_1.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/redosh-dofile_generated_2.t b/t/redosh-dofile_generated_2.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-dofile_generated_2.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/redosh-parallel_1.t b/t/redosh-parallel_1.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-parallel_1.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/redosh-whichdo_absolute_1.t b/t/redosh-whichdo_absolute_1.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-whichdo_absolute_1.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/redosh-whichdo_absolute_2.t b/t/redosh-whichdo_absolute_2.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-whichdo_absolute_2.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/redosh-whichdo_absolute_default_1.t b/t/redosh-whichdo_absolute_default_1.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-whichdo_absolute_default_1.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/redosh-whichdo_absolute_default_2.t b/t/redosh-whichdo_absolute_default_2.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-whichdo_absolute_default_2.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/redosh-whichdo_relative_1.t b/t/redosh-whichdo_relative_1.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-whichdo_relative_1.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/redosh-whichdo_relative_2.t b/t/redosh-whichdo_relative_2.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-whichdo_relative_2.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/redosh-whichdo_relative_default_1.t b/t/redosh-whichdo_relative_default_1.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-whichdo_relative_default_1.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/redosh-whichdo_relative_default_2.t b/t/redosh-whichdo_relative_default_2.t new file mode 120000 index 0000000000000000000000000000000000000000..8630ce5b04c2446d2bc2f6b421d0110def671d254125aa2a09a8553ecb4b66d8 --- /dev/null +++ b/t/redosh-whichdo_relative_default_2.t @@ -0,0 +1 @@ +redo-sh.tests/wrapper.rc \ No newline at end of file diff --git a/t/runner.rc b/t/runner.rc deleted file mode 100755 index c5ec920218b8ee7a0d6c8818f4b09e12b2740979f8d9ccfd114c62b68552742f..0000000000000000000000000000000000000000 --- a/t/runner.rc +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -testdir=`dirname $0`/redo-sh.tests/`basename "${0%.t}"` -cd $testdir -testdir=`pwd` -test_description="`sed -n '2,/^$/p' test | sed 's/# //'`" -. $SHARNESS_TEST_SRCDIR/sharness.sh -cd $testdir -test_expect_success itself ./test -test_done diff --git a/usage.go b/usage.go index eeebe87e9d633cc683977a532a59f4b5bebef9021ef7fa31abaa965cb7f2111a..3463c2501b501eb627fc03700c1fdcef3dfc290cf80c2131bfa925d736dc8a60 100644 --- a/usage.go +++ b/usage.go @@ -26,7 +26,7 @@ "strings" ) const ( - Version = "0.5.0" + Version = "0.6.0" Warranty = `This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License. @@ -58,7 +58,7 @@ be linked to goredo executable. It determines the command by its own name. You can create them by running: goredo -symlinks. * redo [options] [target ...] - forcefully and sequentially build specified targets + forcefully and *sequentially* build specified targets * redo-always always build current target. Unusable outside .do * redo-cleanup {full,log,tmp} [...]