Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
batmen
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sepia-pub
mael
batmen
Commits
ec65bfd2
Commit
ec65bfd2
authored
5 years ago
by
Millian Poquet
Browse files
Options
Downloads
Patches
Plain Diff
[nix] support coverage option
parent
ed89cc47
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
release.nix
+17
-0
17 additions, 0 deletions
release.nix
with
17 additions
and
0 deletions
release.nix
+
17
−
0
View file @
ec65bfd2
...
...
@@ -2,6 +2,7 @@
(
fetchTarball
"https://github.com/oar-team/kapack/archive/master.tar.gz"
)
{}
,
doCheck
?
false
,
doCoverage
?
true
,
batsim
?
kapack
.
batsim
,
batsim_dev
?
kapack
.
batsim_dev
,
batexpe
?
kapack
.
batexpe
...
...
@@ -11,6 +12,7 @@ let
pkgs
=
kapack
.
pkgs
;
pythonPackages
=
pkgs
.
python37Packages
;
buildPythonPackage
=
pythonPackages
.
buildPythonPackage
;
optionOnOff
=
option
:
"
${
if
option
then
"on"
else
"off"
}
"
;
jobs
=
rec
{
# Batsched executable file (built from local sources)
...
...
@@ -24,12 +26,19 @@ let
"^src/external/.*
\.
?pp"
"^meson
\.
build"
];
mesonFlags
=
[]
++
pkgs
.
lib
.
optional
doCoverage
[
"-Db_coverage=true"
];
nativeBuildInputs
=
with
kapack
;
[
pkgs
.
meson
pkgs
.
ninja
pkgs
.
pkgconfig
pkgs
.
boost
gmp
rapidjson
intervalset
loguru
redox
pkgs
.
cppzmq
pkgs
.
zeromq
];
# Debug build, without any Nix stripping magic.
mesonBuildType
=
"debug"
;
hardeningDisable
=
[
"all"
];
dontStrip
=
true
;
# Keep files generated by GCOV, so depending jobs can use them.
postInstall
=
pkgs
.
lib
.
optionalString
doCoverage
''
mkdir -p $out/gcno
cp batsched@exe/*.gcno $out/gcno/
''
;
});
# Batsched integration tests.
...
...
@@ -47,7 +56,13 @@ let
buildInputs
=
with
pkgs
.
python37Packages
;
[
batsim
batsched
batexpe
pkgs
.
redis
pytest
pytest_html
pandas
];
preBuild
=
pkgs
.
lib
.
optionalString
doCoverage
''
mkdir -p gcda
export GCOV_PREFIX=$(realpath gcda)
export GCOV_PREFIX_STRIP=5
''
;
buildPhase
=
''
runHook preBuild
set +e
(cd test && pytest -ra --html=../report/pytest_report.html)
echo $? > ./pytest_returncode
...
...
@@ -64,6 +79,8 @@ let
installPhase
=
''
mkdir -p $out
mv ./report/* ./pytest_returncode $out/
''
+
pkgs
.
lib
.
optionalString
doCoverage
''
mv ./gcda $out/
''
;
};
# Essentially the same as integration_tests, but with an up-to-date Batsim.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment