All of lore.kernel.org
 help / color / mirror / Atom feed
* [Fuego] [PATCH] Docs: Convert tbwiki pages into .rst files
@ 2020-11-25  6:14 Pooja
  2020-12-02 21:45 ` Bird, Tim
  0 siblings, 1 reply; 8+ messages in thread
From: Pooja @ 2020-11-25  6:14 UTC (permalink / raw)
  To: tbird20d, Tim.Bird; +Cc: fuego, Pooja More

From: Pooja More <pooja.sm@pathpartnertech.com>

Following pages are converted:
Coding_style.rst
Fuego_directories.rst
Glossary.rst

Signed-off-by: Pooja More <pooja.sm@pathpartnertech.com>
---
 docs/rst_src/Coding_style.rst      | 111 +++++++++++++++
 docs/rst_src/Fuego_directories.rst | 161 +++++++++++++++++++++
 docs/rst_src/Glossary.rst          | 277 +++++++++++++++++++++++++++++++++++++
 3 files changed, 549 insertions(+)
 create mode 100644 docs/rst_src/Coding_style.rst
 create mode 100644 docs/rst_src/Fuego_directories.rst
 create mode 100644 docs/rst_src/Glossary.rst

diff --git a/docs/rst_src/Coding_style.rst b/docs/rst_src/Coding_style.rst
new file mode 100644
index 0000000..a190b13
--- /dev/null
+++ b/docs/rst_src/Coding_style.rst
@@ -0,0 +1,111 @@
+###############
+Coding Style
+###############
+
+This page described the coding style conventions used in Fuego.
+
+Please adhere to these conventions, so that the code has a more
+uniform style and it is easier to maintain.  Not all code in Fuego
+adheres to these styles. As we work on code, we will convert it to the
+preferred style over time. New code should adhere to the preferred
+style.
+
+Fuego code consists mostly of shell script and python code.
+
+===============================
+Indentation and line length
+===============================
+
+We prefer indentation to be 4 spaces, with no tabs.
+
+It is preferred to keep lines within 80 columns.  However, this is not
+strict.  If a string constant causes a line to run over 80 columns,
+that is OK.
+
+Some command sequences passed to the 'report' function may be quite
+long and require that they be expressed on a single line.  In that
+case, you can break them up onto multiple lines using shell
+continuation lines.
+
+=======================
+Trailing whitespace
+=======================
+
+Lines should not end in trailing whitespace.  That is: 'grep " $" *'
+should always be empty.
+
+You can do this with: 'grep -R " $" *' in the directory you're working
+in, and fix the lines manually.
+
+Or, another method, if you're using vim, is to add an autocmd to your
+.vimrc to automatically remove whitespace from lines that you edit.
+
+This line in your ~/.vimrc:
+
+::
+
+  autocmd FileType sh,c,python autocmd BufWritePre <buffer> %s/\s\+$//e
+
+
+automatically removes whitespace from all line endings in shell, C,
+and python files that are saved from vim.
+
+Or, a third method of dealing with this automatically is to have git
+check for whitespace errors using a configuration option, or a hook.
+See
+
+`<https://stackoverflow.com/questions/591923/make-git-automatically-remove-trailing-whitespace-before-committing#592014>`_
+
+
+Also, script files should not end in blank lines.
+
+=================
+Shell features
+=================
+
+Shell scripts which run on the device-under-test (DUT or board),
+SHOULD restrict themselves to POSIX shell features only.  Do not
+assume you have any shell features on the target board outside of
+those supported by 'busybox ash'.
+
+Try running 'checkbashisms' on your target-side code, to check for any
+non-POSIX constructs in the code.
+
+The code in ``fuego_test.sh`` is guaranteed to run in bash, and may
+contain bashisms, if needed.  If equivalent functionality is available
+using POSIX features, please use those instead. Please avoid esoteric
+or little-known bash features. (Or, if you use such features, please
+comment them.)
+
+Another useful tool for checking your shell code is 'ShellCheck'.  See
+`<https://github.com/koalaman/shellcheck>`_.  Note that most
+distributions have a package for shellcheck.
+
+There are a few conventions for avoiding using too many external
+commands in shell scripts that execute on the DUT. To check for a
+process, use 'ps' and 'grep', but to avoid having grep find itself,
+use a wildcard in the search pattern.  Like so: 'ps | grep [f]oo'
+(rather than 'ps | grep foo | grep -v grep').
+
+
+================
+Python style
+================
+
+Python code (such as parser code, the overlay generator, ftc and other
+helper scripts), should be compliant with
+`<https://www.python.org/dev/peps/pep-0008/>`_.  As with shell code,
+there is a lot of legacy code in Fuego
+that is not currently compliant with PEP 8.  We will convert legacy
+code to the correct style as changes are made over time.
+
+Here are a few more conventions for Fuego code:
+
+ - Strings consisting of a single character should be declared use single-quotes
+ - Strings consisting of multiple characters should declared using double-quotes,
+   unless the string contains a double-quote.  In that case, single-quotes should
+   be using for quoting, to avoid having to escape the double-quote.
+
+Note that there is a fuego lint test (selftest), called
+Functional.fuego_lint.  It only checks a few files at the moment, but
+the plan is to expand it to check additional code in the future.
diff --git a/docs/rst_src/Fuego_directories.rst b/docs/rst_src/Fuego_directories.rst
new file mode 100644
index 0000000..5fcfe03
--- /dev/null
+++ b/docs/rst_src/Fuego_directories.rst
@@ -0,0 +1,161 @@
+#######################
+Fuego directories
+#######################
+
+This page describes the fuego directory structure,
+and what the items in each area are used for.
+
+
+========================
+Inside the container
+========================
+
+ * ``/fuego-core`` - the fuego core directory, containing tests,
+   scripts and the overlay generator for executing Fuego tests
+
+
+   * ``fuego`` - directory for fuego back-end system
+
+     * This is populated from the ``fuego-core`` repository when the container
+       is created, and provides landing places for other symlinks in the system
+     * ``engine`` - symlink for backwards compatibility with older versions
+       of Fuego tests
+     * ``overlays``
+
+       * ``base`` - contains the base fuego functions and variables
+       * ``distribs`` - contains files for defining different targert
+         distribution attributes
+       * ``testplans`` - contains testplan files (in json format)
+       * ``test_specs`` - contains test spec files (in json format)
+
+         * Note that each spec is in a named file (eg. ``Functional.bc.spec``)
+           in this directory
+
+     * ``scripts`` - core scripts which implement the Fuego test framework
+     * ``tests`` - actual test materials themselves, including the
+       base script for each test
+
+       * ``Benchmark.foo`` - has the tarfile, patches, base script, parser.py
+         and reference.log for a particular benchmark test
+       * ``Functional.bar`` - has the tarfile, patches, base script, results
+         comparison logs (*_p.log and *_n.log) for a particular functional test
+
+ * ``/fuego-ro`` - has runtime data used by Fuego, but not writable by fuego
+
+   * Note that this is bind-mounted from inside the container to the host system
+   * ``boards`` - place for board configuration files
+   * ``conf`` - place where Fuego configuration is stored
+   * ``toolchains`` - place where toolchains may be installed
+
+ * ``/fuego-rw`` - has runtime data used by the Fuego system in the
+   container, and actually stored on the host (for persistence)
+
+   * Note that this is bind-mounted from inside the container to the host system
+
+   * ``buildzone`` - place where test programs are built
+
+     * ``Functional.foo-platform-name`` - directory for build materials
+       for that test and platform combination
+
+   * ``logs`` - place where test run logs are stored
+
+     * ``Functional.<test_name>`` - log files for a particular test test
+
+       * ``<board>.<spec>.<build_id>.<build_number>`` - the 'run' directory
+         for a test execution
+
+         * ``devlog.txt`` - the developer log for a test - list of operations
+           executed during the test
+         * ``syslogs.<time>.txt`` - system logs for test runs (from the target)
+           (before the test and after the test)
+         * ``testlog.txt`` - test logs for test runs (from the actual test programs)
+         * ``consolelog.txt`` - link to Jenkins console log, or local file,
+           if test was executed using ftc
+
+     * ``Benchmark.<test_name>`` - logs files for a benchmark test
+
+       * plot.data
+       * plot.png
+       * ``<board>.<spec>.<build_id>.<build_number>`` -
+         the 'run' directory for a test execution
+
+         * all of the above, plus:
+         * ``Benchmark.<test_name>.info.json``
+         * ``Benchmark.<test_name>.<metric>.json``
+
+   * ``boards`` - place where board-specific test data is stored
+
+
+
+ * ``/var/lib/jenkins`` - where Jenkins system configuration and data files live
+
+   * ``jobs`` - holds the Jenkins test definition files (``config.xml`` for each test) as well
+     as test output for each test run
+
+            * ``<jobname>``
+
+              * ``builds`` - data about all test runs for this test
+
+                * ``<build_number>`` - jenkins data and console log for a
+                  particular test run (``build.xml`` and log)
+
+   * ``plugins`` - place where Jenkins stores plugin code and data
+
+     * This is populated from the fuego source repository ``frontend-install/plugins``
+       when the container is created
+
+   * ``userContent`` - material that is served by Jenkins for the user interface
+
+     * ``docs`` - has the Fuego PDF documents
+     * ``fuego.logs`` - link to ``/fuego-rw/logs`` - so that logs are accessible
+       from Jenkins user interface
+
+   * ``updates`` - used for Jenkins update operations
+   * ``logs`` - has Jenkins process logs
+
+     * ``slaves`` - has Jenkins control logs for each target board
+
+       * ``<target>`` - has the slave logs for the indicated target
+
+
+=====================================
+In the 'fuego' source repository
+=====================================
+
+ * ``docs`` - contains documentation for the Fuego system
+ * ``frontend-install`` - has material for configuring the Jenkins
+   installation for Fuego
+
+    * ``plugins`` - has plugins installed to Jenkins in the docker container
+
+      * ``flot-plotter-plugin`` source for the flot plotting plugin
+
+ * ``fuego-host-scripts`` - contains scripts for creating and launching
+   the fuego container
+ * ``fuego-scripts`` - contains miscellaneous scripts used at
+   container build time and runtime
+ * ``fuego-ro`` - has runtime data used by the Fuego system in the container
+ * ``fuego-rw`` - has runtime data used by the Fuego system in the container
+
+
+========================================
+In the 'fuego-core' source repository
+========================================
+
+ * ``engine`` - symlink for backwards compatibility with tests from
+   older Fuego versions
+ * ``overlays`` - has the fuego script system and data
+
+   * ``base`` - contains the base fuego functions and variables
+   * ``distribs`` - contains files for defining different targert
+     distribution attributes
+   * ``testplans`` - contains testplan files (in json format)
+
+ * ``scripts`` - core scripts which implement the Fuego test framework
+ * ``tests`` - has the actual test materials themselves, including the
+   base script for each test
+
+   * ``Benchmark.foo`` - has the tarfile, patches, base script, ``parser.py``
+     and ``reference.log`` for a particular benchmark test
+   * ``Functional.bar`` - has the tarfile, patches, base script, results
+     comparison logs (*_p.log and *_n.log) for a particular functional test
diff --git a/docs/rst_src/Glossary.rst b/docs/rst_src/Glossary.rst
new file mode 100644
index 0000000..61bb3d7
--- /dev/null
+++ b/docs/rst_src/Glossary.rst
@@ -0,0 +1,277 @@
+##############
+Glossary
+##############
+
+Here is a glossary of terms used in this wiki:
+
+Here is a short table that relates a few Jenkins terms to Fuego terms:
+
+show_sort_link=0
+
+show_edit_links=0
+
+Table:
+
++--------------+------------------+------------------------------------------------------------------------------------------------+
+| Jenkins term |Fuego term        |Description                                                                                     |
++==============+==================+================================================================================================+
+|slave         |''none''          |this is a long-running jenkins process, that executes jobs.  It is usually (?) assigned to a    |
+|              |                  |particular node                                                                                 |
++--------------+------------------+------------------------------------------------------------------------------------------------+
+|node          |board             |item being tested (Fuego defines a Jenkins node for each board in the system)                   |
++--------------+------------------+------------------------------------------------------------------------------------------------+
+|job           |test              |a collection of information needed to perform a single test                                     |
++--------------+------------------+------------------------------------------------------------------------------------------------+
+|''none''      |request           |a request to run a particular test on a board                                                   |
++--------------+------------------+------------------------------------------------------------------------------------------------+
+|build         |run(or 'test run')|the results from executing the job or test                                                      |
++--------------+------------------+------------------------------------------------------------------------------------------------+
+|''none''      |plan              |the plan has the list of tests and how to run them (which variation, or 'spec' to use)          |
++--------------+------------------+------------------------------------------------------------------------------------------------+
+|''none''      |spec              |the spec indicates a particular variation of a test                                             |
++--------------+------------------+------------------------------------------------------------------------------------------------+
+
+=====
+B
+=====
+
+``base test script``
+
+  This is a small script associated with a particular test.  It
+  provides a set of test functions that are executed on the host (in the
+  container) when a test is run.
+
+``benchmark``
+
+  A type of test where one or more numeric metrics indicates the status
+  of the test.  See :ref:`Benchmark parser notes`
+  for more information about processing these metrics.
+
+``binary package``
+
+  A tarfile containing the materials that would normally be deployed to
+  the board for execution.
+
+``board file``
+
+  A file that describes (using environment variables) the attributes of
+  a target board.  This has the extension .board and is kept in the
+  directory ``/fuego-ro/boards``.
+
+
+====
+C
+====
+
+``console log``
+
+  The full output of execution of a test from Jenkins.
+  See :ref:`Log files` for details.
+
+=====
+D
+=====
+
+
+``devlog``
+
+  The developer log for a test.
+  See :ref:`Log files` for details.
+
+``Device``
+
+  The name of a target board in the Fuego system.
+
+``device under test``
+
+  In test terminology, this refers to the item being tested.
+  In Fuego, this may also be called the ''Device'', ''target'', or ''node''.
+
+``distribution``
+
+  This refers to a set of software that is running on a Linux machine.
+  Example "distributions" are Debian, Angstrom or Android. The
+  distribution defines file locations, libraries, utilities and several
+  important facilities and services of the machine (such as the init
+  process, and the logger).
+
+=====
+F
+=====
+
+``functional test``
+
+  A type of test that returns a single pass/fail result, indicating
+  whether the device under test.  It may include lots of sub-tests.
+
+====
+J
+====
+
+``Jenkins``
+
+  An advanced continuous integration system, used as the default
+  front-end for the Fuego test framework. see :ref:`Jenkins`
+
+``log file``
+
+  Several log files are created during execution of a test.  For details
+  about all the different log files, see :ref:`Log files`.
+
+``job``
+
+  In Jenkins terminology, a job is a test
+
+====
+M
+====
+
+``metric``
+
+  A numeric value measured by a benchmark test as the result
+  of the test.  This is compared against a threshold value to determine
+  if the test passed or failed.  See :ref:`Benchmark
+  parser notes`
+
+=====
+O
+=====
+
+``ovgen.py``
+
+  Program to collect "overlay" data from various scripts and data
+  files, and produce the final test script to run.
+  see :ref:`Overlay Generation`.
+
+=====
+P
+=====
+
+``parsed log``
+
+  The test log file after it has been filtered by log_compare.
+  See :ref:`Log files` for details.
+
+``parser.py``
+
+  A python program, included with each Benchmark test, to scan the test
+  log for benchmark metrics, check each against a reference threshold,
+  and produce a plot.png file for the test.  See :ref:`parser.py` and
+  :ref:`Benchmark parser notes` for more information.
+
+``provision``
+
+  To provision a board is to install the system software on it.  Some
+  board control systems re-provision a board for every test.  In
+  general, Fuego runs a series of tests with a single system software
+  installation.
+
+=====
+R
+=====
+
+``reference log``
+
+  This file (called "reference.log") defines the regression threshhold
+  (and operation) for each metric of a benchmark test.  See
+  :ref:`reference.log` and :ref:`Benchmark parser notes`
+
+====
+S
+====
+
+``spec variable``
+
+  A test variable that comes from a spec file. See
+  :ref:`Test variables`
+
+``stored variable``
+
+  A test variable that is stored in a read/write file, and can be
+  updated manually or programmatically.  See
+  :ref:`Test variables`
+
+``syslog``
+
+  The system log for a test.  This is the system log collected during
+  execution of a test.  See :ref:`Log files` for details.
+
+
+====
+T
+====
+
+``test``
+
+  This is a collection of scripts, jenkins configuration, source code,
+  and data files used to validate some aspect of the device under test.
+  See :ref:`Fuego Object Details` for more information.
+
+``test log``
+
+  This is the log output from the actual test program on the target.
+  There are multiple logs created during the execution of a test, and
+  some might casually also be called "test logs".  However, in this
+  documentation, the term "test log" should be used only to refer to the
+  test program output.  See :ref:`Log files` for details.
+
+``test package``
+
+  This is a packaged version of a test, including all the materials
+  needed to execute the test on another host.  See :ref:`Test
+  package system`
+
+``test phases``
+
+  Different phases of test execution defined by Fuego: pre_test, build,
+  deploy, test_run, get_testlog, test_processing, post_test.  For a
+  description of phases see: :ref:`fuego test phases`
+
+``test program``
+
+  A program that runs on the target to execute a test and output the
+  results.  This can be a compiled program or a shell script (in which
+  case the build step is empty)
+
+``test run``
+
+  This is a single instance of a test execution, containing logs and
+  other information about the run.  This is referred to in Jenkins as a
+  'build'.
+
+``test script``
+
+  The shell script that interfaces between the fuego core system and a
+  test program.  The script declares a tarfile, and functions to build,
+  deploy and run the test.  The test script runs on the host.  This is
+  also called the 'base test script'.  For details about the environment
+  that a script runs in or the functions it may call, see :ref:`Variables`,
+  :ref:`Core interfaces`, and :ref:`Test Script APIs`.
+
+``test variable``
+
+  This is the name of a variable available to the a test during it's
+  execution.  See :ref:`Test variables`.
+
+``test variable script``
+
+  the shell script that interfaces between the fuego core system and a
+  test program. The script declares a tarfile, and functions to build,
+  deploy and run the test. The test script runs on the host. This is
+  also called the 'base test script'. For details about the environment
+  that a script runs in or the functions it may call, see :ref:`Variables`,
+  :ref:`Core interfaces`, and :ref:`Test Script APIs`.
+
+
+``TOOLCHAIN``
+
+  Defines the toolchain or SDK for the device.  This is used to select a
+  set of environment variables to define and configure the toolchain for
+  building programs for the intended test target.
+
+``tools.sh``
+
+  File containing the definition of toolchain variables for the
+  different platforms installed in the container (and supported by the
+  test environment)  See :ref:`tools.sh` for details.
+
-- 
2.7.4


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Fuego] [PATCH] Docs: Convert tbwiki pages into .rst files
  2020-11-25  6:14 [Fuego] [PATCH] Docs: Convert tbwiki pages into .rst files Pooja
@ 2020-12-02 21:45 ` Bird, Tim
  2020-12-03 18:21   ` Pooja Sanjay More
  0 siblings, 1 reply; 8+ messages in thread
From: Bird, Tim @ 2020-12-02 21:45 UTC (permalink / raw)
  To: Pooja, tbird20d; +Cc: fuego

I committed this patch, and updated a lot of content in the
Fuego_directories and Glossary files.

I mention one outstanding issue is below...

> -----Original Message-----
> From: Pooja <pooja.sm@pathpartnertech.com>
> 
> From: Pooja More <pooja.sm@pathpartnertech.com>
> 
> Following pages are converted:
> Coding_style.rst
> Fuego_directories.rst
> Glossary.rst
> 
> Signed-off-by: Pooja More <pooja.sm@pathpartnertech.com>
> ---
>  docs/rst_src/Coding_style.rst      | 111 +++++++++++++++
>  docs/rst_src/Fuego_directories.rst | 161 +++++++++++++++++++++
>  docs/rst_src/Glossary.rst          | 277 +++++++++++++++++++++++++++++++++++++
>  3 files changed, 549 insertions(+)
>  create mode 100644 docs/rst_src/Coding_style.rst
>  create mode 100644 docs/rst_src/Fuego_directories.rst
>  create mode 100644 docs/rst_src/Glossary.rst
> 
> diff --git a/docs/rst_src/Coding_style.rst b/docs/rst_src/Coding_style.rst
...

> diff --git a/docs/rst_src/Glossary.rst b/docs/rst_src/Glossary.rst
> new file mode 100644
> index 0000000..61bb3d7
> --- /dev/null
> +++ b/docs/rst_src/Glossary.rst
> @@ -0,0 +1,277 @@
> +##############
> +Glossary
> +##############
> +
> +Here is a glossary of terms used in this wiki:
> +
> +Here is a short table that relates a few Jenkins terms to Fuego terms:
> +
> +show_sort_link=0
> +
> +show_edit_links=0
> +
> +Table:
> +
> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> +| Jenkins term |Fuego term        |Description                                                                                     |
> ++==============+==================+==================================================================================
> ==============+
> +|slave         |''none''          |this is a long-running jenkins process, that executes jobs.  It is usually (?) assigned to a    |
> +|              |                  |particular node                                                                                 |
> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> +|node          |board             |item being tested (Fuego defines a Jenkins node for each board in the system)                   |
> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> +|job           |test              |a collection of information needed to perform a single test                                     |
> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> +|''none''      |request           |a request to run a particular test on a board                                                   |
> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> +|build         |run(or 'test run')|the results from executing the job or test                                                      |
> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> +|''none''      |plan              |the plan has the list of tests and how to run them (which variation, or 'spec' to use)          |
> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> +|''none''      |spec              |the spec indicates a particular variation of a test                                             |
> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> +

I shortened the lines on this table so that the source is only 80-columns wide.

When rendered by sphinx for html output ('make html'), the resulting html
file has a table that is not fit to the page.  It has a horizontal scroll bar, instead
of expanding the table cells vertically and wrapping the text.

Can you see if there's a setting that would allow this table to appear without
needing a scroll bar?

Thanks,
 -- Tim


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Fuego] [PATCH] Docs: Convert tbwiki pages into .rst files
  2020-12-02 21:45 ` Bird, Tim
@ 2020-12-03 18:21   ` Pooja Sanjay More
  2020-12-03 20:25     ` Bird, Tim
  0 siblings, 1 reply; 8+ messages in thread
From: Pooja Sanjay More @ 2020-12-03 18:21 UTC (permalink / raw)
  To: Bird, Tim; +Cc: tbird20d, fuego

[-- Attachment #1: Type: text/plain, Size: 5560 bytes --]

Hi,

To avoid scroll bar at bottom of the table:

I made following changes to:

*_static/custom.css:*

.wy-table-responsive table td {
white-space: normal;
}

Declared it in conf.py as:

    def setup(app):
        app.add_stylesheet('custom.css')

But it did not work. I will update you regarding the same if I find a
solution for it.

Thanks and regards

Pooja More



On Thu, Dec 3, 2020 at 3:15 AM Bird, Tim <Tim.Bird@sony.com> wrote:

> I committed this patch, and updated a lot of content in the
> Fuego_directories and Glossary files.
>
> I mention one outstanding issue is below...
>
> > -----Original Message-----
> > From: Pooja <pooja.sm@pathpartnertech.com>
> >
> > From: Pooja More <pooja.sm@pathpartnertech.com>
> >
> > Following pages are converted:
> > Coding_style.rst
> > Fuego_directories.rst
> > Glossary.rst
> >
> > Signed-off-by: Pooja More <pooja.sm@pathpartnertech.com>
> > ---
> >  docs/rst_src/Coding_style.rst      | 111 +++++++++++++++
> >  docs/rst_src/Fuego_directories.rst | 161 +++++++++++++++++++++
> >  docs/rst_src/Glossary.rst          | 277
> +++++++++++++++++++++++++++++++++++++
> >  3 files changed, 549 insertions(+)
> >  create mode 100644 docs/rst_src/Coding_style.rst
> >  create mode 100644 docs/rst_src/Fuego_directories.rst
> >  create mode 100644 docs/rst_src/Glossary.rst
> >
> > diff --git a/docs/rst_src/Coding_style.rst
> b/docs/rst_src/Coding_style.rst
> ...
>
> > diff --git a/docs/rst_src/Glossary.rst b/docs/rst_src/Glossary.rst
> > new file mode 100644
> > index 0000000..61bb3d7
> > --- /dev/null
> > +++ b/docs/rst_src/Glossary.rst
> > @@ -0,0 +1,277 @@
> > +##############
> > +Glossary
> > +##############
> > +
> > +Here is a glossary of terms used in this wiki:
> > +
> > +Here is a short table that relates a few Jenkins terms to Fuego terms:
> > +
> > +show_sort_link=0
> > +
> > +show_edit_links=0
> > +
> > +Table:
> > +
> >
> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> > +| Jenkins term |Fuego term        |Description
>                                                            |
> >
> ++==============+==================+==================================================================================
> > ==============+
> > +|slave         |''none''          |this is a long-running jenkins
> process, that executes jobs.  It is usually (?) assigned to a    |
> > +|              |                  |particular node
>                                                            |
> >
> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> > +|node          |board             |item being tested (Fuego defines a
> Jenkins node for each board in the system)                   |
> >
> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> > +|job           |test              |a collection of information needed
> to perform a single test                                     |
> >
> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> > +|''none''      |request           |a request to run a particular test
> on a board                                                   |
> >
> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> > +|build         |run(or 'test run')|the results from executing the job
> or test                                                      |
> >
> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> > +|''none''      |plan              |the plan has the list of tests and
> how to run them (which variation, or 'spec' to use)          |
> >
> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> > +|''none''      |spec              |the spec indicates a particular
> variation of a test                                             |
> >
> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> > +
>
> I shortened the lines on this table so that the source is only 80-columns
> wide.
>
> When rendered by sphinx for html output ('make html'), the resulting html
> file has a table that is not fit to the page.  It has a horizontal scroll
> bar, instead
> of expanding the table cells vertically and wrapping the text.
>
> Can you see if there's a setting that would allow this table to appear
> without
> needing a scroll bar?
>
> Thanks,
>  -- Tim
>
>

-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.

[-- Attachment #2: Type: text/html, Size: 10892 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Fuego] [PATCH] Docs: Convert tbwiki pages into .rst files
  2020-12-03 18:21   ` Pooja Sanjay More
@ 2020-12-03 20:25     ` Bird, Tim
  0 siblings, 0 replies; 8+ messages in thread
From: Bird, Tim @ 2020-12-03 20:25 UTC (permalink / raw)
  To: Pooja Sanjay More; +Cc: tbird20d, fuego

Thanks for looking into this.
 -- Tim


> -----Original Message-----
> From: Pooja Sanjay More <pooja.sm@pathpartnertech.com>
> 
> Hi,
> 
> To avoid scroll bar at bottom of the table:
> 
> I made following changes to:
> 
> _static/custom.css:
> .wy-table-responsive table td {
> white-space: normal;
> }
> Declared it in conf.py as:
>     def setup(app):
>         app.add_stylesheet('custom.css')
> But it did not work. I will update you regarding the same if I find a solution for it.
> Thanks and regards
> Pooja More
> 
> 
> 
> On Thu, Dec 3, 2020 at 3:15 AM Bird, Tim <Tim.Bird@sony.com <mailto:Tim.Bird@sony.com> > wrote:
> 
> 
> 	I committed this patch, and updated a lot of content in the
> 	Fuego_directories and Glossary files.
> 
> 	I mention one outstanding issue is below...
> 
> 	> -----Original Message-----
> 	> From: Pooja <pooja.sm@pathpartnertech.com <mailto:pooja.sm@pathpartnertech.com> >
> 	>
> 	> From: Pooja More <pooja.sm@pathpartnertech.com <mailto:pooja.sm@pathpartnertech.com> >
> 	>
> 	> Following pages are converted:
> 	> Coding_style.rst
> 	> Fuego_directories.rst
> 	> Glossary.rst
> 	>
> 	> Signed-off-by: Pooja More <pooja.sm@pathpartnertech.com <mailto:pooja.sm@pathpartnertech.com> >
> 	> ---
> 	>  docs/rst_src/Coding_style.rst      | 111 +++++++++++++++
> 	>  docs/rst_src/Fuego_directories.rst | 161 +++++++++++++++++++++
> 	>  docs/rst_src/Glossary.rst          | 277 +++++++++++++++++++++++++++++++++++++
> 	>  3 files changed, 549 insertions(+)
> 	>  create mode 100644 docs/rst_src/Coding_style.rst
> 	>  create mode 100644 docs/rst_src/Fuego_directories.rst
> 	>  create mode 100644 docs/rst_src/Glossary.rst
> 	>
> 	> diff --git a/docs/rst_src/Coding_style.rst b/docs/rst_src/Coding_style.rst
> 	...
> 
> 	> diff --git a/docs/rst_src/Glossary.rst b/docs/rst_src/Glossary.rst
> 	> new file mode 100644
> 	> index 0000000..61bb3d7
> 	> --- /dev/null
> 	> +++ b/docs/rst_src/Glossary.rst
> 	> @@ -0,0 +1,277 @@
> 	> +##############
> 	> +Glossary
> 	> +##############
> 	> +
> 	> +Here is a glossary of terms used in this wiki:
> 	> +
> 	> +Here is a short table that relates a few Jenkins terms to Fuego terms:
> 	> +
> 	> +show_sort_link=0
> 	> +
> 	> +show_edit_links=0
> 	> +
> 	> +Table:
> 	> +
> 	> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> 	> +| Jenkins term |Fuego term        |Description                                                                                     |
> 	>
> ++==============+==================+==================================================================================
> 	> ==============+
> 	> +|slave         |''none''          |this is a long-running jenkins process, that executes jobs.  It is usually (?) assigned to a    |
> 	> +|              |                  |particular node                                                                                 |
> 	> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> 	> +|node          |board             |item being tested (Fuego defines a Jenkins node for each board in the system)                   |
> 	> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> 	> +|job           |test              |a collection of information needed to perform a single test                                     |
> 	> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> 	> +|''none''      |request           |a request to run a particular test on a board                                                   |
> 	> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> 	> +|build         |run(or 'test run')|the results from executing the job or test                                                      |
> 	> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> 	> +|''none''      |plan              |the plan has the list of tests and how to run them (which variation, or 'spec' to use)          |
> 	> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> 	> +|''none''      |spec              |the spec indicates a particular variation of a test                                             |
> 	> ++--------------+------------------+------------------------------------------------------------------------------------------------+
> 	> +
> 
> 	I shortened the lines on this table so that the source is only 80-columns wide.
> 
> 	When rendered by sphinx for html output ('make html'), the resulting html
> 	file has a table that is not fit to the page.  It has a horizontal scroll bar, instead
> 	of expanding the table cells vertically and wrapping the text.
> 
> 	Can you see if there's a setting that would allow this table to appear without
> 	needing a scroll bar?
> 
> 	Thanks,
> 	 -- Tim
> 
> 
> 
> 
> This message contains confidential information and is intended only for the individual(s) named. If you are not the intended recipient, you
> are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this mail and attached file/s is strictly
> prohibited. Please notify the sender immediately and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be
> secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The
> sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail
> transmission.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Fuego] [PATCH] Docs: Convert tbwiki pages into .rst files
  2020-12-03  5:18 Pooja
@ 2020-12-07 21:17 ` Bird, Tim
  0 siblings, 0 replies; 8+ messages in thread
From: Bird, Tim @ 2020-12-07 21:17 UTC (permalink / raw)
  To: Pooja, tbird20d; +Cc: fuego

I committed this patch, and did some fixups on top.

These looked OK, and I have pushed the changes to the master branch.
 -- Tim

> -----Original Message-----
> From: Pooja <pooja.sm@pathpartnertech.com>
> 
> From: Pooja More <pooja.sm@pathpartnertech.com>
> 
> Following are the converted files:
> Benchmark.GLMark.rst
> Benchmark.bonnie.rst
> Benchmark.template.rst
> Functional.LTP.rst
> 
> Signed-off-by: Pooja More <pooja.sm@pathpartnertech.com>
> ---
>  docs/rst_src/Benchmark.GLMark.rst   |  69 +++++++++++++
>  docs/rst_src/Benchmark.bonnie.rst   |  89 +++++++++++++++++
>  docs/rst_src/Benchmark.template.rst |  38 +++++++
>  docs/rst_src/Functional.LTP.rst     | 191 ++++++++++++++++++++++++++++++++++++

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Fuego] [PATCH] Docs: Convert tbwiki pages into .rst files
@ 2020-12-03  5:18 Pooja
  2020-12-07 21:17 ` Bird, Tim
  0 siblings, 1 reply; 8+ messages in thread
From: Pooja @ 2020-12-03  5:18 UTC (permalink / raw)
  To: tbird20d, Tim.Bird; +Cc: fuego, Pooja More

From: Pooja More <pooja.sm@pathpartnertech.com>

Following are the converted files:
Benchmark.GLMark.rst
Benchmark.bonnie.rst
Benchmark.template.rst
Functional.LTP.rst

Signed-off-by: Pooja More <pooja.sm@pathpartnertech.com>
---
 docs/rst_src/Benchmark.GLMark.rst   |  69 +++++++++++++
 docs/rst_src/Benchmark.bonnie.rst   |  89 +++++++++++++++++
 docs/rst_src/Benchmark.template.rst |  38 +++++++
 docs/rst_src/Functional.LTP.rst     | 191 ++++++++++++++++++++++++++++++++++++
 4 files changed, 387 insertions(+)
 create mode 100644 docs/rst_src/Benchmark.GLMark.rst
 create mode 100644 docs/rst_src/Benchmark.bonnie.rst
 create mode 100644 docs/rst_src/Benchmark.template.rst
 create mode 100644 docs/rst_src/Functional.LTP.rst

diff --git a/docs/rst_src/Benchmark.GLMark.rst b/docs/rst_src/Benchmark.GLMark.rst
new file mode 100644
index 0000000..ac1aee5
--- /dev/null
+++ b/docs/rst_src/Benchmark.GLMark.rst
@@ -0,0 +1,69 @@
+###################
+Benchmark.GLMark
+###################
+
+===============
+Description
+===============
+
+GLMark is a test to determine the performance of OpenGL on your
+system.  The program runs a series of tests rendering 2D and 3D
+graphics and animations, and provides a benchmark result indicating
+the number of frames per second for each operation.  The it averages
+the different results to generate a score for the GPU.
+
+=============
+Resources
+=============
+
+
+ * `Benchmark graphics card (GPU) performance on Linux with glmark <http://www.binarytides.com/glmark-linux-gpu-performance/>`_,
+   by Silver Moon, Binary Tides, April 2014
+
+ * Newer version: glmark2 - see
+   `<https://github.com/glmark2/glmark2>`_
+ * `Simple DirectMedia Layer wikipedia entry <https://en.wikipedia.org/wiki/Simple_DirectMedia_Layer>`_
+
+===========
+Results
+===========
+
+========
+Tags
+========
+
+ * Graphics
+
+================
+Dependencies
+================
+
+
+ * It requires the following development libraries:
+
+   * sdl: libsdl1.2-dev
+   * gl: libgl1-mesa-dev
+   * glu: libglu1-mesa-dev
+   * glew: libglew1.5-dev
+
+==========
+Status
+==========
+
+
+ * CAN'T BUILD
+
+=========
+Notes
+=========
+
+Compiling for minnowboard inside Docker container, I get lots of
+errors saying that structure members are private.  Possibly this is
+due to more stringent error checking by gcc, or some cflag that is
+missing.
+
+All errors are reported from vector.h, included in various cpp files.
+
+On other platforms, the required libraries (SDL) are often not
+available at build or run time.
+
diff --git a/docs/rst_src/Benchmark.bonnie.rst b/docs/rst_src/Benchmark.bonnie.rst
new file mode 100644
index 0000000..2f79a0a
--- /dev/null
+++ b/docs/rst_src/Benchmark.bonnie.rst
@@ -0,0 +1,89 @@
+###################
+Benchmark.bonnie
+###################
+
+===============
+Description
+===============
+
+Bonnie++ is a filesystem benchmark that measures basic speed of
+several operations, including data read and write speed, the number of
+seeks per second, and the number of file metadata operations per
+second.
+
+=============
+Resources
+=============
+
+ * `Using Bonnie++ for filesystem performance benchmarking <https://www.linux.com/news/using-bonnie-filesystem-performance-benchmarking>`_,
+   by Ben Martin, Linux.com, July 2008 (accessed Oct. 2017)
+
+ * `Bonnie++ wikipedia entry <https://en.wikipedia.org/wiki/Bonnie%2B%2B>`_
+ * `Bonnie++ home page <https://www.coker.com.au/bonnie++/>`_
+
+===========
+Results
+===========
+
+=========
+Tags
+=========
+
+ * filesystem
+
+===============
+Dependencies
+===============
+
+Bonnie has no build dependencies.
+
+There is a separate command line option for running it as the 'root'
+user.
+
+Bonnie uses the following test variables at runtime:
+
+ * ``BENCHMARK_BONNIE_MOUNT_BLOCKDEV`` - name of block device where
+   filesystem to be tested in located, or "ROOT"
+
+ * ``BENCHMARK_BONNIE_MOUNT_POINT`` - directory name where the filesystem
+   should be mounted (if needed), and the tests run.
+
+ * ``BENCHMARK_BONNIE_SIZE`` - specifies the size, in megabytes, of the
+   files used for IO performance measurements
+
+   * This is the parameter to the -s command line option
+
+ * ``BENCHMARK_BONNIE_RAM`` - specifies the size of the board's RAM in
+   megabytes, or "0" if ram size sanity checks should be disabled
+
+   * This is the parameter to the -r command line option
+
+ * ``BENCHMARK_BONNIE_NUM_FILES`` - is a colon-separate 4-tuple indicating
+   the number of files, the file max size, the file min size, and the
+   number of directories to spread the files into, for metadata tests
+
+   * The default value, if not specified is: "16:0:0:1".  This results in 16K
+     files with maximum and minimum size 0, in 1 directory.
+
+ * ``BENCHMARK_BONNIE_ROOT`` - should be set to "true" if the bonnie should
+   try to execute as the root user on the board.
+
+==========
+Status
+==========
+
+ * OK
+
+=========
+Notes
+=========
+
+.. note::
+
+  If a test executes too quickly, bonnie does not report the
+  result, and instead produces '+++++'s in the entries for those tests.
+  Specifically, bonnie will emit this if a test result was less than .5
+  (MinTime in the source code).  If this happens for you, consider using
+  or writing a spec that increases the size of the files, or the number
+  of files used for tests.
+
diff --git a/docs/rst_src/Benchmark.template.rst b/docs/rst_src/Benchmark.template.rst
new file mode 100644
index 0000000..9ccb0b7
--- /dev/null
+++ b/docs/rst_src/Benchmark.template.rst
@@ -0,0 +1,38 @@
+#####################
+Benchmark.template
+#####################
+
+===============
+Description
+===============
+
+==============
+Resources
+==============
+
+ * First external resource (web site, tutorial, article, etc)
+
+===========
+Results
+===========
+
+=========
+Tags
+=========
+
+ * First tag
+
+================
+Dependencies
+================
+
+==========
+Status
+==========
+
+ * OK
+
+=========
+Notes
+=========
+
diff --git a/docs/rst_src/Functional.LTP.rst b/docs/rst_src/Functional.LTP.rst
new file mode 100644
index 0000000..95c86fc
--- /dev/null
+++ b/docs/rst_src/Functional.LTP.rst
@@ -0,0 +1,191 @@
+###################
+Functional.LTP
+###################
+
+===============
+Description
+===============
+
+LTP is the Linux Test Project test, which is actually a "super-test"
+which contains literally thousands of sub-tests in all kinds of
+categories.
+
+=============
+Resources
+=============
+
+ * `Project source on github <https://github.com/linux-test-project/>`_
+ * `LTP page on Wikipedia <https://en.wikipedia.org/wiki/Linux_Test_Project>`_
+ * `Kernel test automation with LTP <https://lwn.net/Articles/625969/>`_ -
+   by Cyril Hrubis LWN.net, December 2014
+
+
+============
+Results
+============
+
+LTP has thousands of sub-tests, which themselves can be grouped into
+collections.
+
+Tests results are organized into testsets, that correspond to these
+collections.  A Fuego spec can be used to select what collections to
+execute, and also what sub-test cases to skip.
+
+========
+Tags
+========
+
+ * kernel, posix, realtime
+
+================
+Dependencies
+================
+
+This test has no dependencies for either the build, or the running
+system, in the current configuration used by Fuego.
+
+===========
+Status
+===========
+
+ * Can be run, but has lot of bugs
+ * see :ref:`Functional.LTP_issues`
+
+=========
+Notes
+=========
+
+For notes about LTP internals, see :ref:`LTP_Notes`
+
+A number of fuego-specific features are available for dealing with
+LTP.  Since it is quite large, the build and deployment of LTP can
+take a substantial amount of time.  Also, LTP is often already
+pre-installed on the target board (along with the distribution), so
+building LTP is not required.
+
+Special Fuego variables and specs are available to deal with different
+LTP installation and usage scenarios.
+
+Variables
+============
+
+ * ``FUNCTIONAL_LTP_TESTS`` (spec variable 'tests') - list the LTP test
+   collections to execute
+
+   * Usually specified in the spec
+
+ * ``FUNCTIONAL_LTP_SKIPLIST`` (spec variable 'skiplist') - list the
+   individual LTP tests to not execute
+
+   * May be specified in a spec or in the board file
+
+ * ``FUNCTIONAL_LTP_BOARD_SKIPLIST`` - list individual LTP tests to
+   not execute
+
+   * Should only be specified in the board file
+
+   * Is used to avoid overwriting the spec 'skiplist'
+
+ * ``FUNCTIONAL_LTP_HOMEDIR`` - specifies a non-default, persistent, location
+   where LTP resides on the board
+
+   * This is placed in the board file for a board that has LTP pre-installed
+
+
+Specs
+============
+
+ * Special Fuego LTP specs:
+
+    * **install**
+
+      * Use this to deploy LTP, but not run any tests
+
+    * **make_pkg**
+
+      * Use this to create a tarfile which can be manually installed
+        on the target
+
+Special build and deployment scenarios
+=============================================
+
+The ``Functional.LTP`` test in Fuego supports 2 major different usage
+scenarios, with some helper specs to accomplish setting up for them.
+
+Normally, Fuego installs all test materials needed for a test,
+executes the test, then removes all the test materials.  However, in
+the case of LTP, the materials are so big that putting them on the
+target for every test may be too much overhead.
+
+Also, sometime LTP is already installed on a board, and there's no
+need for Fuego to build and deploy LTP to the board in the first
+place.
+
+Here are the 2 main scenarios:
+
+ 1 - Build LTP, deploy it, and run the requested tests
+
+   * This is the default Fuego scenario, and if no other variables
+     are used, this is what will occur
+
+ 2 - Check for LTP already on target, and run the requested tests
+
+   * If the variable FUNCTIONAL_LTP_HOMEDIR is set in the board file, then
+     ``Functional.LTP`` will skip deploying LTP to the target
+   * Fuego will still install a few custom scripts and files for each test
+   * LTP tests will run relatively quickly (because build and deploy are omitted)
+
+     * However, LTP test data will take up a lot of space on the target
+       (on my system, about 500M)
+
+
+There are special test specs for setting up LTP persistently on the target:
+
+ * spec: **install** - builds and deploys LTP to the test directory
+
+   * You should set ``FUNCTIONAL_LTP_HOMEDIR`` in the board file.  This is the
+     persistent directory where LTP will be installed
+
+ * spec: **make_pkg** - builds LTP, and then creates a tar file that can
+   be manually installed on the target
+
+   * The tar file is called ltp.tar.gz, and is left in the log directory
+     for the test
+   * A link should be provided (called 'tar.gz') to download this tar file
+     from the Jenkins server, on the job page for this.
+
+Steps
+--------------
+
+Here are exact steps to follow, to build Fuego's LTP, and install it on target
+
+ * decide where to install LTP (recommendation is /opt/ltp)
+
+ * set the ``FUNCTIONAL_LTP_HOMEDIR`` variable in your board file
+
+   * It should have quotes (like other board variables) and look something like this:
+
+::
+
+  FUNCTIONAL_LTP_HOMEDIR="/opt/ltp"
+
+
+ * Make directory ``/opt/ltp`` on the target board
+ * Create a job for the board, with spec "install"
+
+   * 'ftc add-job -b myboard -t Functional.LTP -s install'
+
+ * Execute the job in Jenkins or from ftc
+
+   * 'ftc build-job myboard.install.Functional.LTP'
+
+ * Verify on the target that the materials are present
+
+   * Login, and check that ``/opt/ltp`` is populated
+
+ * Create and execute other LTP jobs (with different specs)
+
+   * e.g. 'ftc add-job -b myboard -t Functional.LTP -s quickhit'
+   * e.g. 'ftc add-job -b myboard -t Functional.LTP -s selectionwithrt'
+   * Build them using Jenkins or ftc
+
-- 
2.7.4


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Fuego] [PATCH] Docs:Convert tbwiki pages into .rst files
  2020-11-20  5:31 [Fuego] [PATCH] Docs:Convert " Pooja
@ 2020-11-23 21:50 ` Bird, Tim
  0 siblings, 0 replies; 8+ messages in thread
From: Bird, Tim @ 2020-11-23 21:50 UTC (permalink / raw)
  To: Pooja, tbird20d; +Cc: fuego

See comments inline below.

> -----Original Message-----
> From: Pooja <pooja.sm@pathpartnertech.com>
> 
> From: Pooja More <pooja.sm@pathpartnertech.com>
> 
> Following are the pages converted:
> run.json.rst
> spec.json.rst
> test.yaml.rst
> 
> Signed-off-by: Pooja More <pooja.sm@pathpartnertech.com>
> ---
>  docs/rst_src/run.json.rst  | 323 +++++++++++++++++++++++++++++++++++++++++++++
>  docs/rst_src/spec.json.rst | 183 +++++++++++++++++++++++++
>  docs/rst_src/test.yaml.rst | 177 +++++++++++++++++++++++++
>  3 files changed, 683 insertions(+)
>  create mode 100644 docs/rst_src/run.json.rst
>  create mode 100644 docs/rst_src/spec.json.rst
>  create mode 100644 docs/rst_src/test.yaml.rst
> 
> diff --git a/docs/rst_src/run.json.rst b/docs/rst_src/run.json.rst
> new file mode 100644
> index 0000000..d128fb3
> --- /dev/null
> +++ b/docs/rst_src/run.json.rst
> @@ -0,0 +1,323 @@
> +###########
> +run.json
> +###########
> +
> +Summary
> +===========
> +
> +The ``run.json`` file has data about a particular test run.  It has
> +information about the test, including the results for the test.
> +
> +The format of portions of this file was inspired by the KernelCI API.
> +See `<https://api.kernelci.org/schema-test-case.html>`_
> +
> +The results are included in an array of test_set objects, which can
> +contain arrays of test_case objects, which themselves may contain
> +measurement objects.
> +
> +
> +Field details
> +===================
> +
> + * **duration** - the amount of time, in milliseconds, that the test
> +   took to execute
> +
> +   * If the test included a build, this time is included in this number
> +
> + * **metadata** - various fields that are specific to Fuego
> +
> +   * **attachments** - a list of the files that are available for this
> +     test - usually logs and such
> +   * **batch_id** - a string indicating the batch of tests this test was run
> +     in (if applicable)
> +   * **board** - the board the test was executed on
> +   * **build_number** - the Jenkins build number
> +   * **compiled_on** - indicates the location where the test was compiled
> +   * **fuego_core_version** - version of the fuego core system
> +   * **fuego_version** - version of the fuego container system
> +   * **host_name** - the host.  If not configured, it may be 'local_host'
> +   * **job_name** - the Jenkins job name for this test run
> +   * **keep_log** - indicates whether the log is kept (???)
> +   * **kernel_version** - the version of the kernel running on the board
> +   * **reboot** - indicates whether a reboot was requested for this test run
> +   * **rebuild** - indicates whether it was requested to rebuild the source
> +     for this run
> +   * **start_time** - time when this test run was started (in seconds since
> +     Jan 1, 1970)
> +   * **target_postcleanup** - indicates whether cleanup of test materials on the
> +     board was requested for after test execution
> +   * **target_precleanup** - indicates whether cleanup of test materials on the
> +     board was requested for before test execution
> +   * **test_plan** - test plan being executed for this test run.  May be 'None'
> +     if test was not executed in the context of a larger plan
> +   * **test_spec** - test spec used for this run
> +   * **testsuite_version** - version of the source program used for this run
> +
> +     * FIXTHIS - testsuite_version is not calculated properly yet
> +
> +   * **timestamp** - time when this test run was started (in ISO 8601 format)
> +   * **toolchain** - the toolchains (or PLATFORM) used to build the test program
> +   * **workspace** - a directory on the host where test materials were extracted
> +     and built, for this test.
> +
> +     * This is the parent directory used, and not the specific directory used for
> +       this test.
> +
> + * **name** - the name of the test
> + * **status** - the test result as a string.  This can be one of:
> +
> +   * PASS
> +   * FAIL
> +   * ERROR
> +   * SKIP
> +
> + * **test_sets** - list of test_set objects, containing test results
> + * **test_cases** - list of test_case objects, containing test results
> +
> +   * Each test_case object has:
> +
> +     * **name** - the test case name
> +     * **status** - the result for that test case
> +
> + * **measurements** - list of measurement objects, containing test results
> +
> +   * For each measurement, the following attributes may be present:
> +
> +     * **name** - the measure name
> +     * **status** - the pass/fail result for that test case
> +     * **measure** - the numeric result for that test case
> +
> +============
> +Examples
> +============
> +
> +Here are some sample run.json files, from Fuego 1.2
``run.json``

> +
> +
> +Functional test results
> +=============================
> +
> +This was generated using
> +
> +::
> +
> + ftc run-test -b docker -t Functional.hello_world
> +
> +This example only has a single test_case.
> +
> +::
> +
> +  {
> +      "duration_ms": 1245,
> +      "metadata": {
> +          "attachments": [
> +              {
> +                  "name": "devlog",
> +                  "path": "devlog.txt"
> +              },
> +              {
> +                  "name": "devlog",
> +                  "path": "devlog.txt"
> +              },
> +              {
> +                  "name": "syslog.before",
> +                  "path": "syslog.before.txt"
> +              },
> +              {
> +                  "name": "syslog.after",
> +                  "path": "syslog.after.txt"
> +              },
> +              {
> +                  "name": "testlog",
> +                  "path": "testlog.txt"
> +              },
> +              {
> +                  "name": "consolelog",
> +                  "path": "consolelog.txt"
> +              },
> +              {
> +                  "name": "test_spec",
> +                  "path": "spec.json"
> +              }
> +          ],
> +          "board": "docker",
> +          "build_number": "3",
> +          "compiled_on": "docker",
> +          "fuego_core_version": "v1.1-805adb0",
> +          "fuego_version": "v1.1-5ad677b",
> +          "host_name": "fake_host",
> +          "job_name": "docker.default.Functional.hello_world",
> +          "keep_log": true,
> +          "kernel_version": "3.19.0-47-generic",
> +          "reboot": "false",
> +          "rebuild": "false",
> +          "start_time": "1509662455755",
> +          "target_postcleanup": true,
> +          "target_precleanup": "true",
> +          "test_plan": "None",
> +          "test_spec": "default",
> +          "testsuite_version": "v1.1-805adb0",
> +          "timestamp": "2017-11-02T22:40:55+0000",
> +          "toolchain": "x86_64",
> +          "workspace": "/fuego-rw/buildzone"
> +      },
> +      "name": "Functional.hello_world",
> +      "schema_version": "1.0",
> +      "status": "PASS",
> +      "test_sets": [
> +          {
> +              "name": "default",
> +              "status": "PASS",
> +              "test_cases": [
> +                  {
> +                      "name": "hello_world",
> +                      "status": "PASS"
> +                  }
> +              ]
> +          }
> +      ]
> +  }
> +
> +
> +
> +Benchmark results
> +=======================
> +
> +Here is the run.json file for a run of the test ``Benchmark.netperf``
``run.json``

> +on the board 'ren1' (which is a Renesas board in my lab).
> +
> +::
> +
> +  {
> +      "duration_ms": 33915,
> +      "metadata": {
> +          "attachments": [
> +              {
> +                  "name": "devlog",
> +                  "path": "devlog.txt"
> +              },
> +              {
> +                  "name": "devlog",
> +                  "path": "devlog.txt"
> +              },
> +              {
> +                  "name": "syslog.before",
> +                  "path": "syslog.before.txt"
> +              },
> +              {
> +                  "name": "syslog.after",
> +                  "path": "syslog.after.txt"
> +              },
> +              {
> +                  "name": "testlog",
> +                  "path": "testlog.txt"
> +              },
> +              {
> +                  "name": "consolelog",
> +                  "path": "consolelog.txt"
> +              },
> +              {
> +                  "name": "test_spec",
> +                  "path": "spec.json"
> +              }
> +          ],
> +          "board": "ren1",
> +          "build_number": "3",
> +          "compiled_on": "docker",
> +          "fuego_core_version": "v1.2.0",
> +          "fuego_version": "v1.2.0",
> +          "host_name": "local_host",
> +          "job_name": "ren1.default.Benchmark.netperf",
> +          "keep_log": true,
> +          "kernel_version": "4.9.0-yocto-standard",
> +          "reboot": "false",
> +          "rebuild": "false",
> +          "start_time": "1509669904085",
> +          "target_postcleanup": true,
> +          "target_precleanup": "true",
> +          "test_plan": "None",
> +          "test_spec": "default",
> +          "testsuite_version": "v1.1-805adb0",
> +          "timestamp": "2017-11-03T00:45:04+0000",
> +          "toolchain": "poky-aarch64",
> +          "workspace": "/fuego-rw/buildzone"
> +      },
> +      "name": "Benchmark.netperf",
> +      "schema_version": "1.0",
> +      "status": "PASS",
> +      "test_sets": [
> +          {
> +              "name": "default",
> +              "status": "PASS",
> +              "test_cases": [
> +                  {
> +                      "measurements": [
> +                          {
> +                              "measure": 928.51,
> +                              "name": "net",
> +                              "status": "PASS"
> +                          },
> +                          {
> +                              "measure": 59.43,
> +                              "name": "cpu",
> +                              "status": "PASS"
> +                          }
> +                      ],
> +                      "name": "MIGRATED_TCP_STREAM",
> +                      "status": "PASS"
> +                  },
> +                  {
> +                      "measurements": [
> +                          {
> +                              "measure": 934.1,
> +                              "name": "net",
> +                              "status": "PASS"
> +                          },
> +                          {
> +                              "measure": 56.61,
> +                              "name": "cpu",
> +                              "status": "PASS"
> +                          }
> +                      ],
> +                      "name": "MIGRATED_TCP_MAERTS",
> +                      "status": "PASS"
> +                  }
> +              ]
> +          }
> +      ]
> +  }
> +
> +
> +==========
> +Ideas
> +==========
> +
> +Some changes to the fields might be useful:
> +
> + * We don't have anything that records the 'cause', from Jenkins
> +
> +   * This is supposed to indicate what triggered the test
> +   * The Jenkins strings are somewhat indecipherable:
> +
> +     * Here is a Jenkins cause: <hudson.model.Cause_-UserIdCause/><int>1</int>
> +
> + * It might be worthwhile to add some fields from the board or target:
> +
> +   * Architecture
> +   * Transport - not sure about this one
> +   * Distrib
> +   * File system
> +
> + * If we add monitors or side-processes (stressors), it would be good to add
> +   information about those as well
> +
> +Use of flat data
> +======================
> +
> +Parsing the tree-structured data has turned out to be a real pain, and
> +it might be better to do most of the work in a flat format.  The
> +charting code uses a mixture of both structured (nested objects) and
> +flat testcase names, and I think there's a lot of duplicate code lying
> +around that handles the conversion back and forth, that could probably
> +be coalesced into a single set of library routines.
> +
> diff --git a/docs/rst_src/spec.json.rst b/docs/rst_src/spec.json.rst
> new file mode 100644
> index 0000000..6296776
> --- /dev/null
> +++ b/docs/rst_src/spec.json.rst
> @@ -0,0 +1,183 @@
> +############
> +spec.json
> +############
> +
> +================
> +Introduction
> +================
> +
> +The file ``spec.json`` is defined for each test.  This file allows for
> +the same test to be used in multiple different ways.  This is often
> +referred to as a parameterized test.
> +
> +The ``spec.json`` file indicates a list of "specs" for the test, and
> +for each test the values for test variables (parameters) that the test
> +will use to configure its behavior.
> +
> +The variables declared in a spec are made available as shell variables
> +to the test at test runtime.  To avoid naming collisions, the test
> +variables are prefixed with the name of the test.  They are also
> +converted to all upper-case.
> +
> +So, for example, for a test called Functional.mytest, if the spec
> +declared a variable called 'loops', with a value of "10", the
> +following test variable would be defined: FUNCTIONAL_MYTEST_LOOPS=10
> +
> +The intent is allow for a test author or some other party to declare a
> +set of parameters to run the test in a different configuration.
> +
> +Fuego is often used to wrap existing test programs and benchmarks,
> +which have command line options for controlling various test execution
> +parameters.  Setting these command line options is one of the primary
> +purposes of specs, and the spec.json file.
``spec.json``

> +
> +==========
> +Schema
> +==========
> +
> +``spec.json`` holds a single object, with a 'testName' attribute, and an
> +attribute called 'specs' that is a collection of spec definitions.
> +Each spec definition has a name and a collection of named attributes.
> +
> + * **testName** - this indicates the test that these specs apply to
> + * **specs** - this indicates the collection of specs
> + * **fail_case** - this allows a test to provide a list failure expressions
> +   that will be be checked for in the test or system logs
> +
> +    * **fail_regexp** - a regular expression that indicates a failure.
> +      This is grep'ed for in the testlog (unless use_syslog is set)
> +    * **fail_message** - a message to output when the regular expression is
> +      found
> +
> +    * **use_syslog** - a flag indicating to scan for the fail_regexp in the
> +      system log rather than the test log
> +
> +Within each spec, there should be a collection of name/value pairs.
> +Note that the values in a name/value pair are expanded in test context,
> +so that the value may reference other test variables (such as from
> +the board file, or the stored variables file for a board).
> +
> +Special variables
> +=======================
> +
> +There are some special variables that can be defined, that are recognized
> +by the Fuego core system.
> +
> +One of these is:
> +
> + * **PER_JOB_BUILD** - if this variable is defined, then Fuego will create
> +   a separate build area for each job that this test is included in, even if
> +   a board or another job uses the same toolchain.  This is used when the test
> +   variables are used in the ''build'' phase, and can affect the binary that is
> +   compiled during this phase.
> +
> +============
> +Examples
> +============
> +
> +Here is an example, from the test ``Functional.bc``:
> +
> +::
> +
> +  {
> +      "testName": "Functional.bc",
> +      "fail_case": [
> +          {
> +              "fail_regexp": "syntax error",
> +              "fail_message": "Text expression has a syntax error"
> +          },
> +          {
> +              "fail_regexp": "Bug",
> +              "fail_message": "Bug or Oops detected in system log",
> +              "use_syslog": "1"
> +          }
> +      ],
> +      "specs": {
> +         "default": {
> +              "EXPR":"3+3",
> +              "RESULT":"6"
> +          },
> +          "bc-mult": {
> +              "EXPR":"2*2",
> +              "RESULT": "4"
> +          },
> +          "bc-add": {
> +              "EXPR":"3+3",
> +              "RESULT":"6"
> +          },
> +           "bc-by2": {
> +              "PER_JOB_BUILD": "true",
> +              "tarball": "by2.tar.gz",
> +              "EXPR":"3+3",
> +              "RESULT":"12"
> +          },
> +          "bc-fail": {
> +              "EXPR":"3 3",
> +              "RESULT":"6"
> +          },
> +      }
> +  }
> +
> +In this example, the EXPR variable is used as input to the program
> +'bc' and the RESULT gives the expected output from bc.
``bc`` and ``bc``

> +
> +This particular ``spec.json`` file is this complex for instructional
> +purposes, and this particular test is somewhat overly parameterized.
> +
> +
> +Here is an example, from the test ``Functional.synctest``:
> +
> +::
> +
> +  {
> +      "testName": "Functional.synctest",
> +      "specs": {
> +          "sata": {
> +              "MOUNT_BLOCKDEV":"$SATA_DEV",
> +              "MOUNT_POINT":"$SATA_MP",
> +              "LEN":"10",
> +              "LOOP":"10"
> +          },
> +          "mmc": {
> +              "MOUNT_BLOCKDEV":"$MMC_DEV",
> +              "MOUNT_POINT":"$MMC_MP",
> +              "LEN":"10",
> +              "LOOP":"10"
> +          },
> +          "usb": {
> +              "MOUNT_BLOCKDEV":"$USB_DEV",
> +              "MOUNT_POINT":"$USB_MP",
> +              "LEN":"10",
> +              "LOOP":"10"
> +          },
> +          "default": {
> +              "MOUNT_BLOCKDEV":"ROOT",
> +              "MOUNT_POINT":"$BOARD_TESTDIR/work",
> +              "LEN":"30",
> +              "LOOP":"10"
> +          }
> +      }
> +  }
> +
> +
> +Note the use of variables references for ``MOUNT_BLOCKDEV`` and
> +``MOUNT_POINT``.  These use values ($SATA_DEV, $MMC_DEV or $USB_DEV) that
> +should be defined in a board file for filesystem-related tests.
> +
> +When a test defines variables, they should be documented in the test's
> +``test.yaml`` file.
> +
> +============
> +Defaults
> +============
> +
> +If a test has no ``spec.json``, then default set of values is used, which
> +is a single spec with the name "default", and no values defined.
> +
> +============
> +See also
> +============
> +
> + * See :ref:`Test Spec and Plans` for more information about
:ref:`Test Specs and Plans`


> +   Fuego's test spec and testplan system.
> +
> diff --git a/docs/rst_src/test.yaml.rst b/docs/rst_src/test.yaml.rst
> new file mode 100644
> index 0000000..1db55f6
> --- /dev/null
> +++ b/docs/rst_src/test.yaml.rst
> @@ -0,0 +1,177 @@
> +############
> +test.yaml
> +############
> +
> +The ``test.yaml`` file is used to hold meta-information about a test.  This is
> +used by the :ref:`Test package system`  for packaging a test and providing
> +information for viewing and searching for tests in a proposed "test store".
> +The ``test.yaml`` file can also can be used by human maintainers to preserve
> +information (in a structured format) about a test, that is not included in the
> +other test materials.
> +
> +As an overview, the ``test.yaml`` file indicates where the source for the
> +test comes from, it's license, the name of the test maintainer, a
> +description of the test and tags for categorizing the test, and a
> +formal list of parameters that are used by the test (what they mean
> +and how to use them).
> +
> +=====================
> +test.yaml fields
> +=====================
> +
> +Here are the fields supported in a ``test.yaml`` file:
> +
> +``fuego_package_version``
> +
> +  Indicates the version of package
> +  (in case of changes to the package schema).  For now, this is always 1.
> +
> +``name``
> +
> +  Has the full Fuego name of the test.  Ex: Benchmark.iperf
> +
> +``description``
> +
> +  Has an English description of the test
> +
> +``license``
> +
> +  Has an SPDX identifier for the test.  This is the main
> +  license of the test project that the Fuego test uses, if the project
> +  has a tarfile or git repo.  Otherwise it reflects the license of any
> +  non-Fuego-specific materials in the test directory.  In such case,
> +  the test directory should include a LICENSE file.  Fuego materials
> +  (``fuego_test.sh``, ``spec.json``, ``chart_config.json``, etc.) are
> +  considered to be under the default Fuego license (which is BSD-3-Clause)
> +  unless otherwise specifically indicated in these files.  The license
> +  identifier for this field should be obtained from
> +  `<https://spdx.org/licenses/>`_
> +
> +``author``
> +
> +  The author or authors of the base test
> +
> +``maintainer``
> +
> +  The maintainer of the Fuego materials for this test
> +
> +``version``
> +
> +  The version of the base test
> +
> +``fuego_release``
> +
> +  The version of Fuego materials for this test.  This is a monotonically
> +  incrementing integer, starting at 1 for each new version of the base test.
> +
> +``type``
> +
> +  Either Benchmark or Functional
> +
> +``tags``
> +
> +  A list of tags used to categorize this test.  This is intended to be
> +  used in an eventual online test store.
> +
> +``tarball_src``
> +
> +  A URL where the tarball was originally obtained from
> +
> +
> +``gitrepo``
> +
> +  A git URL where the source may be obtained from
> +
> +``host_dependencies``
> +
> +  A list of Debian package names that must be installed in the docker
> +  container in order for this test to work properly.  This field is
> +  optional, and indicates packages needed that are beyond those included in
> +  the standard Fuego host distribution in the Fuego docker container.
> +
> +``params``
> +
> +  A list of parameters that may be used with this test, including their
> +  descriptions, whether they are optional or required, and an example
> +  value for each one
> +
> +``data_files``
> +
> +  A list of the files that are included in this test.  This is used as the
> +  manifest for packaging the test (``fuego_test.sh``, and ``test.yaml`` are
> +  implicitly included in the packaging manifest).
> +
> +
> +More on params
> +===================
> +
> +The 'params' field in the test.yaml file is a list of dictionaries
``params``
``test.yaml``

> +with one item per test variable used by the test.
> +
> +The name of the parameter is the short name of the parameter, without
> +the test name prefix (e.g. FUNCTIONAL_LTP).  The parameter name is the
> +key for the dictionary with that parameters attributes.
> +
> +Each parameter has a dictionary with attributes describing it.  The
> +dictionary has the following fields (keys):
> +
> + - 'description' - text description of the parameter
> + - 'example' - an example of the parameter
> + - 'optional' - indicates whether the test requires this parameter
> +   (test variable) to be set or not.  The value of the 'optional'
> +   field must be one of 'yes' or 'no'.
> +
> +The test variables may be described by the ``test.yaml`` file can be
> +defined in one of multiple locations in the Fuego test system.  Most
> +commonly the test variables are defined in a spec for the test, but
> +they can also be defined in the board file, or as a dynamic board
> +variable.
> +
> +=========
> +Example
> +=========
> +
> +Here is an example ``test.yaml`` file, for the package ``Benchmark.iperf3``:
> +
> +::
> +
> +  fuego_package_version: 1
> +  name: Benchmark.iperf3
> +  description: |
> +      iPerf3 is a tool for active measurements of the maximum achievable
> +      bandwidth on IP networks.
> +  license: BSD-3-Clause.
> +  author: |
> +      Jon Dugan, Seth Elliott, Bruce A. Mah, Jeff Poskanzer, Kaustubh Prabhu,
> +      Mark Ashley, Aaron Brown, Aeneas Jaißle, Susant Sahani, Bruce Simpson,
> +      Brian Tierney.
> +  maintainer: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
> +  version: 3.1.3
> +  fuego_release: 1
> +  type: Benchmark
> +  tags: ['network', 'performance']
> +  tarball_src: https://iperf.fr/download/source/iperf-3.1.3-source.tar.gz
> +  gitrepo: https://github.com/esnet/iperf.git
> +  params:
> +      - server_ip:
> +          description: |
> +              IP address of the server machine. If not provided, then SRV_IP
> +              _must_ be provided on the board file. Otherwise the test will fail.
> +              if the server ip is assigned to the host, the test automatically
> +              starts the iperf3 server daemon. Otherwise, the tester _must_ make
> +              sure that iperf3 -V -s -D is already running on the server machine.
> +          example: 192.168.1.45
> +          optional: yes
> +      - client_params:
> +          description: extra parameters for the client
> +          example: -p 5223 -u -b 10G
> +          optional: yes
> +  data_files:
> +      - chart_config.json
> +      - fuego_test.sh
> +      - parser.py
> +      - spec.json
> +      - criteria.json
> +      - iperf-3.1.3-source.tar.gz
> +      - reference.json
> +      - test.yaml
> --
> 2.7.4
> 
> 
> --
> 

Looks good.  I just added a few more places where literal-quoting were used
(and in my own edits reworded a few places for greater clarity).

Thanks,
 -- Tim


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Fuego] [PATCH] Docs:Convert tbwiki pages into .rst files
@ 2020-11-20  5:31 Pooja
  2020-11-23 21:50 ` Bird, Tim
  0 siblings, 1 reply; 8+ messages in thread
From: Pooja @ 2020-11-20  5:31 UTC (permalink / raw)
  To: tbird20d, Tim.Bird; +Cc: fuego, Pooja More

From: Pooja More <pooja.sm@pathpartnertech.com>

Following are the pages converted:
run.json.rst
spec.json.rst
test.yaml.rst

Signed-off-by: Pooja More <pooja.sm@pathpartnertech.com>
---
 docs/rst_src/run.json.rst  | 323 +++++++++++++++++++++++++++++++++++++++++++++
 docs/rst_src/spec.json.rst | 183 +++++++++++++++++++++++++
 docs/rst_src/test.yaml.rst | 177 +++++++++++++++++++++++++
 3 files changed, 683 insertions(+)
 create mode 100644 docs/rst_src/run.json.rst
 create mode 100644 docs/rst_src/spec.json.rst
 create mode 100644 docs/rst_src/test.yaml.rst

diff --git a/docs/rst_src/run.json.rst b/docs/rst_src/run.json.rst
new file mode 100644
index 0000000..d128fb3
--- /dev/null
+++ b/docs/rst_src/run.json.rst
@@ -0,0 +1,323 @@
+###########
+run.json
+###########
+
+Summary
+===========
+
+The ``run.json`` file has data about a particular test run.  It has
+information about the test, including the results for the test.
+
+The format of portions of this file was inspired by the KernelCI API.
+See `<https://api.kernelci.org/schema-test-case.html>`_
+
+The results are included in an array of test_set objects, which can
+contain arrays of test_case objects, which themselves may contain
+measurement objects.
+
+
+Field details
+===================
+
+ * **duration** - the amount of time, in milliseconds, that the test
+   took to execute
+
+   * If the test included a build, this time is included in this number
+
+ * **metadata** - various fields that are specific to Fuego
+
+   * **attachments** - a list of the files that are available for this
+     test - usually logs and such
+   * **batch_id** - a string indicating the batch of tests this test was run
+     in (if applicable)
+   * **board** - the board the test was executed on
+   * **build_number** - the Jenkins build number
+   * **compiled_on** - indicates the location where the test was compiled
+   * **fuego_core_version** - version of the fuego core system
+   * **fuego_version** - version of the fuego container system
+   * **host_name** - the host.  If not configured, it may be 'local_host'
+   * **job_name** - the Jenkins job name for this test run
+   * **keep_log** - indicates whether the log is kept (???)
+   * **kernel_version** - the version of the kernel running on the board
+   * **reboot** - indicates whether a reboot was requested for this test run
+   * **rebuild** - indicates whether it was requested to rebuild the source
+     for this run
+   * **start_time** - time when this test run was started (in seconds since
+     Jan 1, 1970)
+   * **target_postcleanup** - indicates whether cleanup of test materials on the
+     board was requested for after test execution
+   * **target_precleanup** - indicates whether cleanup of test materials on the
+     board was requested for before test execution
+   * **test_plan** - test plan being executed for this test run.  May be 'None'
+     if test was not executed in the context of a larger plan
+   * **test_spec** - test spec used for this run
+   * **testsuite_version** - version of the source program used for this run
+
+     * FIXTHIS - testsuite_version is not calculated properly yet
+
+   * **timestamp** - time when this test run was started (in ISO 8601 format)
+   * **toolchain** - the toolchains (or PLATFORM) used to build the test program
+   * **workspace** - a directory on the host where test materials were extracted
+     and built, for this test.
+
+     * This is the parent directory used, and not the specific directory used for
+       this test.
+
+ * **name** - the name of the test
+ * **status** - the test result as a string.  This can be one of:
+
+   * PASS
+   * FAIL
+   * ERROR
+   * SKIP
+
+ * **test_sets** - list of test_set objects, containing test results
+ * **test_cases** - list of test_case objects, containing test results
+
+   * Each test_case object has:
+
+     * **name** - the test case name
+     * **status** - the result for that test case
+
+ * **measurements** - list of measurement objects, containing test results
+
+   * For each measurement, the following attributes may be present:
+
+     * **name** - the measure name
+     * **status** - the pass/fail result for that test case
+     * **measure** - the numeric result for that test case
+
+============
+Examples
+============
+
+Here are some sample run.json files, from Fuego 1.2
+
+
+Functional test results
+=============================
+
+This was generated using
+
+::
+
+ ftc run-test -b docker -t Functional.hello_world
+
+This example only has a single test_case.
+
+::
+
+  {
+      "duration_ms": 1245,
+      "metadata": {
+          "attachments": [
+              {
+                  "name": "devlog",
+                  "path": "devlog.txt"
+              },
+              {
+                  "name": "devlog",
+                  "path": "devlog.txt"
+              },
+              {
+                  "name": "syslog.before",
+                  "path": "syslog.before.txt"
+              },
+              {
+                  "name": "syslog.after",
+                  "path": "syslog.after.txt"
+              },
+              {
+                  "name": "testlog",
+                  "path": "testlog.txt"
+              },
+              {
+                  "name": "consolelog",
+                  "path": "consolelog.txt"
+              },
+              {
+                  "name": "test_spec",
+                  "path": "spec.json"
+              }
+          ],
+          "board": "docker",
+          "build_number": "3",
+          "compiled_on": "docker",
+          "fuego_core_version": "v1.1-805adb0",
+          "fuego_version": "v1.1-5ad677b",
+          "host_name": "fake_host",
+          "job_name": "docker.default.Functional.hello_world",
+          "keep_log": true,
+          "kernel_version": "3.19.0-47-generic",
+          "reboot": "false",
+          "rebuild": "false",
+          "start_time": "1509662455755",
+          "target_postcleanup": true,
+          "target_precleanup": "true",
+          "test_plan": "None",
+          "test_spec": "default",
+          "testsuite_version": "v1.1-805adb0",
+          "timestamp": "2017-11-02T22:40:55+0000",
+          "toolchain": "x86_64",
+          "workspace": "/fuego-rw/buildzone"
+      },
+      "name": "Functional.hello_world",
+      "schema_version": "1.0",
+      "status": "PASS",
+      "test_sets": [
+          {
+              "name": "default",
+              "status": "PASS",
+              "test_cases": [
+                  {
+                      "name": "hello_world",
+                      "status": "PASS"
+                  }
+              ]
+          }
+      ]
+  }
+
+
+
+Benchmark results
+=======================
+
+Here is the run.json file for a run of the test ``Benchmark.netperf``
+on the board 'ren1' (which is a Renesas board in my lab).
+
+::
+
+  {
+      "duration_ms": 33915,
+      "metadata": {
+          "attachments": [
+              {
+                  "name": "devlog",
+                  "path": "devlog.txt"
+              },
+              {
+                  "name": "devlog",
+                  "path": "devlog.txt"
+              },
+              {
+                  "name": "syslog.before",
+                  "path": "syslog.before.txt"
+              },
+              {
+                  "name": "syslog.after",
+                  "path": "syslog.after.txt"
+              },
+              {
+                  "name": "testlog",
+                  "path": "testlog.txt"
+              },
+              {
+                  "name": "consolelog",
+                  "path": "consolelog.txt"
+              },
+              {
+                  "name": "test_spec",
+                  "path": "spec.json"
+              }
+          ],
+          "board": "ren1",
+          "build_number": "3",
+          "compiled_on": "docker",
+          "fuego_core_version": "v1.2.0",
+          "fuego_version": "v1.2.0",
+          "host_name": "local_host",
+          "job_name": "ren1.default.Benchmark.netperf",
+          "keep_log": true,
+          "kernel_version": "4.9.0-yocto-standard",
+          "reboot": "false",
+          "rebuild": "false",
+          "start_time": "1509669904085",
+          "target_postcleanup": true,
+          "target_precleanup": "true",
+          "test_plan": "None",
+          "test_spec": "default",
+          "testsuite_version": "v1.1-805adb0",
+          "timestamp": "2017-11-03T00:45:04+0000",
+          "toolchain": "poky-aarch64",
+          "workspace": "/fuego-rw/buildzone"
+      },
+      "name": "Benchmark.netperf",
+      "schema_version": "1.0",
+      "status": "PASS",
+      "test_sets": [
+          {
+              "name": "default",
+              "status": "PASS",
+              "test_cases": [
+                  {
+                      "measurements": [
+                          {
+                              "measure": 928.51,
+                              "name": "net",
+                              "status": "PASS"
+                          },
+                          {
+                              "measure": 59.43,
+                              "name": "cpu",
+                              "status": "PASS"
+                          }
+                      ],
+                      "name": "MIGRATED_TCP_STREAM",
+                      "status": "PASS"
+                  },
+                  {
+                      "measurements": [
+                          {
+                              "measure": 934.1,
+                              "name": "net",
+                              "status": "PASS"
+                          },
+                          {
+                              "measure": 56.61,
+                              "name": "cpu",
+                              "status": "PASS"
+                          }
+                      ],
+                      "name": "MIGRATED_TCP_MAERTS",
+                      "status": "PASS"
+                  }
+              ]
+          }
+      ]
+  }
+
+
+==========
+Ideas
+==========
+
+Some changes to the fields might be useful:
+
+ * We don't have anything that records the 'cause', from Jenkins
+
+   * This is supposed to indicate what triggered the test
+   * The Jenkins strings are somewhat indecipherable:
+
+     * Here is a Jenkins cause: <hudson.model.Cause_-UserIdCause/><int>1</int>
+
+ * It might be worthwhile to add some fields from the board or target:
+
+   * Architecture
+   * Transport - not sure about this one
+   * Distrib
+   * File system
+
+ * If we add monitors or side-processes (stressors), it would be good to add
+   information about those as well
+
+Use of flat data
+======================
+
+Parsing the tree-structured data has turned out to be a real pain, and
+it might be better to do most of the work in a flat format.  The
+charting code uses a mixture of both structured (nested objects) and
+flat testcase names, and I think there's a lot of duplicate code lying
+around that handles the conversion back and forth, that could probably
+be coalesced into a single set of library routines.
+
diff --git a/docs/rst_src/spec.json.rst b/docs/rst_src/spec.json.rst
new file mode 100644
index 0000000..6296776
--- /dev/null
+++ b/docs/rst_src/spec.json.rst
@@ -0,0 +1,183 @@
+############
+spec.json
+############
+
+================
+Introduction
+================
+
+The file ``spec.json`` is defined for each test.  This file allows for
+the same test to be used in multiple different ways.  This is often
+referred to as a parameterized test.
+
+The ``spec.json`` file indicates a list of "specs" for the test, and
+for each test the values for test variables (parameters) that the test
+will use to configure its behavior.
+
+The variables declared in a spec are made available as shell variables
+to the test at test runtime.  To avoid naming collisions, the test
+variables are prefixed with the name of the test.  They are also
+converted to all upper-case.
+
+So, for example, for a test called Functional.mytest, if the spec
+declared a variable called 'loops', with a value of "10", the
+following test variable would be defined: FUNCTIONAL_MYTEST_LOOPS=10
+
+The intent is allow for a test author or some other party to declare a
+set of parameters to run the test in a different configuration.
+
+Fuego is often used to wrap existing test programs and benchmarks,
+which have command line options for controlling various test execution
+parameters.  Setting these command line options is one of the primary
+purposes of specs, and the spec.json file.
+
+==========
+Schema
+==========
+
+``spec.json`` holds a single object, with a 'testName' attribute, and an
+attribute called 'specs' that is a collection of spec definitions.
+Each spec definition has a name and a collection of named attributes.
+
+ * **testName** - this indicates the test that these specs apply to
+ * **specs** - this indicates the collection of specs
+ * **fail_case** - this allows a test to provide a list failure expressions
+   that will be be checked for in the test or system logs
+
+    * **fail_regexp** - a regular expression that indicates a failure.
+      This is grep'ed for in the testlog (unless use_syslog is set)
+    * **fail_message** - a message to output when the regular expression is
+      found
+
+    * **use_syslog** - a flag indicating to scan for the fail_regexp in the
+      system log rather than the test log
+
+Within each spec, there should be a collection of name/value pairs.
+Note that the values in a name/value pair are expanded in test context,
+so that the value may reference other test variables (such as from
+the board file, or the stored variables file for a board).
+
+Special variables
+=======================
+
+There are some special variables that can be defined, that are recognized
+by the Fuego core system.
+
+One of these is:
+
+ * **PER_JOB_BUILD** - if this variable is defined, then Fuego will create
+   a separate build area for each job that this test is included in, even if
+   a board or another job uses the same toolchain.  This is used when the test
+   variables are used in the ''build'' phase, and can affect the binary that is
+   compiled during this phase.
+
+============
+Examples
+============
+
+Here is an example, from the test ``Functional.bc``:
+
+::
+
+  {
+      "testName": "Functional.bc",
+      "fail_case": [
+          {
+              "fail_regexp": "syntax error",
+              "fail_message": "Text expression has a syntax error"
+          },
+          {
+              "fail_regexp": "Bug",
+              "fail_message": "Bug or Oops detected in system log",
+              "use_syslog": "1"
+          }
+      ],
+      "specs": {
+         "default": {
+              "EXPR":"3+3",
+              "RESULT":"6"
+          },
+          "bc-mult": {
+              "EXPR":"2*2",
+              "RESULT": "4"
+          },
+          "bc-add": {
+              "EXPR":"3+3",
+              "RESULT":"6"
+          },
+           "bc-by2": {
+              "PER_JOB_BUILD": "true",
+              "tarball": "by2.tar.gz",
+              "EXPR":"3+3",
+              "RESULT":"12"
+          },
+          "bc-fail": {
+              "EXPR":"3 3",
+              "RESULT":"6"
+          },
+      }
+  }
+
+In this example, the EXPR variable is used as input to the program
+'bc' and the RESULT gives the expected output from bc.
+
+This particular ``spec.json`` file is this complex for instructional
+purposes, and this particular test is somewhat overly parameterized.
+
+
+Here is an example, from the test ``Functional.synctest``:
+
+::
+
+  {
+      "testName": "Functional.synctest",
+      "specs": {
+          "sata": {
+              "MOUNT_BLOCKDEV":"$SATA_DEV",
+              "MOUNT_POINT":"$SATA_MP",
+              "LEN":"10",
+              "LOOP":"10"
+          },
+          "mmc": {
+              "MOUNT_BLOCKDEV":"$MMC_DEV",
+              "MOUNT_POINT":"$MMC_MP",
+              "LEN":"10",
+              "LOOP":"10"
+          },
+          "usb": {
+              "MOUNT_BLOCKDEV":"$USB_DEV",
+              "MOUNT_POINT":"$USB_MP",
+              "LEN":"10",
+              "LOOP":"10"
+          },
+          "default": {
+              "MOUNT_BLOCKDEV":"ROOT",
+              "MOUNT_POINT":"$BOARD_TESTDIR/work",
+              "LEN":"30",
+              "LOOP":"10"
+          }
+      }
+  }
+
+
+Note the use of variables references for ``MOUNT_BLOCKDEV`` and
+``MOUNT_POINT``.  These use values ($SATA_DEV, $MMC_DEV or $USB_DEV) that
+should be defined in a board file for filesystem-related tests.
+
+When a test defines variables, they should be documented in the test's
+``test.yaml`` file.
+
+============
+Defaults
+============
+
+If a test has no ``spec.json``, then default set of values is used, which
+is a single spec with the name "default", and no values defined.
+
+============
+See also
+============
+
+ * See :ref:`Test Spec and Plans` for more information about
+   Fuego's test spec and testplan system.
+
diff --git a/docs/rst_src/test.yaml.rst b/docs/rst_src/test.yaml.rst
new file mode 100644
index 0000000..1db55f6
--- /dev/null
+++ b/docs/rst_src/test.yaml.rst
@@ -0,0 +1,177 @@
+############
+test.yaml
+############
+
+The ``test.yaml`` file is used to hold meta-information about a test.  This is
+used by the :ref:`Test package system`  for packaging a test and providing
+information for viewing and searching for tests in a proposed "test store".
+The ``test.yaml`` file can also can be used by human maintainers to preserve
+information (in a structured format) about a test, that is not included in the
+other test materials.
+
+As an overview, the ``test.yaml`` file indicates where the source for the
+test comes from, it's license, the name of the test maintainer, a
+description of the test and tags for categorizing the test, and a
+formal list of parameters that are used by the test (what they mean
+and how to use them).
+
+=====================
+test.yaml fields
+=====================
+
+Here are the fields supported in a ``test.yaml`` file:
+
+``fuego_package_version``
+
+  Indicates the version of package
+  (in case of changes to the package schema).  For now, this is always 1.
+
+``name``
+
+  Has the full Fuego name of the test.  Ex: Benchmark.iperf
+
+``description``
+
+  Has an English description of the test
+
+``license``
+
+  Has an SPDX identifier for the test.  This is the main
+  license of the test project that the Fuego test uses, if the project
+  has a tarfile or git repo.  Otherwise it reflects the license of any
+  non-Fuego-specific materials in the test directory.  In such case,
+  the test directory should include a LICENSE file.  Fuego materials
+  (``fuego_test.sh``, ``spec.json``, ``chart_config.json``, etc.) are
+  considered to be under the default Fuego license (which is BSD-3-Clause)
+  unless otherwise specifically indicated in these files.  The license
+  identifier for this field should be obtained from
+  `<https://spdx.org/licenses/>`_
+
+``author``
+
+  The author or authors of the base test
+
+``maintainer``
+
+  The maintainer of the Fuego materials for this test
+
+``version``
+
+  The version of the base test
+
+``fuego_release``
+
+  The version of Fuego materials for this test.  This is a monotonically
+  incrementing integer, starting at 1 for each new version of the base test.
+
+``type``
+
+  Either Benchmark or Functional
+
+``tags``
+
+  A list of tags used to categorize this test.  This is intended to be
+  used in an eventual online test store.
+
+``tarball_src``
+
+  A URL where the tarball was originally obtained from
+
+
+``gitrepo``
+
+  A git URL where the source may be obtained from
+
+``host_dependencies``
+
+  A list of Debian package names that must be installed in the docker
+  container in order for this test to work properly.  This field is
+  optional, and indicates packages needed that are beyond those included in
+  the standard Fuego host distribution in the Fuego docker container.
+
+``params``
+
+  A list of parameters that may be used with this test, including their
+  descriptions, whether they are optional or required, and an example
+  value for each one
+
+``data_files``
+
+  A list of the files that are included in this test.  This is used as the
+  manifest for packaging the test (``fuego_test.sh``, and ``test.yaml`` are
+  implicitly included in the packaging manifest).
+
+
+More on params
+===================
+
+The 'params' field in the test.yaml file is a list of dictionaries
+with one item per test variable used by the test.
+
+The name of the parameter is the short name of the parameter, without
+the test name prefix (e.g. FUNCTIONAL_LTP).  The parameter name is the
+key for the dictionary with that parameters attributes.
+
+Each parameter has a dictionary with attributes describing it.  The
+dictionary has the following fields (keys):
+
+ - 'description' - text description of the parameter
+ - 'example' - an example of the parameter
+ - 'optional' - indicates whether the test requires this parameter
+   (test variable) to be set or not.  The value of the 'optional'
+   field must be one of 'yes' or 'no'.
+
+The test variables may be described by the ``test.yaml`` file can be
+defined in one of multiple locations in the Fuego test system.  Most
+commonly the test variables are defined in a spec for the test, but
+they can also be defined in the board file, or as a dynamic board
+variable.
+
+=========
+Example
+=========
+
+Here is an example ``test.yaml`` file, for the package ``Benchmark.iperf3``:
+
+::
+
+  fuego_package_version: 1
+  name: Benchmark.iperf3
+  description: |
+      iPerf3 is a tool for active measurements of the maximum achievable
+      bandwidth on IP networks.
+  license: BSD-3-Clause.
+  author: |
+      Jon Dugan, Seth Elliott, Bruce A. Mah, Jeff Poskanzer, Kaustubh Prabhu,
+      Mark Ashley, Aaron Brown, Aeneas Jaißle, Susant Sahani, Bruce Simpson,
+      Brian Tierney.
+  maintainer: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
+  version: 3.1.3
+  fuego_release: 1
+  type: Benchmark
+  tags: ['network', 'performance']
+  tarball_src: https://iperf.fr/download/source/iperf-3.1.3-source.tar.gz
+  gitrepo: https://github.com/esnet/iperf.git
+  params:
+      - server_ip:
+          description: |
+              IP address of the server machine. If not provided, then SRV_IP
+              _must_ be provided on the board file. Otherwise the test will fail.
+              if the server ip is assigned to the host, the test automatically
+              starts the iperf3 server daemon. Otherwise, the tester _must_ make
+              sure that iperf3 -V -s -D is already running on the server machine.
+          example: 192.168.1.45
+          optional: yes
+      - client_params:
+          description: extra parameters for the client
+          example: -p 5223 -u -b 10G
+          optional: yes
+  data_files:
+      - chart_config.json
+      - fuego_test.sh
+      - parser.py
+      - spec.json
+      - criteria.json
+      - iperf-3.1.3-source.tar.gz
+      - reference.json
+      - test.yaml
-- 
2.7.4


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-12-07 21:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25  6:14 [Fuego] [PATCH] Docs: Convert tbwiki pages into .rst files Pooja
2020-12-02 21:45 ` Bird, Tim
2020-12-03 18:21   ` Pooja Sanjay More
2020-12-03 20:25     ` Bird, Tim
  -- strict thread matches above, loose matches on Subject: below --
2020-12-03  5:18 Pooja
2020-12-07 21:17 ` Bird, Tim
2020-11-20  5:31 [Fuego] [PATCH] Docs:Convert " Pooja
2020-11-23 21:50 ` Bird, Tim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.