]> rtime.felk.cvut.cz Git - novaboot.git/blob - tests/novaboot.wv
One more fix for ISO image creation
[novaboot.git] / tests / novaboot.wv
1 #!/bin/bash
2
3 cd $(dirname $0)
4 . wvtest.sh
5
6 WVSTART Invoke with no script
7 WVPASS novaboot -t '' < /dev/null
8
9 WVSTART Invoke as script
10 create_dummy
11 WVPASS ./script --gen-only
12
13 WVSTART Invoke as script with absolute path
14 create_dummy
15 WVPASS $PWD/script --gen-only
16
17 WVSTART Pulsar root
18 create_dummy
19 WVPASS ./script --gen-only --pulsar --pulsar-root=ASDF
20 WVPASS grep "root ASDF" config-novaboot
21
22 WVSTART Configuration files
23 create_dummy
24 echo '1;' > .novaboot
25 WVPASS sh -c "./script --gen-only 2> log"
26 WVPASS grep "novaboot: Read $PWD/.novaboot" log
27
28 WVSTART Configuration files in symlinked directories
29 mkdir config
30 echo '1;' > config/.novaboot
31 mkdir script
32 ( cd script; create_dummy )
33 ln -s ../script config
34 WVPASS sh -c "./config/script/script --gen-only 2> log"
35 WVPASS grep "novaboot: Read $PWD/config/.novaboot" log
36
37 WVSTART Builddir configuration variable
38 WVPASS mkdir -p build
39 cat > .novaboot <<'EOF'
40 $builddir="build";
41 1;
42 EOF
43 create_script <<'EOF'
44 load file < echo Hello
45 EOF
46 WVPASS ./script --gen-only
47 WVPASS test -f build/file
48
49 WVSTART Fail with unknown target
50 create_dummy
51 WVFAIL sh -c "./script --gen-only -t non-existing-target"
52
53 WVSTART BUILDDIR variable
54 WVPASS mkdir -p build
55 create_script <<'EOF'
56 BUILDDIR=build
57 load file < echo Hello
58 EOF
59 WVPASS ./script --gen-only
60 WVPASS test -f build/file
61
62 WVSTART Hypervisor configuration variable
63 create_dummy
64 echo '$hypervisor="HYP";' > .novaboot
65 WVPASS ./script --gen-only --pulsar
66 WVPASS grep "exec HYP" config-novaboot
67
68 # Broken
69 WVSTART ISO image generation
70 create_dummy
71 WVPASS ./script --iso --target ''
72
73 # Hi-lock: (("^.*\\(?:WVSTART\\).*$" (0 (quote hi-black-b) t)))