[Lunar-commits] r16023 - in lunar-iso/trunk: . scripts
Auke Kok
sofar at lunar-linux.org
Sat Aug 6 16:25:12 UTC 2005
Author: sofar
Date: 2005-08-06 16:25:11 +0000 (Sat, 06 Aug 2005)
New Revision: 16023
Added:
lunar-iso/trunk/scripts/test
Modified:
lunar-iso/trunk/Makefile
Log:
Adding a 'make test' that does some simple tests. Perhaps later this will be really usefull but right now it only checks the very basic stuff.
Modified: lunar-iso/trunk/Makefile
===================================================================
--- lunar-iso/trunk/Makefile 2005-08-06 16:23:27 UTC (rev 16022)
+++ lunar-iso/trunk/Makefile 2005-08-06 16:25:11 UTC (rev 16023)
@@ -121,4 +121,6 @@
rm -rf $(ISO_TARGET)/var/lib/lunar/moonbase
@echo "Packed up moonbase."
-
+test:
+ @echo "running tests"
+ @scripts/test
Added: lunar-iso/trunk/scripts/test
===================================================================
--- lunar-iso/trunk/scripts/test 2005-08-06 16:23:27 UTC (rev 16022)
+++ lunar-iso/trunk/scripts/test 2005-08-06 16:25:11 UTC (rev 16023)
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+if [ -f $ISO_TARGET/.rebuild ]; then
+ # first define the tests:
+ TESTS=(
+ "bash --version"
+ "sh --version"
+ "perl --version"
+ "echo 1234"
+ "date -u +%Y%m%d-%T"
+ "awk -F: {print} /dev/null"
+ "cut /dev/null -d: -f2"
+ "cat /dev/null"
+ "lvu installed"
+ "lsh find_depends XML-Parser | wc -l | grep 4"
+ "lunar set"
+ "cfdisk -v"
+ "fdisk -l"
+ "parted -v"
+ "mkfs.ext3 -V"
+ "mkfs.reiserfs -V"
+ "mkfs.xfs -V"
+ "mkswap -V"
+ "dd --version"
+ "lsmod"
+ "echo \"ABC\" | bzip2 -L -V > /dev/null"
+ "echo \"ABC\" | gzip -L -V > /dev/null"
+ "tar --version"
+ )
+ for TEST in "${TESTS[@]}"; do
+ echo -n "$TEST: "
+ if chroot $ISO_TARGET $TEST &> /dev/null ; then
+ echo "OK"
+ else
+ echo "FAILED"
+ RESULT=1
+ fi
+ done
+ set -x
+ exit ${RESULT:-0}
+else
+ echo "Can't run tests now!"
+ exit 1
+fi
Property changes on: lunar-iso/trunk/scripts/test
___________________________________________________________________
Name: svn:executable
+ *
More information about the Lunar-commits
mailing list