]> rtime.felk.cvut.cz Git - novaboot.git/blobdiff - tests/novaboot.wv
Allow specifying target in NOVABOOT_TARGET environment variable
[novaboot.git] / tests / novaboot.wv
index e76a4c80f0eea8d23a961459bfb2a439df2d7f2e..da97b45debe5f2723baaa21aa07a5d6e843ca222 100755 (executable)
@@ -101,5 +101,19 @@ EOF
 WVPASS sh -c "./script --target=t1 2>&1 |tee output"
 WVPASS grep -q "Error in target definition" output
 
+WVSTART Different ways of specifying target
+cat > .novaboot <<'EOF'
+%targets = ('t1' => '--remote-cmd="echo Target1 > t"',
+            't2' => '--remote-cmd="echo Target2 > t"',
+            't3' => '--remote-cmd="echo Target3 > t"');
+$default_target = 't1';
+EOF
+WVPASSSH 'novaboot /dev/null'
+WVPASS test "$(cat t)" = Target1
+WVPASSSH 'NOVABOOT_TARGET=t2 novaboot /dev/null'
+WVPASS test "$(cat t)" = Target2
+WVPASSSH 'NOVABOOT_TARGET=t2 novaboot --target t3 /dev/null'
+WVPASS test "$(cat t)" = Target3
+
 
 # Hi-lock: (("^.*\\(?:WVSTART\\).*$" (0 (quote hi-black-b) t)))