Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Fixes installation nightly test #14144

Merged
merged 1 commit into from
Feb 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions tests/jenkins/run_test_installation_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,29 @@ function set_instruction_set() {
${sorted_indexes[$end_buildfromsource_command_index]})
}

# given a $buildfromsource_commands string, filter out any build commands that should not be executed
# during the build from source tests. An example, the build from source instructions include the commands:
# $ git clone --recursive https://github.com/apache/incubator-mxnet
# $ cd incubator-mxnet
# if these commands get executed in the jenkins job, we will be testing the build from source instructions
# against the master branch and not against the version of the repository that Jenkins checksout for testing.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: checks out

# This presents a particularly big problem for the version branches and their nightly builds. Because,
# we would, in effect, be testing the build from source instructions for one version of MXNet against
# the master branch.
# in this function we target the commands cited in the example above, but leave it open for expantion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: "In" "explanation"

# in the future.
# See also gh issue: https://github.com/apache/incubator-mxnet/issues/13800
function filter_build_commands() {
filtered_build_commands="${1}"

# Remove git commands
filtered_build_commands=`echo "${filtered_build_commands}" | perl -pe 's/git .*?;//g'`

# Remove 'cd incubator-mxnet'
filtered_build_commands=`echo "${filtered_build_commands}" | perl -pe 's/cd incubator-mxnet;//'`

echo "${filtered_build_commands}"
}

########################LINUX-PYTHON-CPU############################
echo
Expand Down Expand Up @@ -302,8 +325,8 @@ ubuntu_python_cpu_source()
set -e
echo
echo "### Testing Build From Source ###"
echo "${buildfromsource_commands}"
echo
buildfromsource_commands=$(filter_build_commands "${buildfromsource_commands}")
echo ${buildfromsource_commands}
eval ${buildfromsource_commands}
echo "ubuntu_python_cpu_source: MXNet Installed Successfully"

Expand Down Expand Up @@ -363,8 +386,8 @@ ubuntu_python_gpu_source()
set -e
echo
echo "### Testing Build From Source ###"
echo "${buildfromsource_commands}"
echo
buildfromsource_commands=$(filter_build_commands "${buildfromsource_commands}")
echo ${buildfromsource_commands}
eval ${buildfromsource_commands}
echo "ubuntu_python_gpu_source: MXNet Installed Successfully"

Expand Down