]> rtime.felk.cvut.cz Git - novaboot.git/blob - tests/novaboot.wv
Run every test in its own directory
[novaboot.git] / tests / novaboot.wv
1 #!/bin/bash
2
3 cd $(dirname $0)
4 . wvtest.sh
5 PATH=$(dirname $PWD):$PATH # Find our version of novaboot first
6
7 function create_script ()
8 {
9     (echo "#!/usr/bin/env novaboot"; cat) > script
10     chmod +x script
11 }
12
13 function create_dummy ()
14 {
15     create_script <<EOF
16 kernel
17 file
18 EOF
19     touch kernel
20     touch file
21 }
22
23 WVSTART Pulsar root
24 create_dummy
25 WVPASS ./script --gen-only --pulsar --pulsar-root=ASDF
26 WVPASS grep "root ASDF" config-novaboot
27
28 WVSTART Bender
29 create_dummy
30 WVPASS ./script --gen-only --bender --pulsar
31 WVPASS grep "bender" config-novaboot
32
33 WVSTART Chainloader support
34 create_dummy
35 WVPASS ./script --gen-only --chainloader=chain1 -chainloader=chain2 --pulsar
36 WVPASS grep "exec chain1" config-novaboot
37 WVPASS grep "load chain2" config-novaboot
38
39 WVSTART Configuration files
40 create_dummy
41 echo '1;' > .novaboot
42 WVPASS sh -c "./script --gen-only 2> log"
43 WVPASS grep "novaboot: Read $PWD/.novaboot" log
44
45 exit
46
47 # Broken
48 WVSTART ISO image generation
49 create_dummy
50 WVPASS ./script --iso
51
52 # Hi-lock: (("^.*\\(?:WVSTART\\).*$" (0 (quote hi-black-b) t)))