Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@ language: c
sudo: false
services:
- docker
install: wget https://raw.githubusercontent.com/ocaml/ocaml-travisci-skeleton/master/.travis-docker.sh
install:
- wget https://raw.githubusercontent.com/ocaml/ocaml-travisci-skeleton/master/.travis-docker.sh
- wget https://raw.githubusercontent.com/xapi-project/xapi-travis-scripts/master/coverage.sh
script: bash -ex ./.travis-docker.sh
env:
global:
- PINS="stdext:. xapi-stdext:. xapi-stdext-base64:. xapi-stdext-bigbuffer:. xapi-stdext-date:. xapi-stdext-deprecated:. xapi-stdext-encodings:. xapi-stdext-monadic:. xapi-stdext-pervasives:. xapi-stdext-range:. xapi-stdext-std:. xapi-stdext-threads:. xapi-stdext-unix:. xapi-stdext-zerocheck:."
- DISTRO="centos-7"
- TESTS=false
- DISTRO="ubuntu-16.04"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really would like to keep centos-7... We should rethink our whole CI to use xs-opam:latest as a base...

Copy link
Contributor Author

@gaborigloi gaborigloi Apr 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not work because it was impossible to isntall the real aspcud in the docker image, even POST_INSTALL_HOOK didn't work :(

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I understand. I am still wishful

- TEST=false
- BASE_REMOTE="https://github.com/xapi-project/xs-opam"
matrix:
- PACKAGE=xapi-stdext OCAML_VERSION=4.04.2 REVDEPS=true
- PACKAGE=xapi-stdext OCAML_VERSION=4.04.2 REVDEPS=true \
POST_INSTALL_HOOK="opam install alcotest; env TRAVIS=$TRAVIS TRAVIS_JOB_ID=$TRAVIS_JOB_ID bash -ex coverage.sh"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure about discovering the coverage of this library... ;-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be 99% because we only track stdext-encodings :D

- PACKAGE=stdext OCAML_VERSION=4.04.2 REVDEPS=true
- PACKAGE=xapi-stdext OCAML_VERSION=4.06.0
branches:
only: master
matrix:
fast_finish: true
allow_failures:
Expand Down
20 changes: 17 additions & 3 deletions lib/xapi-stdext-encodings/jbuild
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
(* -*- tuareg -*- *)
#require "unix"

let coverage_rewriter ~full =
let is_coverage = try Unix.getenv "BISECT_ENABLE" = "YES" with Not_found -> false in
match is_coverage, full with
| true, true -> "(preprocess (pps (bisect_ppx -conditional)))"
| true, _ -> "bisect_ppx -conditional"
| _ -> ""

let () = Printf.ksprintf Jbuild_plugin.V1.send {|
(jbuild_version 1)

(library
((name xapi_stdext_encodings)
(public_name xapi-stdext-encodings)
))
((name xapi_stdext_encodings)
(public_name xapi-stdext-encodings)
%s
)
)
|} (coverage_rewriter ~full:true)
11 changes: 11 additions & 0 deletions lib_test/jbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
(executable
((name suite)
(libraries
(alcotest
xapi_stdext_encodings))
))

(alias
((name runtest)
(deps (suite.exe))
(action (run ${<}))))
5 changes: 5 additions & 0 deletions lib_test/suite.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

let () =
Alcotest.run
"suite"
[ "Test_encodings", Test_encodings.tests ]
Loading