Check whether some example programs can be compiled and built
Project description
check-build -- check whether example programs can be built
The check-build
tool can be used to build and test different
programs in a temporary build directory. The programs are listed in
a TOML configuration file, along with the commands to build and
test them.
Configuration file structure
The file describing the subdirectories with the programs to be built has the following structure:
The "format" section
The format
section contains a single table named version
with two
keys, major
and minor
, both integers. The major.minor
pair
specifies the version of the format specification for the programs.toml
file itself.
The only valid combination of values is major = 0
and minor = 1
.
The "program" section
This table contains the definitions for the programs that check-build
should try to build and run. It may have one or more entries with
names corresponding to the names of the subdirectories where the files for
each program may be found.
The "program.NAME.prerequisites" section
This table currently only has a single valid key, programs
: a list of
program names that will be looked for in the current execution search path.
If any of these prerequisites are not met, check-build
will not
attempt to build the program, but it will report it as skipped, not failed.
This may be overridden by the --force
command-line option
(or the check_build.defs.Config.force
boolean variable): if it is
specified, then check-build
will attempt to build and run the program
even if some of its prerequisites are not met.
The "program.NAME.commands" section
This table contains the lists of commands to be executed in order to build and test the program. Each value is a list of commands to be executed, and each command in its turn is a list of strings: a program name and arguments to pass to it.
There are currently three valid keys in this table:
clean
: not used yet, sincecheck-build
always copies the program files to a newly-created temporary directory, so there should be no previously-existing build artifactsbuild
: one or more commands to execute to build the programtest
: one or more commands to execute to make sure that the program that was just built is operational and correct
The check-build
command-line tool
The most common way to use check-build
is through the command-line tool:
run check-build
, specify the path to the TOML configuration file using
the -c
option, optionally pass the -v
/ --verbose
flag. By default,
the check-build
tool will try to build and test all the programs
defined in the configuration file; pass one or more program names on
the command line to only build and test those.
Examples
Given the following contents of the ztest/programs.toml
configuration file:
[format.version]
major = 0
minor = 1
[program.pkg-make]
executable = "ztest"
[program.pkg-make.commands]
clean = [["make", "clean"]]
build = [["make"]]
test = [["make", "test"]]
[program.cmake]
executable = "ztest"
[program.cmake.commands]
clean = [["make", "clean"]]
build = [["cmake", "."], ["make"]]
test = [["./ztest"]]
Build and test both programs:
check-build -c ztest/programs.toml
Only build and test the CMake version with some check-build
diagnostic messages:
check-build -c ztest/programs.toml -v cmake
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file check_build-0.1.0.tar.gz
.
File metadata
- Download URL: check_build-0.1.0.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc33a1c8efe229c27e0635d43e83c389b0044167f19b8c0ed93c4ebad2c0e23b |
|
MD5 | 8c79f479a614413011743e7ce79cca99 |
|
BLAKE2b-256 | fa0718a230e36fa5d162b6dcd530342d86534662452d68b773ec298248770268 |
File details
Details for the file check_build-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: check_build-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48a2da884e54501c3e87d5c1f2be79435a8f1d8770d862bb49c376808f2c355e |
|
MD5 | 1c02a8b480889784f86e9231a55ba795 |
|
BLAKE2b-256 | daccbc9f084e794ac0160698cbb24eb81ac789c0be0c5022d76a75d8b426a8e9 |