1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-07 02:30:38 +00:00

disable debug in tests with env var

This commit is contained in:
deadc0de6
2019-03-13 09:00:43 +01:00
parent bf23f6b341
commit b19f115351
27 changed files with 43 additions and 35 deletions

View File

@@ -84,7 +84,7 @@ profiles:
dotfiles:
- f_abc
_EOF
cat ${cfg}
#cat ${cfg}
# create the dotfile
echo "test" > ${tmps}/dotfiles/abc

View File

@@ -106,7 +106,7 @@ profiles:
- d_dir
- d_dlink
_EOF
cat ${cfg}
#cat ${cfg}
# create the dotfile
echo 'test' > ${tmps}/dotfiles/abc

View File

@@ -80,7 +80,7 @@ profiles:
dotfiles:
- f_abc
_EOF
cat ${cfg}
#cat ${cfg}
# create the dotfile
echo "test" > ${tmps}/dotfiles/abc

View File

@@ -103,12 +103,12 @@ cd ${ddpath} | ${bin} compare -c ${cfg} --verbose --ignore=${patt}
[ "$?" = "0" ] && exit 1
set -e
cat ${cfg}
#cat ${cfg}
# adding ignore in dotfile
cfg2="${basedir}/config2.yaml"
sed '/d_config:/a \ \ \ \ cmpignore:\n\ \ \ \ - "*/config/b"' ${cfg} > ${cfg2}
cat ${cfg2}
#cat ${cfg2}
# expects one diff
echo "[+] comparing with ignore in dotfile - 1 diff"
@@ -121,7 +121,7 @@ set -e
cfg2="${basedir}/config2.yaml"
sed '/d_config:/a \ \ \ \ cmpignore:\n\ \ \ \ - "*b"' ${cfg} > ${cfg2}
sed -i '/d_program:/a \ \ \ \ cmpignore:\n\ \ \ \ - "*b"' ${cfg2}
cat ${cfg2}
#cat ${cfg2}
# expects no diff
patt="*b"

View File

@@ -68,7 +68,7 @@ profiles:
dotfiles:
- f_abc
_EOF
cat ${cfg}
#cat ${cfg}
# create the imported one
mkdir -p ${tmps}/dotfiles/${tmpd}

View File

@@ -96,7 +96,7 @@ profiles:
dotfiles:
- f_abc
_EOF
cat ${cfg}
#cat ${cfg}
# create the dotfile
echo "test" > ${tmps}/dotfiles/abc

View File

@@ -72,7 +72,7 @@ profiles:
dotfiles:
- f_abc
_EOF
cat ${cfg}
#cat ${cfg}
# create the dotfile
echo "{{@@ dpath @@}}" > ${tmps}/dotfiles/abc

View File

@@ -84,7 +84,7 @@ profiles:
include:
- profile{{@@ dvar1 @@}}
_EOF
cat ${cfg}
#cat ${cfg}
# create the dotfile
c1="content:abc"

View File

@@ -81,7 +81,7 @@ profiles:
dotfiles:
- f_abc
_EOF
cat ${cfg}
#cat ${cfg}
# create the dotfile
echo "{{@@ var1 @@}}" > ${tmps}/dotfiles/abc

View File

@@ -70,7 +70,7 @@ profiles:
dotfiles:
- f_abc
_EOF
cat ${cfg}
#cat ${cfg}
# create the dotfile
echo "{{@@ header() @@}}" > ${tmps}/dotfiles/abc

View File

@@ -69,7 +69,7 @@ profiles:
dotfiles:
- f_abc
_EOF
cat ${cfg}
#cat ${cfg}
# create the dotfile
echo "this is the test dotfile" > ${tmps}/dotfiles/abc
@@ -83,12 +83,12 @@ echo "{%@@ if exists('/dev/abcdef') @@%}" >> ${tmps}/dotfiles/abc
echo "this should not exist" >> ${tmps}/dotfiles/abc
echo "{%@@ endif @@%}" >> ${tmps}/dotfiles/abc
cat ${tmps}/dotfiles/abc
#cat ${tmps}/dotfiles/abc
# install
cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -V
cat ${tmpd}/abc
#cat ${tmpd}/abc
grep '^this should exist' ${tmpd}/abc >/dev/null
grep -v '^this should not exist' ${tmpd}/abc >/dev/null

View File

@@ -76,7 +76,7 @@ profiles:
dotfiles:
- f_abc
_EOF
cat ${cfg}
#cat ${cfg}
# create the dotfile
mkdir -p ${tmps}/dotfiles/abc

View File

@@ -76,7 +76,7 @@ profiles:
dotfiles:
- f_abc
_EOF
cat ${cfg}
#cat ${cfg}
# create the dotfile
mkdir -p ${tmps}/dotfiles/abc

View File

@@ -76,7 +76,7 @@ profiles:
dotfiles:
- f_abc
_EOF
cat ${cfg}
#cat ${cfg}
# create the dotfile
echo "{{@@ profile @@}}" > ${tmps}/dotfiles/abc

View File

@@ -93,7 +93,7 @@ profiles:
dotfiles:
- f_abc
_EOF
cat ${cfg}
#cat ${cfg}
# create the dotfile
echo "===================" > ${tmps}/dotfiles/abc

View File

@@ -79,7 +79,7 @@ profiles:
dotfiles:
- f_abc
_EOF
cat ${cfg}
#cat ${cfg}
# create the dotfile
echo "var3: {{@@ var3 @@}}" > ${tmps}/dotfiles/abc

View File

@@ -95,7 +95,7 @@ profiles:
- f_def
- d_ghi
_EOF
cat ${cfg}
#cat ${cfg}
# create the base64 dotfile
tmpf=`mktemp --suffix='-dotdrop-tests'`

View File

@@ -77,7 +77,7 @@ profiles:
dotfiles:
- f_abc
_EOF
cat ${cfg}
#cat ${cfg}
#tree ${dt}

View File

@@ -75,7 +75,7 @@ profiles:
dotfiles:
- f_abc
_EOF
cat ${cfg}
#cat ${cfg}
# create the dotfile
echo "head" > ${tmps}/dotfiles/abc
@@ -92,14 +92,14 @@ echo "is p1" >> ${tmpd}/abc
echo "tail" >> ${tmpd}/abc
# update
cat ${tmps}/dotfiles/abc
#cat ${tmps}/dotfiles/abc
set +e
patch=`cd ${ddpath} | ${bin} update -P -p p1 -k f_abc --cfg ${cfg} 2>&1 | grep 'try patching with' | sed 's/"//g'`
set -e
patch=`echo ${patch} | sed 's/^.*: //g'`
echo "patching with: ${patch}"
eval ${patch}
cat ${tmps}/dotfiles/abc
#cat ${tmps}/dotfiles/abc
## CLEANING
rm -rf ${tmps} ${tmpd} ${tmpw}

View File

@@ -74,7 +74,7 @@ profiles:
dotfiles:
- f_abc
_EOF
cat ${cfg}
#cat ${cfg}
# create the dotfile
echo "{{@@ var1 @@}}" > ${tmps}/dotfiles/abc

View File

@@ -83,7 +83,7 @@ profiles:
dotfiles:
- f_abc
_EOF
cat ${cfg}
#cat ${cfg}
# create the dotfile
echo "{{@@ profile @@}}" > ${tmpf}/abc
@@ -138,7 +138,7 @@ profiles:
dotfiles:
- f_abc
_EOF
cat ${cfg}
#cat ${cfg}
# create the dotfile
echo "{{@@ profile @@}}" > ${tmpf}/abc
@@ -189,7 +189,7 @@ profiles:
dotfiles:
- f_abc
_EOF
cat ${cfg}
#cat ${cfg}
# create the dotfile
echo "{{@@ profile @@}}" > ${tmpf}/abc