Add tests from the old svn tree
We're losing the svn history (which we could probably keep if we tried hard enough) but don't consider that worthwhile. Note these tests are destructive, so run them only in a throwaway environment like a chroot, container, or vm. The tests/run.all script should be the one which launches all the tests. Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
33
tests/debian/01/run
Executable file
33
tests/debian/01/run
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
cd $(dirname $0)
|
||||
|
||||
# The goal of this test is to check the distributed files (as debdiff)
|
||||
|
||||
save()
|
||||
{
|
||||
[ ! -d tmp ] && mkdir tmp
|
||||
}
|
||||
|
||||
restore()
|
||||
{
|
||||
rm tmp/login_files tmp/passwd_files
|
||||
rmdir tmp
|
||||
}
|
||||
|
||||
save
|
||||
|
||||
trap 'restore' 0
|
||||
|
||||
dpkg -L login | sort > tmp/login_files
|
||||
dpkg -L passwd | sort > tmp/passwd_files
|
||||
|
||||
echo -n "Checking the login files..."
|
||||
diff -u data/login_files tmp/login_files
|
||||
echo "OK"
|
||||
echo -n "Checking the passwd files..."
|
||||
diff -u data/passwd_files tmp/passwd_files
|
||||
echo OK
|
||||
|
Reference in New Issue
Block a user