summaryrefslogtreecommitdiffstats
path: root/cucumber/features/scripts/vm-execute
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2017-10-04 13:16:52 +0200
committerHolger Levsen <holger@layer-acht.org>2017-10-04 13:16:52 +0200
commit4d8dfa12768c22f137c236b6e47352afb869a4c8 (patch)
tree1134341bf7a7db322a1da1e24b0e4d6018129a40 /cucumber/features/scripts/vm-execute
parent213675aa5197309d93331f465297cfd53e0b01f3 (diff)
downloadjenkins.debian.net-4d8dfa12768c22f137c236b6e47352afb869a4c8.tar.xz
drop lvc stuff, now that openqa.debian.net is getting into shape
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'cucumber/features/scripts/vm-execute')
-rwxr-xr-xcucumber/features/scripts/vm-execute55
1 files changed, 0 insertions, 55 deletions
diff --git a/cucumber/features/scripts/vm-execute b/cucumber/features/scripts/vm-execute
deleted file mode 100755
index f3d20f9f..00000000
--- a/cucumber/features/scripts/vm-execute
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'optparse'
-begin
- require "#{`git rev-parse --show-toplevel`.chomp}/cucumber/features/support/helpers/remote_shell.rb"
- require "#{`git rev-parse --show-toplevel`.chomp}/cucumber/features/support/helpers/misc_helpers.rb"
-
-rescue LoadError => e
- raise "This script must be run from within Tails' Git directory."
-end
-$config = Hash.new
-
-def debug_log(*args) ; end
-
-class FakeVM
- def get_remote_shell_port
- # FIXME -- we really ought to be able to ask the vm to dynamically allocate the port, then tell us what it did, rather than this
- LIBVIRT_REMOTE_SHELL_PORT
- end
-end
-
-cmd_opts = {
- :spawn => false,
- :user => "root"
-}
-
-opt_parser = OptionParser.new do |opts|
- opts.banner = "Usage: cucumber/features/scripts/vm-execute [opts] COMMAND"
- opts.separator ""
- opts.separator "Runs commands in the VM guest being tested. This script " \
- "must be run from within Tails' Git directory."
- opts.separator ""
- opts.separator "Options:"
-
- opts.on("-h", "--help", "Show this message") do
- puts opts
- exit
- end
-
- opts.on("-u", "--user USER", "Run command as USER") do |user|
- cmd_opts[:user] = user
- end
-
- opts.on("-s", "--spawn",
- "Run command in non-blocking mode") do |type|
- cmd_opts[:spawn] = true
- end
-end
-opt_parser.parse!(ARGV)
-cmd = ARGV.join(" ")
-c = RemoteShell::ShellCommand.new(FakeVM.new, cmd, cmd_opts)
-puts "Return status: #{c.returncode}"
-puts "STDOUT:\n#{c.stdout}"
-puts "STDERR:\n#{c.stderr}"
-exit c.returncode