Eliminating ref_build_id as required argument on run-nrtest scripts

This commit is contained in:
Michael Tryby
2019-03-05 14:21:26 -05:00
parent d3e9c11d71
commit 651585fe32
3 changed files with 9 additions and 6 deletions

View File

@@ -80,9 +80,11 @@ curl -fsSL -o examples.zip %TESTFILES_URL%
curl -fsSL -o benchmark.zip %BENCHFILES_URL% curl -fsSL -o benchmark.zip %BENCHFILES_URL%
:: extract tests and benchmarks :: extract tests, benchmarks, and manifest
7z x examples.zip *\epanet-tests\* > nul 7z x examples.zip *\epanet-tests\* > nul
7z x benchmark.zip -obenchmark\ > nul 7z x benchmark.zip -obenchmark\ > nul
7z e benchmark.zip -o. manifest.json -r
:: set up symlink for tests directory :: set up symlink for tests directory
mklink /D .\tests .\epanet-example-networks-%LATEST_TAG:~1%\epanet-tests > nul mklink /D .\tests .\epanet-example-networks-%LATEST_TAG:~1%\epanet-tests > nul

View File

@@ -82,12 +82,13 @@ curl -fsSL -o examples.tar.gz ${TEST_URL}
curl -fsSL -o benchmark.tar.gz ${BENCH_URL} curl -fsSL -o benchmark.tar.gz ${BENCH_URL}
# extract tests and benchmarks # extract tests, benchmarks, and manifest
tar xzf examples.tar.gz tar xzf examples.tar.gz
ln -s epanet-example-networks-${LATEST_TAG:1}/epanet-tests tests ln -s epanet-example-networks-${LATEST_TAG:1}/epanet-tests tests
mkdir benchmark mkdir benchmark
tar xzf benchmark.tar.gz -C benchmark tar xzf benchmark.tar.gz -C benchmark
tar xzf benchmark.tar.gz --wildcards --no-anchored --strip-components=1 '*/manifest.json' -C .
# generate json configuration file for software under test # generate json configuration file for software under test

View File

@@ -69,10 +69,9 @@ print_usage() {
# Default option values # Default option values
compare='true' compare='true'
ref_build_id='' ref_build_id=
sut_build_id='local' sut_build_id='local'
test_path='nrtestsuite' test_path='nrtestsuite'
version='vXXX'
while getopts "cr:s:t:" flag; do while getopts "cr:s:t:" flag; do
case "${flag}" in case "${flag}" in
@@ -87,9 +86,10 @@ done
shift $(($OPTIND - 1)) shift $(($OPTIND - 1))
# determine ref_build_id from manifest file
if [ -z $ref_build_id ]; then if [ -z $ref_build_id ]; then
echo "ERROR: REF_BUILD_ID must be defined" description=(`cat ${test_path}/manifest.json | jq '.Application.description | splits(" ")'`)
exit 1; ref_build_id=${description[1]//\"/}
fi fi
# Invoke command # Invoke command