tl/hl: Fix location of .testconfig

~ is an interactive bash thing.  Use $HOME instead.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
wait: General clean-up

Require host= everywhere; get rid of unused functions

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
core: Add default functionality

Add functionality to define a local variable if undefined, but leave
it if not.

Usage:  default [var] [default] ; $default_post

Also move requireargs up near arg_parse.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
core: Disable status popup

Just comment it out for now; figure out what to do with it later.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
core: Add retry function

Usage retry [invert,timeout,retries] code-to-run

Port many functions to use it.

While we're at it, update wait-for-port to consolidate the status
messages.  (Not worth the hassle of de-tangling this from the retry
port.)

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
defcfg: Default ctype to ssh

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
core: Add -- to allow arg_parse to stop processing parameters

This allows you to have arguments that contain "="; e.g.:

ssh-cmd host=foo -- "hl foo a=b c=d"

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
guestlib: Fix tgt caching

We want to avoid doing the whole recursive lookup thing if we already
have the information we want; but we also want to make sure to go
through the whole thing if it's actually changed.

Store the value of the last lookup; if the value is the same and we
already have the information we want, just return.  Otherwise, go
through the whole process.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
guestlib: Add tgt-ready

Remove xl-host-ready.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
guestlib: Random cleanups

ssh-ready: Fix status message

Remove bogus vm-ssh help

Fix vm-shutdown acpi typo; also use "default" functionality
guestlib: Fix ssh-cmd to use local host var when inferring

When inferring whether to use tgt_addr or host_addr, make a local
host variable so we don't pollute the global namespace

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
xllib: Specify host_addr as default target for vm commands

When running ssh-cmd for VMs, specify host_addr, so that the command
is run in the right place even if tgt_addr has been set.

Also, change default config file location to test_config_dir.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
guestlib: vm-start waits for tgt-ready by default

Add a "wait" parameter (default=true); if it's set, call tgt-ready
after a successful vm-start.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
perflib: Several clean-ups

iterate: Remove line printing a summary of the resultbase

Remove mvarset, which doesn't do what it claims to do.

varset: Make nextbase and tag local

varset: Pass ${var}=${val} as an arg to next function rather than evaluating it

varet: Surround args by quotes to make sure arg boundaries are maintained

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
core,tblib: Add remote command functionality

Add tb-install to set up a tgt to be able to run tb commands

Add remote-call to generically run hl remotely, passing through
appropriate parameters

Add remote versions of make-config and make-image

Add tblib to tl, since it can now be used locally.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
tblib: Import tb-make-tarball script

And add tb-make-tarball function which runs it.

This is still *very* far from ideal...

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Add dev.sh with tl install functionality

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
perflib: Import time-command

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
w_xenbuild: Move xenbuild into separate file, update to new method

New method: Run workload via hl on target, rather than trying to do
everything over ssh-cmd.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
perflib: Update to new function template framework

perf-setup to install the testlib,  workload-setup to set up the workload,
workload-run (with workload=$foo) to run the workload.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>