Eliminating ref_build_id as required argument on run-nrtest scripts
This commit is contained in:
@@ -80,9 +80,11 @@ curl -fsSL -o examples.zip %TESTFILES_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 benchmark.zip -obenchmark\ > nul
|
||||
7z e benchmark.zip -o. manifest.json -r
|
||||
|
||||
|
||||
:: set up symlink for tests directory
|
||||
mklink /D .\tests .\epanet-example-networks-%LATEST_TAG:~1%\epanet-tests > nul
|
||||
|
||||
@@ -82,12 +82,13 @@ curl -fsSL -o examples.tar.gz ${TEST_URL}
|
||||
curl -fsSL -o benchmark.tar.gz ${BENCH_URL}
|
||||
|
||||
|
||||
# extract tests and benchmarks
|
||||
# extract tests, benchmarks, and manifest
|
||||
tar xzf examples.tar.gz
|
||||
ln -s epanet-example-networks-${LATEST_TAG:1}/epanet-tests tests
|
||||
|
||||
mkdir 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
|
||||
|
||||
@@ -69,10 +69,9 @@ print_usage() {
|
||||
|
||||
# Default option values
|
||||
compare='true'
|
||||
ref_build_id=''
|
||||
ref_build_id=
|
||||
sut_build_id='local'
|
||||
test_path='nrtestsuite'
|
||||
version='vXXX'
|
||||
|
||||
while getopts "cr:s:t:" flag; do
|
||||
case "${flag}" in
|
||||
@@ -87,9 +86,10 @@ done
|
||||
shift $(($OPTIND - 1))
|
||||
|
||||
|
||||
# determine ref_build_id from manifest file
|
||||
if [ -z $ref_build_id ]; then
|
||||
echo "ERROR: REF_BUILD_ID must be defined"
|
||||
exit 1;
|
||||
description=(`cat ${test_path}/manifest.json | jq '.Application.description | splits(" ")'`)
|
||||
ref_build_id=${description[1]//\"/}
|
||||
fi
|
||||
|
||||
# Invoke command
|
||||
|
||||
Reference in New Issue
Block a user