summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2010-04-05 21:19:30 +0200
committerMichael Buesch <mb@bu3sch.de>2010-04-05 21:19:30 +0200
commitbd0c8f5b87b57f47f7fb5e6481a5f2e40d557847 (patch)
tree194c81a2a7ac9ffaff6374b8a6bac8d9c65dad84 /tests
parent68ade76201df7aec54b913f74b6c52b3ad1f89bc (diff)
downloadtoprammer-bd0c8f5b87b57f47f7fb5e6481a5f2e40d557847.tar.xz
toprammer-bd0c8f5b87b57f47f7fb5e6481a5f2e40d557847.zip
testsuite: Set randomized testfiles to read-only mode
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run-tests.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/run-tests.sh b/tests/run-tests.sh
index 5c3bd9b..39ad135 100755
--- a/tests/run-tests.sh
+++ b/tests/run-tests.sh
@@ -106,8 +106,10 @@ function request_TOP # $1=TOPxxxx
function create_random_file # $1=file $2=bs $3=count
{
- dd if=/dev/urandom of=$1 bs=$2 count=$3 >/dev/null 2>&1
+ dd if=/dev/urandom of="$1" bs="$2" count="$3" >/dev/null 2>&1
[ $? -eq 0 ] || die "Failed to create $1"
+ chmod 444 "$1"
+ [ $? -eq 0 ] || die "Failed to set $1 read-only"
}
function compare_files # $1=file1 $2=file2
bues.ch cgit interface