summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/dtf-gen5
-rw-r--r--share/dtf/lib/default7
2 files changed, 11 insertions, 1 deletions
diff --git a/bin/dtf-gen b/bin/dtf-gen
index 89c9ee0..e49ccc1 100755
--- a/bin/dtf-gen
+++ b/bin/dtf-gen
@@ -114,6 +114,11 @@ then
test -n "$2" && opt_distro="$2"
fi
+case $outputdir in
+ /*) : ;;
+ *) die "not absolute \$outputdir=$outputdir" ;;
+esac
+
test -d "$outputdir" && {
chmod u+w "$outputdir" -R
/bin/rm -rf "$outputdir"
diff --git a/share/dtf/lib/default b/share/dtf/lib/default
index 24a9c0c..9981b09 100644
--- a/share/dtf/lib/default
+++ b/share/dtf/lib/default
@@ -11,12 +11,17 @@
__dtf_is_testdir ()
{
test -d "$1" || return 1
+
case "$1" in
DTF_OUTPUT|DTF_RESULT|library)
return 1
;;
esac
- :
+
+ _d_sub_path=`readlink -f "$1"`
+ _d_out_path=`readlink -f "$outputdir"`
+
+ test "$_d_sub_path" != "$_d_out_path"
}