Lines Matching refs:run_command
51 run_command() {
75 run_command df | awk "/$1/ {print gensub(/K/, \"\", \"g\", \$6)}"
82 run_command rm $WORK_DIR/bloat.dat
83 run_command rm $WORK_DIR/old.file
84 run_command rm $WORK_DIR/foo
85 run_command rm $WORK_DIR/patch.bsdiff
86 run_command rm $WORK_DIR/applypatch
87 run_command rm $CACHE_TEMP_SOURCE
88 run_command rm /cache/bloat*.dat
110 run_command $WORK_DIR/applypatch && fail
113 run_command $WORK_DIR/applypatch -l | grep -q -i copyright || fail
121 run_command $WORK_DIR/applypatch -c $WORK_DIR/old.file $OLD_SHA1 || fail
124 run_command $WORK_DIR/applypatch -c $WORK_DIR/old.file $BAD1_SHA1 $OLD_SHA1 $BAD2_SHA1|| fail
127 run_command $WORK_DIR/applypatch -c $WORK_DIR/old.file $BAD2_SHA1 $BAD1_SHA1 && fail
131 run_command dd if=/dev/urandom of=$WORK_DIR/old.file count=100 bs=1024 || fail
134 run_command $WORK_DIR/applypatch -c $WORK_DIR/old.file $OLD_SHA1 || fail
137 run_command $WORK_DIR/applypatch -c $WORK_DIR/old.file $BAD1_SHA1 $OLD_SHA1 $BAD2_SHA1|| fail
140 run_command $WORK_DIR/applypatch -c $WORK_DIR/old.file $BAD2_SHA1 $BAD1_SHA1 && fail
143 run_command rm $WORK_DIR/old.file
146 run_command $WORK_DIR/applypatch -c $WORK_DIR/old.file $OLD_SHA1 || fail
149 run_command $WORK_DIR/applypatch -c $WORK_DIR/old.file $BAD1_SHA1 $OLD_SHA1 $BAD2_SHA1|| fail
152 run_command $WORK_DIR/applypatch -c $WORK_DIR/old.file $BAD2_SHA1 $BAD1_SHA1 && fail
178 run_command $WORK_DIR/applypatch $WORK_DIR/old.file - $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail
183 run_command $WORK_DIR/applypatch $WORK_DIR/old.file - $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail
208 run_command rm $WORK_DIR/new.file
209 run_command rm $CACHE_TEMP_SOURCE
212 run_command $WORK_DIR/applypatch $WORK_DIR/old.file $WORK_DIR/new.file $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail
217 run_command $WORK_DIR/applypatch $WORK_DIR/old.file $WORK_DIR/new.file $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail
223 run_command dd if=/dev/urandom of=$WORK_DIR/old.file count=100 bs=1024 || fail
226 run_command $WORK_DIR/applypatch $WORK_DIR/old.file $WORK_DIR/new.file $NEW_SHA1 $NEW_SIZE $OLD_SHA1:$WORK_DIR/patch.bsdiff $BAD1_SHA1:$WORK_DIR/foo || fail
231 run_command dd if=/dev/urandom of=$CACHE_TEMP_SOURCE count=100 bs=1024 || fail
233 run_command rm $WORK_DIR/new.file
235 run_command $WORK_DIR/applypatch $WORK_DIR/old.file $WORK_DIR/new.file $NEW_SHA1 $NEW_SIZE $OLD_SHA1:$WORK_DIR/patch.bsdiff $BAD1_SHA1:$WORK_DIR/foo && fail
238 run_command dd if=/dev/urandom of=$WORK_DIR/new.file count=100 bs=1024 || fail
241 run_command $WORK_DIR/applypatch $WORK_DIR/old.file $WORK_DIR/new.file $NEW_SHA1 $NEW_SIZE $OLD_SHA1:$WORK_DIR/patch.bsdiff $BAD1_SHA1:$WORK_DIR/foo && fail
250 echo run_command dd if=/dev/zero of=$WORK_DIR/bloat.dat count=$((free_kb-512)) bs=1024 || fail
251 run_command dd if=/dev/zero of=$WORK_DIR/bloat.dat count=$((free_kb-512)) bs=1024 || fail
256 run_command $WORK_DIR/applypatch $WORK_DIR/old.file - $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail
261 run_command $WORK_DIR/applypatch $WORK_DIR/old.file - $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail
273 run_command mkdir /cache/subdir
274 run_command 'echo > /cache/subdir/a.file'
275 run_command 'echo > /cache/a.file'
276 run_command mkdir /cache/recovery /cache/recovery/otatest
277 run_command 'echo > /cache/recovery/otatest/b.file'
278 run_command "echo > $CACHE_TEMP_SOURCE"
281 run_command dd if=/dev/zero of=/cache/bloat_small.dat count=128 bs=1024 || fail
282 run_command dd if=/dev/zero of=/cache/bloat_large.dat count=$((free_kb-640)) bs=1024 || fail
291 run_command $WORK_DIR/applypatch -s $NEW_SIZE && fail
292 run_command ls /cache/bloat_small.dat && fail # was deleted
293 run_command ls /cache/a.file && fail # was deleted
294 run_command ls /cache/recovery/otatest/b.file && fail # was deleted
295 run_command ls /cache/bloat_large.dat || fail # wasn't deleted because it was open
296 run_command ls /cache/subdir/a.file || fail # wasn't deleted because it's in a subdir
297 run_command ls $CACHE_TEMP_SOURCE || fail # wasn't deleted because it's the source file copy
300 run_command $WORK_DIR/applypatch $WORK_DIR/old.file - $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff && fail
301 run_command ls /cache/bloat_large.dat || fail # wasn't deleted because it was open
302 run_command ls /cache/subdir/a.file || fail # wasn't deleted because it's in a subdir
303 run_command ls $CACHE_TEMP_SOURCE || fail # wasn't deleted because it's the source file copy
310 run_command $WORK_DIR/applypatch -s $NEW_SIZE || fail
311 run_command ls /cache/bloat_large.dat && fail # was deleted
312 run_command ls /cache/subdir/a.file || fail # still wasn't deleted because it's in a subdir
313 run_command ls $CACHE_TEMP_SOURCE || fail # wasn't deleted because it's the source file copy
316 run_command $WORK_DIR/applypatch $WORK_DIR/old.file - $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail
319 run_command ls /cache/subdir/a.file || fail # still wasn't deleted because it's in a subdir
320 run_command ls $CACHE_TEMP_SOURCE && fail # was deleted because patching overwrote it, then deleted it
326 run_command dd if=/dev/urandom of=$WORK_DIR/old.file count=100 bs=1024 || fail
329 run_command $WORK_DIR/applypatch $WORK_DIR/old.file - $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail
335 run_command rm $WORK_DIR/old.file
338 run_command $WORK_DIR/applypatch $WORK_DIR/old.file - $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail