parallel/unittest/tests-to-run/test04.sh
Ole Tange 3fa2a4a8d4 Implemented automake
Prepared for name change to 'par'
2010-04-18 16:18:31 +02:00

36 lines
1,010 B
Bash

#!/bin/bash
PAR=parallel
rm -rf tmp 2>/dev/null
cd input-files
tar xjf random_dirs_no_newline.tar.bz2
cd ..
cp -a input-files/random_dirs_no_newline tmp
cd tmp
# tests if special dir names causes problems
ls | $PAR -v touch -- {}/abc-{}-{} 2>&1 | perl -e 'print sort (<>)' | md5sum
echo -n 'There are '
find . -type d -print0 | perl -0 -ne '$a++;END{print $a}'
echo -n ' dirs with '
find . -type f -print0 | perl -0 -ne '$a++;END{print $a}'
echo ' files'
echo 'Removing files'
ls | $PAR -v rm -- {}/abc-{}-{} 2>&1 | perl -e 'print sort (<>)' | md5sum
echo -n 'There are '
find . -type d -print0 | perl -0 -ne '$a++;END{print $a}'
echo -n ' dirs with '
find . -type f -print0 | perl -0 -ne '$a++;END{print $a}'
echo ' files'
echo 'Removing dirs'
ls | $PAR -v rmdir -- {} 2>&1 | perl -e 'print sort (<>)' | md5sum
echo -n 'There are '
find . -type d -print0 | perl -0 -ne '$a++;END{print $a}'
echo -n ' dirs with '
find . -type f -print0 | perl -0 -ne '$a++;END{print $a}'
echo ' files'
cd ..
rm -rf tmp