14 Commits

Author SHA1 Message Date
William Douglas c712642011 Fix test processing
If a file addition only failure happens and a quick rebuilt is done,
the build log will be missing test results. Check the previous build
log in that case.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-01-21 11:42:56 -08:00
William Douglas 61af4ac6f5 pypi conversion test fixups 2022-01-12 04:44:34 -08:00
Patrick McCarty fd7da6cf6e Quieten test compilation for make-based patterns
For make-based patterns, the make command from %build is not verbose by
default, so remove the verbosity flags for the test compilation command
as well.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2020-07-31 11:09:30 -07:00
William Douglas 0e412270aa Re-organize buildpattern function into config
The buildpattern is a bit of an odd standalone module that was a
vestiage of the pre-refactor days where modules owned global
data. These days are coming to a close so move this data to a more
sensible owner in config.

This resolves #612 though likely more will be done as part of #131.
2020-04-17 13:49:33 -07:00
William Douglas 4f90794393 Move target directory to Config
Many different components require the target download path and it is
needed early. Previously code existed to attempt to autodetect its
location and so defining the path was enforced later in the build
process. This created problems with ordering functions based on this
requirement but since the target path is now certain to be defined at
startup (due to previous changes) we can better align the location and
initialization of the data to the Config class.

As part of this change also avoid requiring the temporary working
directory to be setup as part of the Build class. This is done as a
cleanup due to the only real user of this location being the Content
class.

This also drops the stand-alone pkg_integrety main function that was
initially used as a one off test to avoid needing to run autospec to
validate the integrity of a package. This feature was seldom used and
doesn't function well without handling configuration so it was
dropped.
2020-04-14 14:14:14 -07:00
William Douglas ebf0a6988d Refactor tarball to remove remaining globals
The tarball module had a number of globals that were referenced by
many other modules and has ordering dependencies with the config
module for some values. This made deciding on where certain values get
initialized difficult but before the initialization can be addressed a
refactor is helpful.

This change moves the global state (and functions that needed to
act on that global state) into a Content class. The goal of this work
is to better track what can be updated by a particular function, load
data in a sensible order and have it owned by a sensible component.

I expect that future work will see the tarball, buildpattern and some
portions of the config moved around to better match what component
should own what data (and to better deliniate between the data that
has a similar use but comes from different sources).
2020-03-30 13:08:05 -07:00
William Douglas 2a181a2ddb Refactor buildreq into a class
The buildreq module had a large number of globals being touched across
many modules that would import it. This made changes to the buildreq
fragile.

It also made testing fragile due to certain globals needing to be
reset in order to properly test a change.

This change moves the global state (and functions that needed to act
on that global state) into a Requirements class. The goal of this work
is to better track what content can be updated by a particular
function and load data in a sensible order and have it owned by a
sensible component.
2020-03-26 16:26:26 -07:00
William Douglas 54636b48dd Refactor the config into a class
The config module had a large amount of globals that were being
touched across many modules that would import. This made changes to
config very fragile as figuring out what would be modified in any
given call chain was difficult to diagnose.

It also made testing fragile as one would need to reset a given
module's config import to the best of their knowledge before rerunning
another test.

To get away from that (and to try and reduce the number of globally
modified variablies in autospec as a whole), refactor the config
module to provide its state as part config class. The long running
goal of changes like this is to better track what content can be
updated by a particular function (if a function would have access
to the config instance is now the hint rather than the config module
getting imported).
2020-03-24 18:05:27 -07:00
Juro Bystricky 54a94e123f support for openmpi sections
Initial support for concurrent serial and parallel build.
Parallel MPI build enabled via a new setting in "options.conf":
    openmpi = false|true (false is default)

 * Serial builds remain unaffected.
 * Parallel build: Only OpenMPI is supported.
 * Parallel builds always assume AVX2.
 * Build patterns implemented: "configure" and "cmake".
   The build process is controlled by additional files:
   "cmake_arg_openmpi": same functionality as "cmake_args"
   "configure_openmpi": same functionality as "configure"

The openmpi (configure, build, check, install) sections follow these steps:

module load openmpi
...[configure,build,install,check]
module unload openmpi

Once "openmpi=true", the packages "openmpi-dev", "modules" and "openssh"
are automatically added to BuildRequires. ("openssh" is generally required
to run any MPI test suites).

Packages created:
   foo-openmpi:    binaries, libraries, docs, ...
   foo-dev :       contains both serial and MPI devel. files
   foo-staticdev:  contains both serial and MPI devel. files
2020-03-10 10:49:37 -07:00
Patrick McCarty e283a7f24f Fix unit test failure
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2019-11-11 15:02:42 -08:00
Patrick McCarty e5bf1b99b7 tests: fix up mocks for open_auto() use
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2019-06-24 13:08:39 -07:00
William Douglas e87d067cb0 Fixups for pkg_integrity (and its tests)
Due to the test->check file rename, breakages in testing for
pkg_integrity were found. This uncovered actual problematic leftovers
in the GPGVerifier from the move to a stand alone download_file
function for all signatures.

Tests then needed to be updated to avoid running downloads as part of
their validation but we should add tests mocking the pycurl calls and
testing the rest of download_file at some point.
2018-11-07 11:22:36 -08:00
Patrick McCarty 7bcfce2e1a tests: properly restore count.parse_log() in check.py tests
This fixes the new count.py test failures introduced by test reordering,
a side effect from the test.py -> check.py renaming.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-11-07 11:22:36 -08:00
Patrick McCarty e0f0bd098d Rename test.py to check.py
Because the Python standard library provides a package named "test",
pep8 thinks autospec is using it, but really it's importing
autospec/test.py. Rename test.py to check.py to avoid this issue and
tidy up the imports more.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-11-07 11:22:36 -08:00