-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve: remove the bisect_ppx dependency and clean Makefile (#1005)
* Cleanup Makefile Remove `dune-workspace` generation Don't use paths to `_build` Remove bisect support Remove plugin code from dune file * Cleanup .gitignore * Don't build whole package * test-extra: Remove unused code * test_branch: Use temporary worktree * Add -noassert in release mode * Remove dependency to bisect_ppx * Add placeholder for bisect ppx * Add tools/bisect.sh
- Loading branch information
Showing
10 changed files
with
104 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
.merlin | ||
/_build | ||
/dune-workspace | ||
/ocamlformat.install | ||
/ocamlformat_diff.install | ||
/ocamlformat_reason.install | ||
/src/mod_dep.dot | ||
/test-extra/code | ||
/test-extra/bisect*out | ||
/test/bisect*out | ||
/bisect*out | ||
/_coverage | ||
_opam | ||
/vendor/ocamlformat_support/ocamlformat_support.install | ||
/_opam | ||
/coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env bash | ||
|
||
###################################################################### | ||
# # | ||
# OCamlFormat # | ||
# # | ||
# Copyright (c) 2017-present, Facebook, Inc. All rights reserved. # | ||
# # | ||
# This source code is licensed under the MIT license found in the # | ||
# LICENSE file in the root directory of this source tree. # | ||
# # | ||
###################################################################### | ||
|
||
# usage: bisect.sh [<rev>] | ||
# | ||
# The first arg is the revision to test. By default HEAD. | ||
# | ||
# Run the testsuite with ppx_bisect enabled. | ||
|
||
set -e | ||
|
||
if [[ ! -z "$1" ]]; then | ||
branch="$1" | ||
else | ||
branch=$(git rev-parse HEAD) | ||
fi | ||
|
||
tmp=`mktemp -d` | ||
git worktree add --detach "$tmp" "$branch" | ||
|
||
sed -i 's/;;INSERT_BISECT_HERE;;/(preprocess (pps bisect_ppx))/' "$tmp/src/dune" | ||
|
||
# Run the tests | ||
make -C "$tmp" test | ||
|
||
dst="coverage" | ||
bisect-ppx-report -I "$tmp/_build/default" -html "$dst" `find "$tmp" -name 'bisect*.out'` | ||
echo "Coverage report generated in $dst/" | ||
echo " => open $dst/index.html" | ||
|
||
git worktree remove -f "$tmp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters