samedi 9 novembre 2019

Running command in the background using tox

I am trying to implement an additional CI procedure for an existing opensource product and I stuck into a problem, I have no idea how to solve it.

Ther idea behind the procedure is next.

  • Documentation generated by mkdocs and mkdocs reporting (and failing) if any warnings issued.
  • mkdocs running with serve subcommand in the background (similar to running in back with & at the end) - this is creating webserver at http://127.0.0.1:8080 with documentation.
  • my test/tool checking running server and documentation it's serving.

Question

How can I keep mkdocs running in background using tox? I need to keep it working while my tool doing own tests.

I have attempt already to do next things:

  • to use bash and run a command as
bash -c 'mkdocs serve --theme readthedocs'

it's not failing, website not accessible.

  • next command failing to run with
mkdocs serve --theme readthedocs 2>&1 > /dev/null &

PS: * https://www.mkdocs.org/ is a documentation generator. * my took is a simple content checker.

Aucun commentaire:

Enregistrer un commentaire