diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index ffedfe8..21c4de5 100644 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -55,18 +55,43 @@ cmake ..\ ## if [[ $CONFIGURE_ONLY == 0 ]]; then - # BUILD + ## + ## BUILD + ## make -j${CPU_COUNT} - + + ## + ## INSTALL + ## # "install" to the build prefix (conda will relocate these files afterwards) make install # For debug builds, this symlink can be useful... #cd ${PREFIX}/lib && ln -s libdvidcpp-g.${DYLIB_EXT} libdvidcpp.${DYLIB_EXT} && cd - + ## + ## TEST + ## if [[ -z "$SKIP_LIBDVID_TESTS" || "$SKIP_LIBDVID_TESTS" == "0" ]]; then echo "Running build tests. To skip, set SKIP_LIBDVID_TESTS=1" - + + # Launch dvid + echo "Starting test DVID server..." + dvid -verbose serve ${RECIPE_DIR}/dvid-testserver-config.toml & + DVID_PID=$! + + sleep 5; + if [ ! pgrep -x > /dev/null ]; then + 2>&1 echo "*****************************************************" + 2>&1 echo "Unable to start test DVID server! " + 2>&1 echo "Do you already have a server runnining on port :8000?" + 2>&1 echo "*****************************************************" + exit 2 + fi + + # Kill the DVID server when this script exits + trap 'kill -TERM $DVID_PID' EXIT + # This script runs 'make test', which uses the build artifacts in the build directory, not the installed files. # Therefore, they haven't been post-processed by conda to automatically locate their dependencies. # We'll set LD_LIBRARY_PATH to avoid errors from ld diff --git a/conda-recipe/dvid-testserver-config.toml b/conda-recipe/dvid-testserver-config.toml new file mode 100644 index 0000000..0cec5c5 --- /dev/null +++ b/conda-recipe/dvid-testserver-config.toml @@ -0,0 +1,28 @@ +# Example simple configuration for DVID with single database backend. +# See config-multidb.toml for full range of configurations including +# email notifications, authentication, and backend assignments. + +[server] +# host = "mygreatserver.test.com" # Lets you specify a user-friendly alias for help messages. +httpAddress = "localhost:8000" +rpcAddress = "localhost:8001" +webClient = "./http/dvid-web-console" + +[logging] +logfile = "/tmp/dvid.log" +max_log_size = 500 # MB +max_log_age = 30 # days + +# If no backend is specified, DVID will return an error unless there is only +# one store, which will automatically be backend.default, as in this example. +# See config-full.toml for example of [backend] use. + + +# List the different storage systems available for metadata, data instances, etc. +# Any nickname can be used for a store. In this case, it's "raid6" to reflect +# that the directory is on a RAID-6 drive system. Note that all store properties +# like "engine" and "path" should be lower-case by convention. +[store] + [store.raid6] + engine = "basholeveldb" + path = "/tmp/basholeveldb" diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index cabeacb..b3cc09d 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -38,6 +38,9 @@ requirements: - numpy >=1.9,{{NPY_VER}}* - scikit-image + # DVID is included as a build dependency so we can run 'make test' + - dvid + run: - boost 1.64.* - jsoncpp 1.6.2