diff options
| author | Pavel Raiskup <praiskup@redhat.com> | 2015-11-20 18:43:53 +0100 |
|---|---|---|
| committer | Pavel Raiskup <praiskup@redhat.com> | 2015-11-20 18:43:53 +0100 |
| commit | 8c80431e9c9425b3edd7517e9c0dd814599b7104 (patch) | |
| tree | 008ea00e183ffaec30deaa23275cd748d20c22d3 /bin | |
| parent | 995a49aae00e7adda6bb1e44d45aac9840ec5dab (diff) | |
| download | dtf-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-x | bin/dtf-gen | 5 |
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" |
