-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Per #1546, changed script to run unit tests and comparison, writing t…
…o log files
- Loading branch information
1 parent
f9b2a19
commit 2a1579c
Showing
1 changed file
with
13 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,30 @@ | ||
#! /bin/bash | ||
|
||
###################################################################### | ||
# Install tools needed to run MET unit tests in Docker | ||
###################################################################### | ||
|
||
### | ||
# Install Perl XML Parser | ||
### | ||
yum makecache | ||
yum -y install perl-XML-Parser | ||
|
||
|
||
### | ||
# Install R | ||
### | ||
#yum -y install epel-release # already installed in MET Docker image | ||
yum -y install R | ||
|
||
|
||
### | ||
# Install R NetCDF4 library (1.19) | ||
### | ||
yum -y install netcdf-devel.x86_64 | ||
|
||
# download tarfile into home directory | ||
cd | ||
wget https://cran.r-project.org/src/contrib/ncdf4_1.19.tar.gz | ||
R CMD INSTALL ncdf4_1.19.tar.gz | ||
|
||
|
||
### | ||
# Install NCO to get ncdiff | ||
### | ||
yum -y install nco | ||
|
||
|
||
### | ||
# Set environment variables needed to run unit tests | ||
### | ||
|
||
export MET_BASE=/usr/local/share/met | ||
|
||
export MET_REPO_DIR=/met/MET-${MET_GIT_NAME} | ||
export MET_BUILD_BASE=${MET_REPO_DIR}/met | ||
export MET_TEST_BASE=${MET_REPO_DIR}/test | ||
export PERL5LIB=${MET_TEST_BASE}/lib | ||
|
||
export MET_TEST_INPUT=/data/input/MET_test_data/unit_test | ||
export MET_TEST_OUTPUT=/data/output/met_test_output | ||
export MET_TEST_TRUTH=/data/output/met_test_truth | ||
|
||
export MET_TEST_RSCRIPT=/usr/bin/Rscript | ||
export MET_TEST_MET_PYTHON_EXE=/usr/bin/python3 | ||
|
||
### | ||
# Run MET unit tests | ||
### | ||
|
||
echo "Running all MET unit tests..." | ||
echo "Writing logs to /met/unit_test.log" | ||
${MET_TEST_BASE}/bin/unit_test.sh > /met/unit_test.log | ||
|
||
echo "Running comparison" | ||
echo "Writing logs to /met/comp_dir.log" | ||
${MET_TEST_BASE}/bin/comp_dir.sh ${MET_TEST_TRUTH} ${MET_TEST_OUTPUT} > /met/comp_dir.log |