#!/usr/bin/env bash

source scripts/prepare-ci-environment.sh

if [[ $IJ_ULTIMATE == "true" ]]; then
  export TEST_SET="integration"
fi

rm -rf $IDEA_TEST_HOME
mkdir -p $IDEA_TEST_HOME

pushd .cache
pushd pants
if [ -z ${PANTS_SHA+x} ]; then
  echo "Pulling the latest master..."
  git pull
else
  echo "Using $PANTS_SHA..."
  git reset --hard $PANTS_SHA
fi
popd
popd

args="test tests:${TEST_SET:-all} $(append_intellij_jvm_options test-junit) $@"

echo "Running ./pants $args"
./pants $args
#!/usr/bin/env bash

source scripts/prepare-ci-environment.sh

if [[ $IJ_ULTIMATE == "true" ]]; then
  export TEST_SET="integration"
fi

rm -rf $IDEA_TEST_HOME
mkdir -p $IDEA_TEST_HOME

pushd .cache
pushd pants
if [ -z ${PANTS_SHA+x} ]; then
  echo "Pulling the latest master..."
  git pull
else
  echo "Using $PANTS_SHA..."
  git reset --hard $PANTS_SHA
fi
popd
popd

args="test tests:${TEST_SET:-all} $(append_intellij_jvm_options test-junit) ${ADDITIONAL_ARGS:-$@}"

echo "Running ./pants $args"
./pants $args

Add an env variable to control running tests from travis ui
Add an env variable to control running tests from travis ui

While working on https://github.com/pantsbuild/intellij-pants-plugin/issues/130,
there were tests mysteriously failing, running the entire test suite takes 20minutes
and is not reproducible locally, this allows us to better reproduce problems on travis.

Testing Done:
Tried in CI, an example usage is to set `ADDITIONAL_ARGS` to a small set of tests, like

`"--test-junit-test=com.twitter.intellij.pants.completion.PantsCompletionTest --test-junit-test=com.twitter.intellij.pants.components.impl.PantsProjectCacheTest --test-junit-test=com.twitter.intellij.pants.execution.OSSPantsExamplesRunConfigurationIntegrationTest --test-junit-test=com.twitter.intellij.pants.execution.PantsOutputMessageTest --test-junit-test=com.twitter.intellij.pants.highlighting.PantsHighlightingIntegrationTest --test-junit-test=com.twitter.intellij.pants.highlighting.PantsUnresolvedJavaReferenceQuickFixProviderTest --test-junit-test=com.twitter.intellij.pants.highlighting.PantsUnresolvedScalaReferenceQuickFixProviderTest"`

Bugs closed: 131

Reviewed at https://rbcommons.com/s/twitter/r/3824/
