chiark / gitweb /
git-debrebase: test suite: gdr-*: use faketime to control dch dates
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 17 Feb 2018 19:23:58 +0000 (19:23 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jun 2018 15:04:33 +0000 (16:04 +0100)
This means that the dgit- and gdr-generated commits with dates from
changelogs are all adjusted.  This makes the gitk in the gdr tests
look more like a real one would, so we can see if it's pretty.  (It
also makes it easier to debug the tests.)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/tests/control
tests/lib
tests/setup/gdr-convert-gbp
tests/tests/gdr-edits
tests/tests/gdr-import-dgit

index 891c0c85820f4e924c67f36a31204c1a607995bc..05ea2dbdd5d1fe9b9cf8a59cb94be086464274f8 100644 (file)
@@ -18,7 +18,7 @@ Restrictions: x-dgit-intree-only x-dgit-git-only
 
 Tests: gdr-edits gdr-import-dgit
 Tests-Directory: tests/tests
-Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, git-buildpackage, libfile-fnmatch-perl
+Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, git-buildpackage, libfile-fnmatch-perl, faketime
 
 Tests: gitattributes
 Tests-Directory: tests/tests
index 6533a90b7aac96ec9d0e93eb2b08c544cb361237..8722522daeed3856a6497e1a92552f6646c62c6a 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -1005,7 +1005,7 @@ t-commit () {
 }
 
 t-dch-commit () {
-       dch "$@"
+       faketime @"${GIT_AUTHOR_DATE% *}" dch "$@"
        git commit -m "dch $*" debian/changelog
 }
 
index 8a21037166e06a870778f113f284d7c1891ba150..d12351dc95165bd1228fa29b77962f6d4728ac1c 100755 (executable)
@@ -3,7 +3,7 @@ set -e
 . tests/lib
 . $troot/lib-gdr
 
-t-dependencies git-buildpackage libfile-fnmatch-perl
+t-dependencies git-buildpackage libfile-fnmatch-perl faketime
 
 t-tstunt-parsechangelog
 
index d82c2383f1ab639a022bbb28deb7cfc7eb9c989f..c3ccff1273c897588272c6f645ac7b958948adc9 100755 (executable)
@@ -2,7 +2,7 @@
 set -e
 . tests/lib
 
-t-dependencies git-buildpackage libfile-fnmatch-perl
+t-dependencies git-buildpackage libfile-fnmatch-perl faketime
 
 t-setup-import gdr-convert-gbp
 
index 3d8d954ae720460176773d54a4797965f0f66690..c1e9ba9bd814dd01d60f4de8169d8a23db67ebf7 100755 (executable)
@@ -2,7 +2,7 @@
 set -e
 . tests/lib
 
-t-dependencies git-buildpackage libfile-fnmatch-perl
+t-dependencies git-buildpackage libfile-fnmatch-perl faketime
 
 t-setup-import gdr-convert-gbp