blob: 4b5260833bf557ffe9c58e7b679fc45af64304b3 [file] [log] [blame]
Neels Hofmeyrc0827c42017-04-23 15:04:19 +02001[[trials]]
2== Trial: Binaries to be Tested
3
Pau Espin Pedrol7e0b2dd2020-03-10 11:46:39 +01004A trial is a set of pre-built sysroot archives to be tested. They are typically built
Neels Hofmeyrc0827c42017-04-23 15:04:19 +02005by jenkins using the build scripts found in osmo-gsm-tester's source in the
Pau Espin Pedrolf5c83da2017-11-02 15:48:10 +01006'contrib/' dir, see <<install_add_jenkins_slave>>.
Neels Hofmeyrc0827c42017-04-23 15:04:19 +02007
Pau Espin Pedrol7e0b2dd2020-03-10 11:46:39 +01008A trial comes in the form of a directory containing a number of '<inst-name>.*tgz' tar
9archives (containing different sysroots) as well as a 'checksums.md5' file to
10verify the tar archives' integrity.
11
12.Example of a "trial" containing binaries built by a jenkins job
13[graphviz]
14----
15digraph G {
16 subgraph cluster_trial {
17 label = "Trial (binaries)"
18 sysmo [label="osmo-bts-sysmo.build-23.tgz\n(osmo-bts-sysmo\n+ deps\ncompiled for sysmoBTS)"]
19 trx [label="osmo-bts.build-5.tgz\n(osmo-bts-octphy + osmo-bts-trx\n+ deps\ncompiled for main unit)"]
20 nitb [label="osmo-nitb.build-42.tgz\n(osmo-nitb\n+ deps\ncompiled for main unit)"]
21 checksums [label="checksums.md5"]
22
23 checksums -> {sysmo trx nitb}
24 }
25}
26----
Neels Hofmeyrc0827c42017-04-23 15:04:19 +020027
28When the osmo-gsm-tester is invoked to run on such a trial directory, it will
29create a sub directory named 'inst' and unpack the tar archives into it.
30
31For each test run on this trial, a new subdirectory in the trial dir is
32created, named in the form of 'run.<timestamp>'. A symbolic link 'last-run'
Neels Hofmeyrb52df172017-05-14 20:09:35 +020033will point at the most recently created run dir. This run dir will accumulate:
34
35* the rendered configuration files used to run the binaries
36* stdout and stderr outputs of the binaries
Pau Espin Pedrol0b512ba2017-11-02 17:16:21 +010037* pcap files for processes doing relevant network communication
Neels Hofmeyrb52df172017-05-14 20:09:35 +020038* a test log
Pau Espin Pedrol0b512ba2017-11-02 17:16:21 +010039* jenkins parsable XML (Junit) reports
40
41The script in 'contrib/jenkins-run.sh' takes care of related tasks such as
42
43* creating the dir structure,
44* generating md5 sums for the various tar.gz containing software builds to be tested,
45* cleaning up after the build,
46* saving extra logs such as journalctl output from ofonod,
Pau Espin Pedrol7e0b2dd2020-03-10 11:46:39 +010047* generating a final .tar.gz file with all the logs and reports to store as jenkins archives.
48
49{app-name} tests create objects to manage the allocated resources during test
50lifetime. These objects, in turn, usually run and manage processes started from
51the trail's sysroot binaries. {app-name} provide APIs for those object classes
52to discover, unpack and run those binaries. An object class simply needs to
53request the name of the sysroot it wants to use (for instance 'osmo-bsc'), and
54{app-name} will take care of preparing everything and providing the sysroot path
55to it. It's a duty of the resource class to copy over the sysroot to the
56destination if the intention is to run the binary remotely on another host.
57
58When seeking a sysroot of a given name '<inst-name>' in the 'inst/' directory,
59{app-name} will look for 'tgz' files starting with the pattern '<inst-name>.'
60(up to the first dot). That means, suffixes are available for {app-name} user to
61identify the content, for instance having an incrementing version counter or a
62commit hash. Hence, these example files are considered valid and will be
63selected by {app-name} for 'osmo-bsc': 'osmo-bsc.tgz', 'osmo-bsc.build-23.tgz',
64'osmo-bsc.5f3e0dd2.tgz', 'osmo-bsc.armv7.build-2.tgz'. If either none or more
65than one valid file is found matching the pattern, an exception will be thrown.