You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ma...@apache.org on 2019/02/14 17:38:32 UTC

[incubator-mxnet] branch master updated: Fixes installation nightly test by filtering out the git commands (#14144)

This is an automated email from the ASF dual-hosted git repository.

marcoabreu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new 074a859  Fixes installation nightly test by filtering out the git commands (#14144)
074a859 is described below

commit 074a859a00dfbcfae17e88b5d2c1b5d7dec71c74
Author: perdasilva <pe...@gmail.com>
AuthorDate: Thu Feb 14 18:38:16 2019 +0100

    Fixes installation nightly test by filtering out the git commands (#14144)
---
 tests/jenkins/run_test_installation_docs.sh | 31 +++++++++++++++++++++++++----
 1 file changed, 27 insertions(+), 4 deletions(-)

diff --git a/tests/jenkins/run_test_installation_docs.sh b/tests/jenkins/run_test_installation_docs.sh
index d25f1d5..4f62865 100755
--- a/tests/jenkins/run_test_installation_docs.sh
+++ b/tests/jenkins/run_test_installation_docs.sh
@@ -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.
+# 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
+# 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
@@ -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"
 
@@ -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"