mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
f48d6fc168
This is a preparatory work for the future requirement of running Python2/3 jobs simultaneously. Reviewed-By: Stanislav Laznicka <slaznick@redhat.com> Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
36 lines
873 B
Bash
Executable File
36 lines
873 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# NOTE: this script is intended to run in Travis CI only
|
|
|
|
PYTHON="/usr/bin/python${TRAVIS_PYTHON_VERSION}"
|
|
test_set=""
|
|
developer_mode_opt="--developer-mode"
|
|
|
|
if [[ "$TASK_TO_RUN" == "lint" ]]
|
|
then
|
|
if [[ "$TRAVIS_EVENT_TYPE" == "pull_request" ]]
|
|
then
|
|
git diff origin/$TRAVIS_BRANCH -U0 | pep8 --diff &> $PEP8_ERROR_LOG ||:
|
|
fi
|
|
|
|
# disable developer mode for lint task, otherwise we get an error
|
|
developer_mode_opt=""
|
|
fi
|
|
|
|
if [[ -n "$TESTS_TO_RUN" ]]
|
|
then
|
|
pushd ipatests
|
|
test_set=`ls -d -1 $TESTS_TO_RUN 2> /dev/null | tr '\n' ' '`
|
|
popd
|
|
fi
|
|
|
|
docker pull $TEST_RUNNER_IMAGE
|
|
|
|
ipa-docker-test-runner -l $CI_RESULTS_LOG \
|
|
-c $TEST_RUNNER_CONFIG \
|
|
$developer_mode_opt \
|
|
--container-environment "PYTHON=$PYTHON" \
|
|
--container-image $TEST_RUNNER_IMAGE \
|
|
--git-repo $TRAVIS_BUILD_DIR \
|
|
$TASK_TO_RUN $test_set
|