cli.test: passthrough and use TMPDIR

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2017-01-20 11:29:59 -05:00
parent d1073b349b
commit 235566d9e0
Signed by: vbatts
GPG key ID: 10937E57733F1362
8 changed files with 11 additions and 8 deletions

View file

@ -13,6 +13,9 @@ func main() {
failed := 0
for _, arg := range flag.Args() {
cmd := exec.Command("bash", arg)
if os.Getenv("TMPDIR") != "" {
cmd.Env = append(cmd.Env, "TMPDIR="+os.Getenv("TMPDIR"))
}
cmd.Stderr = os.Stderr
cmd.Stdout = os.Stdout
if err := cmd.Run(); err != nil {

View file

@ -4,7 +4,7 @@ set -e
name=$(basename $0)
root="$(dirname $(dirname $(dirname $0)))"
gomtree=$(readlink -f ${root}/gomtree)
t=$(mktemp -d /tmp/go-mtree.XXXXXX)
t=$(mktemp -t -d go-mtree.XXXXXX)
echo "[${name}] Running in ${t}"
# This test is for basic running check of manifest, and check against tar and file system

View file

@ -4,7 +4,7 @@ set -e
name=$(basename $0)
root="$(dirname $(dirname $(dirname $0)))"
gomtree=$(readlink -f ${root}/gomtree)
t=$(mktemp -d /tmp/go-mtree.XXXXXX)
t=$(mktemp -t -d go-mtree.XXXXXX)
echo "[${name}] Running in ${t}"
# This test is for basic running check of manifest, and check against tar and file system

View file

@ -4,7 +4,7 @@ set -e
name=$(basename $0)
root="$(dirname $(dirname $(dirname $0)))"
gomtree=$(readlink -f ${root}/gomtree)
t=$(mktemp -d /tmp/go-mtree.XXXXXX)
t=$(mktemp -t -d go-mtree.XXXXXX)
setfattr -n user.has.xattrs -v "true" "${t}" || exit 0

View file

@ -5,7 +5,7 @@ set -e
name=$(basename $0)
root="$(dirname $(dirname $(dirname $0)))"
gomtree=$(readlink -f ${root}/gomtree)
t=$(mktemp -d /tmp/go-mtree.XXXXXX)
t=$(mktemp -t -d go-mtree.XXXXXX)
echo "[${name}] Running in ${t}"

View file

@ -4,7 +4,7 @@ set -e
name=$(basename $0)
root="$(dirname $(dirname $(dirname $0)))"
gomtree=$(readlink -f ${root}/gomtree)
t=$(mktemp -d /tmp/go-mtree.XXXXXX)
t=$(mktemp -t -d go-mtree.XXXXXX)
echo "[${name}] Running in ${t}"

View file

@ -4,7 +4,7 @@ set -e
name=$(basename $0)
root="$(dirname $(dirname $(dirname $0)))"
gomtree=$(readlink -f ${root}/gomtree)
t=$(mktemp -d /tmp/go-mtree.XXXXXX)
t=$(mktemp -t -d go-mtree.XXXXXX)
echo "[${name}] Running in ${t}"
# This test is for basic running check of manifest, and check against tar and file system

View file

@ -4,8 +4,8 @@ set -e
name=$(basename $0)
root="$(dirname $(dirname $(dirname $0)))"
gomtree=$(readlink -f ${root}/gomtree)
left=$(mktemp -d /tmp/go-mtree.XXXXXX)
right=$(mktemp -d /tmp/go-mtree.XXXXXX)
left=$(mktemp -t -d go-mtree.XXXXXX)
right=$(mktemp -t -d go-mtree.XXXXXX)
echo "[${name}] Running in ${left} and ${right}"