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

Commit

Permalink
Fixes installation nightly test by filtering out the git commands
Browse files Browse the repository at this point in the history
  • Loading branch information
perdasilva committed Feb 13, 2019
1 parent 45978a9 commit 9e87d64
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 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,20 @@ function set_instruction_set() {
${sorted_indexes[$end_buildfromsource_command_index]})
}

# given a build commands string, filter any build commands that ought not be executed
# during the test. An example would be git clone'ing the mxnet repository. You want to
# run the tests against the current commit being tested in Jenkins.
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 +316,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 +377,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

0 comments on commit 9e87d64

Please sign in to comment.