diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-01-19 17:53:24 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-01-19 17:56:42 +0000 |
commit | 6997576c5b426b394a306376aa59a9b07db4df66 (patch) | |
tree | 2807bccdd46507b1f7067134ecaed486f75e0c3a /tests/test-linux-vserver.sh | |
parent | 3cfd879573fb492264c6610959fae03ae926452f (diff) | |
download | virt-what-6997576c5b426b394a306376aa59a9b07db4df66.tar.gz virt-what-6997576c5b426b394a306376aa59a9b07db4df66.tar.xz virt-what-6997576c5b426b394a306376aa59a9b07db4df66.zip |
Add regression test for Linux-VServer (thanks Barış Metin).
Diffstat (limited to 'tests/test-linux-vserver.sh')
-rwxr-xr-x | tests/test-linux-vserver.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/test-linux-vserver.sh b/tests/test-linux-vserver.sh new file mode 100755 index 0000000..40d75a5 --- /dev/null +++ b/tests/test-linux-vserver.sh @@ -0,0 +1,35 @@ +# Test for linux vserver. +# Data supplied by Barış Metin. +# Copyright (C) 2008-2011 Red Hat Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +root=tests/linux-vserver + +output="$(./virt-what --test-root=$root 2>&1)" +expected="linux_vserver" + +if [ "$output" != "$expected" ]; then + echo "$0: test failed because output did not match expected" + echo "Expected output was:" + echo "----------------------------------------" + echo "$expected" + echo "----------------------------------------" + echo "But the actual output of the program was:" + echo "----------------------------------------" + echo "$output" + echo "----------------------------------------" + exit 1 +fi |