diff --git a/.gitignore b/.gitignore index 6c8c109..aa80f35 100644 --- a/.gitignore +++ b/.gitignore @@ -144,4 +144,7 @@ dmypy.json # testing / NPM test/run-cesium/node_modules/* test/run-cesium/package.json -test/run-cesium/package-lock.json \ No newline at end of file +test/run-cesium/package-lock.json +test/run-cesium/testing_config.js +yarn.lock +node_modules diff --git a/run_testing.sh b/run_testing.sh new file mode 100644 index 0000000..e11ff24 --- /dev/null +++ b/run_testing.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +CESIUM_DIR="./test/run-cesium" +config="${CESIUM_DIR}/testing_config.js" +if [[ ! -e "$config" ]] +then + cp "${CESIUM_DIR}/testing_config_tmpl.js" "${CESIUM_DIR}/testing_config.js" +fi + +rm "$CESIUM_DIR/cesium.js" +touch "$CESIUM_DIR/cesium.js" +cat > "$CESIUM_DIR/cesium.js" < "$CESIUM_DIR/index.html" < + + + + + + + + +
+ + + + + +EOF + +cd $CESIUM_DIR + +if [[ -e "yarn.lock" ]] +then + yarn start +else + node server.js +fi + + + + diff --git a/test/run-cesium/testing_config_tmpl.js b/test/run-cesium/testing_config_tmpl.js new file mode 100644 index 0000000..827d4ee --- /dev/null +++ b/test/run-cesium/testing_config_tmpl.js @@ -0,0 +1,4 @@ +my_config = { + "my_token": "YOUR TOKEN HERE", + "data_dir": "web_tiles" +} \ No newline at end of file