-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* master: minimal/do: some shells return error in "read x <file" for empty files. minimal/do: fix a really scary bugs in "set -e" behaviour. Add a test for install.do. Add a test for --keep-going option. Add a test for --shuffle option. Rename 111-compile to 111-compile2. t/100-args: add a test for --old-args feature. t/350-deps: 'redo clean' was crashing. t/201-fail: add a simple test for non-existent source files.
- Loading branch information
Showing
33 changed files
with
90 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
rm -f log | ||
redo fatal >&/dev/null || true | ||
|
||
[ "$(cat log)" = "ok" ] || exit 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rm -f log *~ .*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
rm -f log | ||
echo ok >>log | ||
this-should-cause-a-fatal-error | ||
echo fail >>log # this line should never run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
redo test.args test2.args passfailtest | ||
. ../skip-if-minimal-do.sh | ||
redo --old-args test.oldargs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Note: this test expects to be run with 'redo --old-args' or it will fail. | ||
. ../skip-if-minimal-do.sh | ||
[ "$1" = "test" ] | ||
[ "$2" = ".oldargs" ] | ||
[ "$3" != "test.oldargs" ] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
exec >&2 | ||
. ../skip-if-minimal-do.sh | ||
|
||
# Need to repeat this several times, on the off chance that shuffling the | ||
# input happens to give us the same output (probability 1/factorial(9)) | ||
x=0 | ||
while [ "$x" -lt 10 ]; do | ||
x=$(($x + 1)) | ||
rm -f out.log | ||
redo --shuffle 1.x 2.x 3.x 4.x 5.x 6.x 7.x 8.x 9.x | ||
sort out.log >sort.log | ||
if ! diff -q out.log sort.log >/dev/null; then | ||
exit 0 | ||
fi | ||
echo "retry: #$x" | ||
done | ||
|
||
# still not shuffled? | ||
exit 22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rm -f *.log *~ .*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
echo $1 >>out.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
exec >&2 | ||
. ../skip-if-minimal-do.sh | ||
|
||
rm -f out.log sort.log err.log | ||
redo --keep-going 1.ok 2.fail 3.fail 4.ok 5.ok 6.fail 7.ok >&err.log && | ||
exit 11 # expect it to return nonzero due to failures | ||
sort out.log >sort.log | ||
|
||
expect="1 | ||
2 fail | ||
3 fail | ||
4 | ||
5 | ||
6 fail | ||
7" | ||
|
||
[ "$(cat sort.log)" = "$expect" ] || exit 22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rm -f *.log *~ .*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
echo $2 fail >>out.log | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
echo $2 >>out.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
rm -f this-doesnt-exist | ||
! redo this-doesnt-exist >&/dev/null || exit 32 # expected to fail | ||
! redo-ifchange this-doesnt-exist >&/dev/null || exit 33 # expected to fail | ||
redo-ifcreate this-doesnt-exist >&/dev/null || exit 34 # expected to pass | ||
|
||
|
||
|
||
rm -f fail | ||
! redo-ifchange fail >&/dev/null || exit 44 # expected to fail | ||
|
||
touch fail | ||
../flush-cache | ||
redo-ifchange fail >&/dev/null || exit 55 # expected to pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
redo basic/clean dirtest/clean | ||
redo basic/clean | ||
rm -f *~ .*~ *.count t1a overwrite overwrite[123] \ | ||
genfile2 genfile.log static.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
install.log | ||
test.tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
rm -rf test.tmp | ||
DESTDIR=$PWD/test.tmp redo ../../install >&install.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rm -rf test.tmp install.log *~ .*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters