~utah/utah/dev

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
*** NOTE ***
The SETUP steps are now OBSOLETE since we have a utah-client package.


What follows are some instructions for testing out 'utah'.  They are a bit
involved since they are based on the bzr repo and a lot of these steps
will be taken care of once we have 'utah' packaged.

######################################################################
# SETUP
######################################################################

# install required packages
sudo apt-get install bzr python-yaml

# Fetch the branch.  I like to call it 'utah-dev'.
bzr branch lp:~utah/utah/dev/ utah-dev

cd utah-dev

# create some needed directories
sudo mkdir -p /var/lib/utah /usr/share/utah/client

sudo chmod 1777 /var/lib/utah/

sudo cp -r utah/client/examples /usr/share/utah/client

# this is needed to support rebooting
sudo cp client.py /usr/bin/utah
sudo cp -r utah /usr/share/pyshared/
sudo ln -s /usr/share/pyshared/utah /usr/lib/python2.7/dist-packages/utah

######################################################################
# RUNNING
######################################################################

# run UTAH like this
/usr/bin/utah -r /usr/share/utah/client/examples/master.run

# if you want to play around with rebooting testcases you'll want to use
# the -o/--output flag to utah.
/usr/bin/utah -r /usr/share/utah/client/examples/master.run -o
/var/lib/utah/utah.out


######################################################################
# DEVELOPMENT
######################################################################

# needed to run the self tests
sudo apt-get install python-nose python-mock

# run the self tests
cd utah/client
nosetests tests

######################################################################
# USAGE
######################################################################
usage: utah [-h] [--resume] [-s STATE_FILE] [-f {text,yaml}] [-t TESTDIR]
            [-r RUNLIST] [-o OUTPUT] [-a] [-d]

Ubuntu Testing Automation Harness

optional arguments:
  -h, --help            show this help message and exit
  --resume              Continue a previous run. Used after a reboot
  -s STATE_FILE, --state-file STATE_FILE
                        File to use for storing state (default
                        "/var/lib/utah/state.yaml"
  -f {text,yaml}, --format {text,yaml}
                        Output format (default "yaml")
  -t TESTDIR, --testdir TESTDIR
                        Main test directory
  -r RUNLIST, --runlist RUNLIST
                        runlist file name
  -o OUTPUT, --output OUTPUT
                        write output to this file
  -a, --append          append to output
  -d, --debug           Print debugging output