]> git.pld-linux.org Git - projects/geninitrd.git/blame - tests/setup-test.sh
supply /proc/partitions dump
[projects/geninitrd.git] / tests / setup-test.sh
CommitLineData
4ef39038
ER
1#!/bin/sh
2
3# this should be overriden by test
4runtest_run() {
5 :
6}
7
8fail=0 ok=0
9fail() {
10 echo "FAIL: $@"
11 fail=$((fail+1))
12 return 1
13}
14ok() {
15 echo "OK: $@"
16 ok=$((ok+1))
17 return 0
18}
19runtest() {
20 local exp=$(mktemp) out=$(mktemp)
21 cat > $exp
22 eval $@
23 runtest_run > $out
24 diff -u $out $exp || fail "$@" && ok "$@\n$(cat $exp)"
25 rm -f $exp $out
26}
27
28# here should be tests
This page took 0.05689 seconds and 4 git commands to generate.