Fix the creation of the dumpdir directory in stress_floppy Makefile
[ltp-debian.git] / debian / generate-runtest
blob58bcff10499c8e854e3782d9a5bee632505be0fb
1 #!/bin/sh
3 discover_variable()
5 VAR=$1;
6 fgrep -w "$VAR" -l -R debian/tmp/usr/lib/ltp/testcases/bin | sed 's/^.*\/\([^/]*\)$/\\\\(\1\\\\)/' | {
7 read RET &&
8 while read x; do
9 RET="$x\\|$RET"
10 done &&
11 echo "g/\(^[^#]\).*\<\($RET\)\>/ s/\$/ # \$$VAR/" ||
12 echo "#"
16 # mkdir runtest.bak && cp runtest/* runtest.bak
17 # [ -d runtest.bak ] || exit 1
19 DVAR_HOSTS="$(discover_variable HOSTS)"
20 DVAR_RUSERS="$(discover_variable RUSERS)"
21 DVAR_RHOST="$(discover_variable RHOST)"
22 DVAR_RUSER="$(discover_variable RUSER)"
23 DVAR_PASSWD="$(discover_variable PASSWD)"
24 DVAR_DEVICE="$(discover_variable DEVICE)"
25 DVAR_DEVICE_FSTYPE="$(discover_variable DEVICE_FS_TYPE)"
26 for f in debian/tmp/usr/lib/ltp/runtest/*; do
27 ed $f <<EOF
28 g#/test/growfiles/reiser# s##"\$GROWFILES_REISER"#g
29 g#/test/growfiles/ramdisk# s##"\$GROWFILES_RAMDISK"#g
30 g#/test/growfiles/nfs# s##"\$GROWFILES_NFS"#g
31 g#/test/growfiles/msdos# s##"\$GROWFILES_MSDOS"#g
32 g#/test/growfiles/minix# s##"\$GROWFILES_MINIX"#g
33 g#/test/growfiles/jfs# s##"\$GROWFILES_JFS"#g
34 g#/test/growfiles/ext3# s##"\$GROWFILES_EXT3"#g
35 g#/test/growfiles/ext2# s##"\$GROWFILES_EXT2"#g
36 g#/test/aiodio2# s##"\$AIODIO2"#g
37 g#/test/aiodio# s##"\$AIODIO"#g
38 g#\<DEVICE_FS_TYPE\># s##"\$DEVICE_FS_TYPE"#g
39 g#\<DEVICE\># s##"\$DEVICE"#g
40 $DVAR_RHOST
41 $DVAR_RUSER
42 $DVAR_PASSWD
43 $DVAR_DEVICE
44 $DVAR_DEVICE_FSTYPE
45 $DVAR_HOSTS
46 $DVAR_RUSERS
48 EOF
49 done