From 6e0df82a7510bb43d64569689342e871ad8362eb Mon Sep 17 00:00:00 2001 From: Douglas RAILLARD Date: Thu, 31 Jan 2019 12:44:40 +0000 Subject: [PATCH] doc: Make conf.py friendlier to RTD Since RTD fails to import lisa for unknown reason, even if it shares the same venv, move the sys.path update before `import lisa`. --- doc/conf.py | 11 ++++++----- external/devlib/devlib/bin/scripts/shutils.in | 4 +--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index c835da8ff..a58e1e426 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -26,6 +26,12 @@ from docutils import nodes from sphinx.util.docfields import TypedField from sphinx import addnodes +# This shouldn't be needed, as using a virtualenv + setup.py should set up the +# sys.path correctly. However that seems to be half broken on ReadTheDocs, so +# manually set it here +sys.path.insert(0, os.path.abspath('../')) + +# Import our packages after modifying sys.path import lisa # This ugly hack is required because by default TestCase.__module__ is @@ -76,11 +82,6 @@ def patched_make_field(self, types, domain, items, env=None): TypedField.make_field = patched_make_field -# This shouldn't be needed, as using a virtualenv + setup.py should set up the -# sys.path correctly. However that seems to be half broken on ReadTheDocs, so -# manually set it here -sys.path.insert(0, os.path.abspath('../')) - # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. diff --git a/external/devlib/devlib/bin/scripts/shutils.in b/external/devlib/devlib/bin/scripts/shutils.in index e230229e1..149bc8ffc 100755 --- a/external/devlib/devlib/bin/scripts/shutils.in +++ b/external/devlib/devlib/bin/scripts/shutils.in @@ -271,9 +271,7 @@ read_tree_tgz_b64() { # 'tar' doesn't work as expected on debugfs, so copy the tree first to # workaround the issue cd $BASEPATH - for CUR_FILE in $($BUSYBOX find . -follow -type f -maxdepth $MAXDEPTH); do - $BUSYBOX cp --parents $CUR_FILE $TMP_FOLDER/ 2> /dev/null - done + $BUSYBOX find . -follow -type f -maxdepth $MAXDEPTH -print0 | $BUSYBOX xargs -0 -I '{}' -n 999999 $BUSYBOX cp --parents '{}' $TMP_FOLDER/ 2> /dev/null cd $TMP_FOLDER $BUSYBOX tar cz * 2>/dev/null | $BUSYBOX base64 -- GitLab