goredo: Add checkPhase
parent
8f1dfb16f4
commit
713abfa764
|
@ -1,4 +1,5 @@
|
||||||
{ buildGoModule, fetchurl, lib, zstd }:
|
{ buildGoModule, fetchurl, lib, zstd
|
||||||
|
, sharness, python3, perl }:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "goredo";
|
pname = "goredo";
|
||||||
|
@ -9,16 +10,29 @@ buildGoModule rec {
|
||||||
sha256 = "Wc+QIrkrsGA35KeI2UmYOUiyU78ItPQGCKpZO/vndxM=";
|
sha256 = "Wc+QIrkrsGA35KeI2UmYOUiyU78ItPQGCKpZO/vndxM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ zstd ];
|
patches = [ ./fix-tests.diff ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ zstd ] ++ lib.optionals doCheck [ python3 perl ];
|
||||||
|
SHARNESS_TEST_SRCDIR = sharness + "/share/sharness";
|
||||||
|
|
||||||
vendorSha256 = null;
|
vendorSha256 = null;
|
||||||
subPackages = [ "." ];
|
subPackages = [ "." ];
|
||||||
|
|
||||||
postPatch = "cd src";
|
preBuild = "cd src";
|
||||||
|
postBuild = ''
|
||||||
|
( cd $GOPATH/bin; ./goredo -symlinks )
|
||||||
|
cd ..
|
||||||
|
'';
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
checkPhase = ''
|
||||||
|
export PATH=$GOPATH/bin:$PATH
|
||||||
|
prove -f
|
||||||
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p "$out/share/info"
|
mkdir -p "$out/share/info"
|
||||||
cp ../goredo.info "$out/share/info"
|
cp goredo.info "$out/share/info"
|
||||||
( cd $out/bin; ./goredo -symlinks )
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
outputs = [ "out" "info" ];
|
outputs = [ "out" "info" ];
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
diff -ur goredo-1.4.1/t/apenwarr/105-sympath/all.do goredo-1.4.1.new/t/apenwarr/105-sympath/all.do
|
||||||
|
--- goredo-1.4.1/t/apenwarr/105-sympath/all.do 2021-04-29 14:03:11.000000000 +0200
|
||||||
|
+++ goredo-1.4.1.new/t/apenwarr/105-sympath/all.do 2021-05-10 15:04:46.912799930 +0200
|
||||||
|
@@ -11,12 +11,13 @@
|
||||||
|
(
|
||||||
|
cd y/x/x/x/x/x
|
||||||
|
IFS=$(printf '\n')
|
||||||
|
+ _wd=$(env pwd)
|
||||||
|
redo-ifchange static x/x/x/static $PWD/static \
|
||||||
|
- $(/bin/pwd)/static /etc/passwd
|
||||||
|
+ $_wd/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
|
||||||
|
+ $PWD/../4.dyn $_wd/5.dyn
|
||||||
|
)
|
||||||
|
[ -e y/1.dyn ] || exit $((iter + 1))
|
||||||
|
[ -e y/2.dyn ] || exit $((iter + 2))
|
||||||
|
diff -ur goredo-1.4.1/t/apenwarr/clean.do goredo-1.4.1.new/t/apenwarr/clean.do
|
||||||
|
--- goredo-1.4.1/t/apenwarr/clean.do 2021-04-29 14:03:11.000000000 +0200
|
||||||
|
+++ goredo-1.4.1.new/t/apenwarr/clean.do 2021-05-10 15:06:07.099591609 +0200
|
||||||
|
@@ -1,3 +1,3 @@
|
||||||
|
-/bin/ls [0-9s][0-9][0-9]*/clean.do |
|
||||||
|
+env ls [0-9s][0-9][0-9]*/clean.do |
|
||||||
|
sed 's/\.do$//' |
|
||||||
|
xargs redo
|
||||||
|
diff -ur goredo-1.4.1/t/redo-sh.tests/clean.do goredo-1.4.1.new/t/redo-sh.tests/clean.do
|
||||||
|
--- goredo-1.4.1/t/redo-sh.tests/clean.do 2021-04-29 14:03:11.000000000 +0200
|
||||||
|
+++ goredo-1.4.1.new/t/redo-sh.tests/clean.do 2021-05-10 15:02:41.607562802 +0200
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
for f in * ; do
|
||||||
|
[ -d $f ] || continue
|
||||||
|
- find $f ! -name test -delete
|
||||||
|
+ find $f ! -name test -delete || true
|
||||||
|
done
|
Loading…
Reference in New Issue