diff options
author | ps-george <george.punter15@imperial.ac.uk> | 2018-03-09 15:15:52 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-09 15:15:52 +0000 |
commit | bd580742afbf81d2831c434f58085524a474a1dd (patch) | |
tree | 02f70967ab757a46e15876bb98aad528132d84bb /build.sh | |
parent | 47d1e038452df937dddee2cff99d64dfa07f3f4f (diff) | |
download | FMark-bd580742afbf81d2831c434f58085524a474a1dd.tar.gz FMark-bd580742afbf81d2831c434f58085524a474a1dd.zip |
Build update (#83)
* Adding `-b testall` option to build.sh which runs each module individually.
* commenting out property based test, it can cause unexpected errors in CI
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 20 |
1 files changed, 17 insertions, 3 deletions
@@ -11,7 +11,7 @@ function print_help { echo "" echo "OPTIONS:" echo " -b/--build Build a specific project, can be set to" - echo " fsharp, js, all" + echo " fsharp, js, all, testall" exit 1 } @@ -36,7 +36,7 @@ if [[ -z $BUILD ]]; then BUILD=all fi -if [[ $BUILD != "fsharp" ]] && [[ $BUILD != "js" ]] && [[ $BUILD != "all" ]]; then +if [[ $BUILD != "fsharp" ]] && [[ $BUILD != "js" ]] && [[ $BUILD != "all" ]] && [[ $BUILD != "testall" ]]; then print_help fi @@ -54,7 +54,21 @@ else BASE_DIR=$TRAVIS_BUILD_DIR fi -if [[ $BUILD = "all" ]] || [[ $BUILD = "fsharp" ]]; then +function cd_run_module() { + echo "########## Running $1 module tests ###########" + cd $BASE_DIR/FMark/src/Common/$1 + dotnet build + dotnet run --no-build +} + +if [[ $BUILD = "testall" ]]; then + modules=("Lexer" "TOCite" "Markalc" "Parser" "HTMLGen" "MarkdownGen") + for i in "${modules[@]}"; do + cd_run_module $i + done +fi + +if [[ $BUILD = "testall" ]] || [[ $BUILD = "all" ]] || [[ $BUILD = "fsharp" ]]; then echo "Running F# tests" cd $BASE_DIR/FMark/src/FMarkCLI dotnet build |