From b99ec0587f7be6561d03d68121a8ee69ebf3d1c5 Mon Sep 17 00:00:00 2001 From: Joseph Hamman Date: Tue, 31 Jul 2018 11:07:59 -0700 Subject: [PATCH] add start script test --- tests/venv/start/postBuild/README.rst | 8 ++++++++ tests/venv/start/postBuild/postBuild | 2 ++ tests/venv/start/postBuild/requirements.txt | 1 + tests/venv/start/postBuild/start | 5 +++++ tests/venv/start/postBuild/verify | 9 +++++++++ 5 files changed, 25 insertions(+) create mode 100644 tests/venv/start/postBuild/README.rst create mode 100755 tests/venv/start/postBuild/postBuild create mode 100644 tests/venv/start/postBuild/requirements.txt create mode 100644 tests/venv/start/postBuild/start create mode 100755 tests/venv/start/postBuild/verify diff --git a/tests/venv/start/postBuild/README.rst b/tests/venv/start/postBuild/README.rst new file mode 100644 index 00000000..1a9851f3 --- /dev/null +++ b/tests/venv/start/postBuild/README.rst @@ -0,0 +1,8 @@ +System - Post-build scripts +--------------------------- + +It is possible to run scripts after you've built the environment specified in +your other files. This could be used to, for example, download data or run +some configuration scripts. + +In this example, we download and install a Jupyter Notebook extension. diff --git a/tests/venv/start/postBuild/postBuild b/tests/venv/start/postBuild/postBuild new file mode 100755 index 00000000..28b840f0 --- /dev/null +++ b/tests/venv/start/postBuild/postBuild @@ -0,0 +1,2 @@ +#!/bin/bash +jupyter nbextension enable --py --sys-prefix ipyleaflet diff --git a/tests/venv/start/postBuild/requirements.txt b/tests/venv/start/postBuild/requirements.txt new file mode 100644 index 00000000..5a2f5096 --- /dev/null +++ b/tests/venv/start/postBuild/requirements.txt @@ -0,0 +1 @@ +ipyleaflet diff --git a/tests/venv/start/postBuild/start b/tests/venv/start/postBuild/start new file mode 100644 index 00000000..c458c91a --- /dev/null +++ b/tests/venv/start/postBuild/start @@ -0,0 +1,5 @@ +#!/bin/bash + +export TEST_START_VAR="var is set" + +exec "$@" diff --git a/tests/venv/start/postBuild/verify b/tests/venv/start/postBuild/verify new file mode 100755 index 00000000..cc0d9ea7 --- /dev/null +++ b/tests/venv/start/postBuild/verify @@ -0,0 +1,9 @@ +#!/bin/bash +set -euo pipefail +jupyter nbextension list | grep 'jupyter-leaflet' | grep enabled + +if [ "$TEST_START_VAR" != "var is set" ] +then + echo "TEST_START_VAR is not set" + exit 1 +fi