From: Andreas Dilger Date: Wed, 23 May 2012 21:05:21 +0000 (-0600) Subject: tests: make generated test scripts read-only X-Git-Tag: v1.42.7.wc1~39 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=9aa7eff0432b4329a86f3967b1c35a9ff2c2cd45;p=tools%2Fe2fsprogs.git tests: make generated test scripts read-only Make generated test scripts read-only, to avoid errors by developers editing the generated test scripts and then having them accidentally clobbered when "make" is run again. Signed-off-by: Andreas Dilger --- diff --git a/tests/Makefile.in b/tests/Makefile.in index b9df3b0..058a6f5 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -20,14 +20,14 @@ test_one: $(srcdir)/test_one.in Makefile mke2fs.conf @echo "SRCDIR=@srcdir@" >> test_one @echo "DIFF_OPTS=@UNI_DIFF_OPTS@" >> test_one @cat $(srcdir)/test_one.in >> test_one - @chmod +x test_one + @chmod +x-w test_one test_script: test_one test_script.in Makefile mke2fs.conf @echo "Creating test_script..." @echo "#!/bin/sh" > test_script @echo "SRCDIR=@srcdir@" >> test_script @cat $(srcdir)/test_script.in >> test_script - @chmod +x test_script + @chmod +x-w test_script mke2fs.conf: $(srcdir)/mke2fs.conf.in $(CP) $(srcdir)/mke2fs.conf.in mke2fs.conf @@ -46,7 +46,7 @@ test_pre: test_post: test_pre $(TESTS) @$(srcdir)/test_post -check:: test_pre test_post test_script +check:: test_pre test_script test_post check-failed: $(basename $(wildcard *.failed)) @$(srcdir)/test_post diff --git a/tests/test_one.in b/tests/test_one.in index d053fd7..06dc05a 100644 --- a/tests/test_one.in +++ b/tests/test_one.in @@ -60,8 +60,8 @@ else else echo "$test_name: Missing test script $default_script!" fi - [ -f $test_name.failed ] && cat $test_name.failed fi +[ -f $test_name.failed ] && cat $test_name.failed if [ "$SKIP_UNLINK" != "true" ] ; then rm -f $TMPFILE