summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorPavel Raiskup <praiskup@redhat.com>2015-11-20 18:43:53 +0100
committerPavel Raiskup <praiskup@redhat.com>2015-11-20 18:43:53 +0100
commit8c80431e9c9425b3edd7517e9c0dd814599b7104 (patch)
tree008ea00e183ffaec30deaa23275cd748d20c22d3 /bin
parent995a49aae00e7adda6bb1e44d45aac9840ec5dab (diff)
downloaddtf-8c80431e9c9425b3edd7517e9c0dd814599b7104.tar.gz
dtf-8c80431e9c9425b3edd7517e9c0dd814599b7104.tar.xz
dtf-8c80431e9c9425b3edd7517e9c0dd814599b7104.zip
dtf-gen: don't take $outputdir as test candidate
* bin/dtf-gen: Ensure that $outputdir is absolute path. * share/dtf/lib/default (__dtf_is_testdir): Readlink -f for both outputdir and test case candidate directory. This is OK because we don't have to make 'dtf-gen' script terribly portable.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dtf-gen5
1 files changed, 5 insertions, 0 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"