mirror of
https://github.com/vbatts/go-mtree.git
synced 2024-11-25 01:25:39 +00:00
Merge pull request #115 from vbatts/tmpdir
cli.test: passthrough and use TMPDIR
This commit is contained in:
commit
b9e743fdf0
8 changed files with 11 additions and 8 deletions
|
@ -13,6 +13,9 @@ func main() {
|
||||||
failed := 0
|
failed := 0
|
||||||
for _, arg := range flag.Args() {
|
for _, arg := range flag.Args() {
|
||||||
cmd := exec.Command("bash", arg)
|
cmd := exec.Command("bash", arg)
|
||||||
|
if os.Getenv("TMPDIR") != "" {
|
||||||
|
cmd.Env = append(cmd.Env, "TMPDIR="+os.Getenv("TMPDIR"))
|
||||||
|
}
|
||||||
cmd.Stderr = os.Stderr
|
cmd.Stderr = os.Stderr
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
if err := cmd.Run(); err != nil {
|
if err := cmd.Run(); err != nil {
|
||||||
|
|
|
@ -4,7 +4,7 @@ set -e
|
||||||
name=$(basename $0)
|
name=$(basename $0)
|
||||||
root="$(dirname $(dirname $(dirname $0)))"
|
root="$(dirname $(dirname $(dirname $0)))"
|
||||||
gomtree=$(readlink -f ${root}/gomtree)
|
gomtree=$(readlink -f ${root}/gomtree)
|
||||||
t=$(mktemp -d /tmp/go-mtree.XXXXXX)
|
t=$(mktemp -t -d go-mtree.XXXXXX)
|
||||||
|
|
||||||
echo "[${name}] Running in ${t}"
|
echo "[${name}] Running in ${t}"
|
||||||
# This test is for basic running check of manifest, and check against tar and file system
|
# This test is for basic running check of manifest, and check against tar and file system
|
||||||
|
|
|
@ -4,7 +4,7 @@ set -e
|
||||||
name=$(basename $0)
|
name=$(basename $0)
|
||||||
root="$(dirname $(dirname $(dirname $0)))"
|
root="$(dirname $(dirname $(dirname $0)))"
|
||||||
gomtree=$(readlink -f ${root}/gomtree)
|
gomtree=$(readlink -f ${root}/gomtree)
|
||||||
t=$(mktemp -d /tmp/go-mtree.XXXXXX)
|
t=$(mktemp -t -d go-mtree.XXXXXX)
|
||||||
|
|
||||||
echo "[${name}] Running in ${t}"
|
echo "[${name}] Running in ${t}"
|
||||||
# This test is for basic running check of manifest, and check against tar and file system
|
# This test is for basic running check of manifest, and check against tar and file system
|
||||||
|
|
|
@ -4,7 +4,7 @@ set -e
|
||||||
name=$(basename $0)
|
name=$(basename $0)
|
||||||
root="$(dirname $(dirname $(dirname $0)))"
|
root="$(dirname $(dirname $(dirname $0)))"
|
||||||
gomtree=$(readlink -f ${root}/gomtree)
|
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
|
setfattr -n user.has.xattrs -v "true" "${t}" || exit 0
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ set -e
|
||||||
name=$(basename $0)
|
name=$(basename $0)
|
||||||
root="$(dirname $(dirname $(dirname $0)))"
|
root="$(dirname $(dirname $(dirname $0)))"
|
||||||
gomtree=$(readlink -f ${root}/gomtree)
|
gomtree=$(readlink -f ${root}/gomtree)
|
||||||
t=$(mktemp -d /tmp/go-mtree.XXXXXX)
|
t=$(mktemp -t -d go-mtree.XXXXXX)
|
||||||
|
|
||||||
echo "[${name}] Running in ${t}"
|
echo "[${name}] Running in ${t}"
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ set -e
|
||||||
name=$(basename $0)
|
name=$(basename $0)
|
||||||
root="$(dirname $(dirname $(dirname $0)))"
|
root="$(dirname $(dirname $(dirname $0)))"
|
||||||
gomtree=$(readlink -f ${root}/gomtree)
|
gomtree=$(readlink -f ${root}/gomtree)
|
||||||
t=$(mktemp -d /tmp/go-mtree.XXXXXX)
|
t=$(mktemp -t -d go-mtree.XXXXXX)
|
||||||
|
|
||||||
echo "[${name}] Running in ${t}"
|
echo "[${name}] Running in ${t}"
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ set -e
|
||||||
name=$(basename $0)
|
name=$(basename $0)
|
||||||
root="$(dirname $(dirname $(dirname $0)))"
|
root="$(dirname $(dirname $(dirname $0)))"
|
||||||
gomtree=$(readlink -f ${root}/gomtree)
|
gomtree=$(readlink -f ${root}/gomtree)
|
||||||
t=$(mktemp -d /tmp/go-mtree.XXXXXX)
|
t=$(mktemp -t -d go-mtree.XXXXXX)
|
||||||
|
|
||||||
echo "[${name}] Running in ${t}"
|
echo "[${name}] Running in ${t}"
|
||||||
# This test is for basic running check of manifest, and check against tar and file system
|
# This test is for basic running check of manifest, and check against tar and file system
|
||||||
|
|
|
@ -4,8 +4,8 @@ set -e
|
||||||
name=$(basename $0)
|
name=$(basename $0)
|
||||||
root="$(dirname $(dirname $(dirname $0)))"
|
root="$(dirname $(dirname $(dirname $0)))"
|
||||||
gomtree=$(readlink -f ${root}/gomtree)
|
gomtree=$(readlink -f ${root}/gomtree)
|
||||||
left=$(mktemp -d /tmp/go-mtree.XXXXXX)
|
left=$(mktemp -t -d go-mtree.XXXXXX)
|
||||||
right=$(mktemp -d /tmp/go-mtree.XXXXXX)
|
right=$(mktemp -t -d go-mtree.XXXXXX)
|
||||||
|
|
||||||
echo "[${name}] Running in ${left} and ${right}"
|
echo "[${name}] Running in ${left} and ${right}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue