Generic tool for software builds and deliverable package generation.
Documentation: ABS manual. .
ABS is designed by a lazy coder, for lazy coders.
Never add to revision control:
.abs
,
abs-cache
,
local.cfg
: ABS local copy and configuration
build
: workspace build output directory
dist
: deliverable packages output directory
Project configuration files:
app.cfg
: application level configuration parameters
module.cfg
: module level configuration parameters
Application level
Parameter | Value | Description |
---|---|---|
APPNAME | string | Application name |
VERSION | X.Y.Z | Application version |
USELIB | string | Dependencies (libA-X.Y.Z libB-X.Y.Z etc) |
EXPMOD | string | List of "public" modules |
VABS, ABS_REPO | X.Y, URL | Version of ABS to use, ABS download repository location |
Module level
Parameter | Value | Description |
---|---|---|
MODNAME | string | Module name |
MODTYPE | exe / library / fileset / ... | Module type |
USEMOD | string | list of required modules from the same application |
LINKLIB | string | Libraries to link with (use short name: foo for libfoo.so) |
Application level:
Target | Description |
---|---|
all | Default target: build all modules (all target of each module) |
clean | Clean all outputs (delete build and dist directories) |
dist | Build the library deliverable package |
distinstall | Build the application installation package, including all dependencies. |
Module level:
Target | Description |
---|---|
all | Build the module |
clean | Delete the build outputs (related to the module only) |
run | Launch application (when module is an executable or a lua binded library) |
test | build and run unit tests |
Checkout abs:
$ cd <workspace>
$ git clone https://github.com/seeduvax/AcrobatomaticBuildSystem.git --single-branch -b abs-3.1 abs-3.1
$ cd abs-3.1/sampleprj
Build project, run some tests...
Edit configuration parameters from
app.cfg
and
module.cfg
files and see what happens...
Do not commit, sampleprj is used for ABS validation.
Go back to the project root and remove your local changes
Build installation package and install software to a temporary location
Explore installation and launch installed application
Installed application file layout is a standard unix layout.
No need to set library search path, search path is embedded in the built binaries.
Application level
Target | Argument | Description |
---|---|---|
newmod | <module name> | Create a new empty module |
test | Launch all modules' unit tests | |
cint | Full build, test and packaging (designed to be used from jenkins) |
Module level
Target | Argument | Description |
---|---|---|
newclass | <class name> | Create a new class (for C/C++/Java modules) |
newtest | <class name> | Create a new Test for the given class name. |
debug | Run application from gdb | |
debugtest | Run unit tests from gdb | |
help | display online help | |
checkdep | display application dependency graph |
Perform the following steps:
APPNAME
,
VERSION
,
VABS
,
ABS_REPO
Makefile
in the directory.
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
#include "BuildScriptTester/cpplib/Example.hpp"
using namespace BuildScriptTester::cpplib;
namespace test {
class TestExample: public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE( TestExample );
CPPUNIT_TEST( testCaseSuccess );
CPPUNIT_CONDITIONAL_TEST( IS_INTERACTIVE , testCaseFail );
CPPUNIT_TEST_SUITE_END();
public:
void setUp() {
}
void tearDown() {
}
void testCaseSuccess() {
std::cout << "in test case" << std::endl;
CPPUNIT_ASSERT_EQUAL(1,1);
}
void testCaseFail() {
CPPUNIT_ASSERT_EQUAL(0,1);
}
};
CPPUNIT_TEST_SUITE_REGISTRATION(TestExample);
} // namespace test
Test implementation steps:
CPPUNIT_ASSERT
macros to check tested methods and functions output values.
Test tips:
T_
prefix for test only modules.
CPPUNIT_CONDITIONAL_TEST
declaration test (not available with original cppunit), to trigger test execution on particular condition. Use it to disable test in jenkins where user inputs or specific hardware are not available.
TRDIR
(build root),
TTARGETDIR
(module test output directory) environment variable to retrieve the right path from inside your test.
Short naming:
appname
instead of
appname_modname
).
Project documents can be managed as any source code file:
_doc
module to store the documents.
_doc/src
directory.
MODTYPE
to
doc
in the
_doc
module configuration file.
make
from your
_doc
module to generate
html
and
pdf
files from your
heml
sources.
Current presentation has been written using this feature!
Edit and render
heml
example from
sampleprj
:
Document header:
Sections:
Figures:
In line diagrams using plantUml :
Paragraph, bullet lists: