#!/bin/bash -e

PLATFORM=$(uname -s || echo unknown)
ARCH=$(uname -m || echo unknown)
INSTALL_DIR="$HOME/.flow_cache/ocaml-${OCAML_VERSION}_opam-${OPAM_VERSION}_${PLATFORM}-${ARCH}"
export PATH="$INSTALL_DIR/usr/bin:$PATH"
export OPAMROOT="$INSTALL_DIR/.opam"
eval "$(opam config env)"

printf "Using ocaml %s from %s\n  and opam %s from %s\n" \
  "$(ocaml -vnum)" "$(which ocaml)" \
  "$(opam --version)" "$(which opam)"

printf "travis_fold:start:make\nBuilding flow\n"
make
printf "travis_fold:end:make\n"

printf "travis_fold:start:make_js\nBuilding flow.js\n"
make js
printf "travis_fold:end:make_js\n"

printf "travis_fold:start:runtests\nRunning flow tests\n"
./runtests.sh bin/flow
printf "travis_fold:end:runtests\n"

printf "travis_fold:start:run_tool_test\nRunning tool test\n"
./tool test | cat # Force no tty mode
printf "travis_fold:end:run_tool_test\n"

printf "travis_fold:start:run_parser_tests\nRunning parser tests\n"
(cd src/parser && make test)
printf "travis_fold:end:run_parser_tests\n"

#!/bin/bash -e

PLATFORM=$(uname -s || echo unknown)
ARCH=$(uname -m || echo unknown)
INSTALL_DIR="$HOME/.flow_cache/ocaml-${OCAML_VERSION}_opam-${OPAM_VERSION}_${PLATFORM}-${ARCH}"
export PATH="$INSTALL_DIR/usr/bin:$PATH"
export OPAMROOT="$INSTALL_DIR/.opam"
eval "$(opam config env)"

printf "Using ocaml %s from %s\n  and opam %s from %s\n" \
  "$(ocaml -vnum)" "$(which ocaml)" \
  "$(opam --version)" "$(which opam)"

printf "travis_fold:start:make\nBuilding flow\n"
make
printf "travis_fold:end:make\n"

printf "travis_fold:start:make_js\nBuilding flow.js\n"
make js
printf "travis_fold:end:make_js\n"

printf "travis_fold:start:runtests\nRunning flow tests\n"
FLOW_RUNTESTS_PARALLELISM=4 ./runtests.sh bin/flow
printf "travis_fold:end:runtests\n"

printf "travis_fold:start:run_tool_test\nRunning tool test\n"
./tool test | cat # Force no tty mode
printf "travis_fold:end:run_tool_test\n"

printf "travis_fold:start:run_parser_tests\nRunning parser tests\n"
(cd src/parser && make test)
printf "travis_fold:end:run_parser_tests\n"

Reduce the runtests parallelism from 16 to 4
Reduce the runtests parallelism from 16 to 4

Summary: Closes https://github.com/facebook/flow/pull/1842

Differential Revision: D3343793

Pulled By: gabelevi

fbshipit-source-id: 2f928f5fb7290c755dc9fa59814859fbed6d20ee
