Permalink
Browse files

Added tests for bootparam functions

  • Loading branch information...
1 parent 5735d65 commit bbd9c2940a9825e1770315c21777648b293fdb30 @mrud mrud committed Nov 2, 2009
Showing with 1,214 additions and 0 deletions.
  1. +1 −0 debian/rules
  2. +15 −0 tests/common_tests
  3. +29 −0 tests/run_tests.sh
  4. +1,116 −0 tests/shunit2
  5. +53 −0 tests/test_bootparameters.sh
View
@@ -10,6 +10,7 @@ build: build-stamp
build-stamp:
dh_testdir
+ (cd tests && ./run_tests.sh)
touch build-stamp
View
@@ -0,0 +1,15 @@
+#!/bin/zsh
+
+setopt shwordsplit
+
+oneTimeSetUp() {
+ OLDPATH=$PATH
+
+ . ../core.sh
+
+ export PATH=$OLDPATH
+}
+
+
+SHUNIT_PARENT=$1
+. ./shunit2
View
@@ -0,0 +1,29 @@
+#!/bin/zsh
+# Filename: run_tests
+# Purpose: run unit tests for grml-autoconfig
+# Authors: grml-team (grml.org), (c) Ulrich Dangel <mru@grml.org>
+# Bug-Reports: see http://grml.org/bugs/
+# License: This file is licensed under the GPL v2.
+################################################################################
+
+
+GLOBRETVAL=0
+
+for FILE in test_*.sh ; do
+ if [ -x ${FILE} ] ; then
+ pretty_name="${FILE##test_}"
+ pretty_name="${pretty_name/.sh/}"
+
+ echo "Running test for: ${pretty_name}"
+
+ ./${FILE}
+ RETVAL=$?
+
+ [ "$RETVAL" -ne 0 ] && GLOBRETVAL=$RETVAL
+ fi
+done
+
+exit $GLOBRETVAL
+
+## END OF FILE #################################################################
+# vim:foldmethod=marker expandtab ai ft=zsh shiftwidth=3
Oops, something went wrong.

0 comments on commit bbd9c29

Please sign in to comment.