6 WVSTART Invoke with no script
7 WVPASS novaboot -t '' < /dev/null
9 WVSTART Invoke as script
11 WVPASS ./script --gen-only
13 WVSTART Invoke as script with absolute path
15 WVPASS $PWD/script --gen-only
19 WVPASS ./script --gen-only --pulsar --pulsar-root=ASDF
20 WVPASS grep "root ASDF" config-novaboot
22 WVSTART Configuration files
25 WVPASS sh -c "./script --gen-only 2> log"
26 WVPASS grep "novaboot: Read $PWD/.novaboot" log
28 WVSTART Configuration files in symlinked directories
30 echo '1;' > config/.novaboot
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
37 WVSTART Builddir configuration variable
39 cat > .novaboot <<'EOF'
44 load file < echo Hello
46 WVPASS ./script --gen-only
47 WVPASS test -f build/file
49 WVSTART Configuration directory
51 echo '$test_a = 1;' > dir/a
52 echo '$test_c = 2;' > dir/c
53 echo '$test_c = 1;' > dir/b # Overriden by the 'c' file
54 echo '$test_ign=1;' > dir/b.txt # Ignored
55 WVPASS sh -c 'NOVABOOT_CONFIG_DIR=dir novaboot --dump-config > config'
56 WVPASS sh -c 'grep \$test config > test'
57 WVPASS diff -u - test <<'EOF'
62 WVSTART Fail with unknown target
64 WVFAIL sh -c "./script --gen-only -t non-existing-target"
66 WVSTART BUILDDIR variable
70 load file < echo Hello
72 WVPASS ./script --gen-only
73 WVPASS test -f build/file
75 WVSTART Hypervisor configuration variable
77 echo '$hypervisor="HYP";' > .novaboot
78 WVPASS ./script --gen-only --pulsar
79 WVPASS grep "exec HYP" config-novaboot
81 WVSTART ISO image generation
83 WVPASS ./script --iso --gen-only
85 WVSTART Recursive target definition
89 't1' => '--reset-cmd="echo MyResetCmd"',
90 't2' => '--target t1',
93 WVPASS sh -c "./script --target=t2|tee output"
94 WVPASS grep -q ^MyResetCmd output
96 WVSTART Wrong target definition
99 %targets = ('t1' => '--nonsense');
101 WVPASS sh -c "./script --target=t1 2>&1 |tee output"
102 WVPASS grep -q "Error in target definition" output
105 # Hi-lock: (("^.*\\(?:WVSTART\\).*$" (0 (quote hi-black-b) t)))