-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature 460 travis use case tests (#462)
- Loading branch information
1 parent
6a92812
commit 7fb6fe9
Showing
7 changed files
with
208 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
mkdir -p ${OWNER_BUILD_DIR}/test-use-case-output | ||
mkdir -p ${OWNER_BUILD_DIR}/test.metplus.data | ||
|
||
cd ${OWNER_BUILD_DIR}/test.metplus.data | ||
|
||
curl -L -O https://github.com/NCAR/METplus/releases/download/v3.0/sample_data-met_test-9.0.tgz | ||
tar xfzp sample_data-met_test-9.0.tgz | ||
|
||
curl -L -O https://dtcenter.org/sites/default/files/community-code/metplus/utilities/GempakToCF.jar | ||
|
||
docker pull ${DOCKERHUB_TAG} | ||
docker images | ||
docker run --rm -e "PATH=/metplus/METplus/ush:$PATH" -v ${OWNER_BUILD_DIR}:/metplus ${DOCKERHUB_TAG} /bin/bash -c 'echo $MY_CUSTOM_VAR;which master_metplus.py;ls -al /metplus;python -V' | ||
docker run --rm -v ${OWNER_BUILD_DIR}:/metplus ${DOCKERHUB_TAG} /bin/bash /metplus/METplus/internal_tests/use_cases/run_test_use_cases.sh docker --met_tool_wrapper | ||
returncode=$? | ||
|
||
# Dump the output directories from running METplus | ||
#ls -alR ${OWNER_BUILD_DIR}/test-use-case-output | ||
|
||
# Dump and see how much space is left on Travis disk. | ||
df -h | ||
|
||
exit $returncode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
version=3.0 | ||
|
||
mkdir -p ${OWNER_BUILD_DIR}/test-use-case-output | ||
mkdir -p ${OWNER_BUILD_DIR}/test.metplus.data | ||
|
||
cd ${OWNER_BUILD_DIR}/test.metplus.data | ||
|
||
# get sample data for all use case categories provided and add arguments to call to test script | ||
test_args='' | ||
for i in "$@" | ||
do | ||
if [ -z "$i" ]; then | ||
continue | ||
fi | ||
|
||
curl -L -O https://github.com/NCAR/METplus/releases/download/v${version}/sample_data-${i}-${version}.tgz | ||
tar xfzp sample_data-${i}-${version}.tgz | ||
test_args=${test_args}" --"${i} | ||
done | ||
|
||
# get met_test data because some cases use this data still | ||
curl -L -O https://github.com/NCAR/METplus/releases/download/v3.0/sample_data-met_test-9.0.tgz | ||
tar xfzp sample_data-met_test-9.0.tgz | ||
|
||
# get GempakToCF jar file in case any use cases use GEMPAK data | ||
curl -L -O https://dtcenter.org/sites/default/files/community-code/metplus/utilities/GempakToCF.jar | ||
|
||
docker pull ${DOCKERHUB_TAG} | ||
docker images | ||
docker run --rm -e "PATH=/metplus/METplus/ush:$PATH" -v ${OWNER_BUILD_DIR}:/metplus ${DOCKERHUB_TAG} /bin/bash -c 'echo $MY_CUSTOM_VAR;which master_metplus.py;ls -al /metplus;python -V' | ||
docker run --rm -v ${OWNER_BUILD_DIR}:/metplus ${DOCKERHUB_TAG} /bin/bash /metplus/METplus/internal_tests/use_cases/run_test_use_cases.sh docker ${test_args} | ||
returncode=$? | ||
|
||
# Dump the output directories from running METplus | ||
#ls -alR ${OWNER_BUILD_DIR}/test-use-case-output | ||
|
||
# Dump and see how much space is left on Travis disk. | ||
df -h | ||
|
||
exit $returncode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,4 @@ fi | |
|
||
source $test_env_file | ||
|
||
python $script_dir/test_use_cases.py | ||
python $script_dir/test_use_cases.py $@ |
Oops, something went wrong.