The previous code would add arguments such that they could be
interpreted as the package version. Avoid this by adding arguments
after we're done consuming positional arguments.
Refs #3793.
no more trailing spaces
adding an empty csv in case of error
## MAXLINE is the amount of lines that will read after the pattern
## is match (the logfile could be hundred thousands lines long).
## 1000 should be safe enough to capture all the output of the individual test
## MAXLINE is the amount of lines that will read after the pattern
## is match (the logfile could be hundred thousands lines long).
## 1000 should be safe enough to capture all the output of the individual test
## TODO: check $build and $file make sense
## TODO: check $build and $file make sense
(zgrep -i -E -A$MAXLINES "^[A-Za-z0-9]+Test: $test" $file && echo "----") | tail -n +1 | tail --lines=+3|grep -B$MAXLINES -E "^-*$" -m1 > $outputdir/$cleaned_test-$build.txt
result=$?
if [ $result -eq 0 ]
(zgrep -i -E -A$MAXLINES "^[A-Za-z0-9]+Test: $test" $file && echo "----") | tail -n +1 | tail --lines=+3|grep -B$MAXLINES -E "^-*$" -m1 > $outputdir/$cleaned_test-$build.txt
result=$?
if [ $result -eq 0 ]
echo processing $outputdir/$cleaned_test-$build.txt creating $outputdir/$cleaned_test.csv
echo $(grep ^Completed $outputdir/$cleaned_test-$build.txt | perl -n -e '/^Completed (.*) in [0-9]+ms.*$/;print "".++$line."-$1,";' | perl -p -e 's/,$//g'|tr " " "_" ) > $outputdir/$cleaned_test.csv
echo $(grep ^Completed $outputdir/$cleaned_test-$build.txt | perl -n -e '/^Completed.*in ([0-9]+)ms.*$/;print "$1,";' | perl -p -e 's/,$//g' ) >> $outputdir/$cleaned_test.csv
#echo URL=https://ci.curoverse.com/view/job/arvados-api-server/ws/apps/workbench/log/$cleaned_test-$build.txt/*view*/ >> $outputdir/$test.properties
echo processing $outputdir/$cleaned_test-$build.txt creating $outputdir/$cleaned_test.csv
echo $(grep ^Completed $outputdir/$cleaned_test-$build.txt | perl -n -e '/^Completed (.*) in [0-9]+ms.*$/;print "".++$line."-$1,";' | perl -p -e 's/,$//g'|tr " " "_" ) > $outputdir/$cleaned_test.csv
echo $(grep ^Completed $outputdir/$cleaned_test-$build.txt | perl -n -e '/^Completed.*in ([0-9]+)ms.*$/;print "$1,";' | perl -p -e 's/,$//g' ) >> $outputdir/$cleaned_test.csv
#echo URL=https://ci.curoverse.com/view/job/arvados-api-server/ws/apps/workbench/log/$cleaned_test-$build.txt/*view*/ >> $outputdir/$test.properties
echo "$test was't found on $file"
echo "$test was't found on $file"
+ cleaned_test=$(echo $test | tr -d ",.:;/")
+ > $outputdir/$cleaned_test.csv
# The type of source package. Passed to fpm -s. Default "python".
PACKAGE_TYPE=${1:-python}
shift
# The type of source package. Passed to fpm -s. Default "python".
PACKAGE_TYPE=${1:-python}
shift
+ # Optional: the package version number. Passed to fpm -v.
+ VERSION=$1
+ shift
+ # fpm does not actually support a python3 package type. Instead we recognize
+ # it as a convenience shortcut to add several necessary arguments to
+ # fpm's command line later, after we're done handling positional arguments.
if [ "python3" = "$PACKAGE_TYPE" ]; then
if [ "python3" = "$PACKAGE_TYPE" ]; then
- # fpm does not actually support this package type. Instead we recognize
- # it as a convenience shortcut to add several necessary arguments to
- # fpm's command line later.
PACKAGE_TYPE=python
set -- "$@" --python-bin python3 --python-easyinstall easy_install3 \
--python-package-name-prefix python3 --depends python3
fi
PACKAGE_TYPE=python
set -- "$@" --python-bin python3 --python-easyinstall easy_install3 \
--python-package-name-prefix python3 --depends python3
fi
- # Optional: the package version number. Passed to fpm -v.
- VERSION=$1
- shift
declare -a COMMAND_ARR=("fpm" "--maintainer=Ward Vandewege <ward@curoverse.com>" "-s" "$PACKAGE_TYPE" "-t" "deb" "-x" "usr/local/lib/python2.7/dist-packages/tests")
declare -a COMMAND_ARR=("fpm" "--maintainer=Ward Vandewege <ward@curoverse.com>" "-s" "$PACKAGE_TYPE" "-t" "deb" "-x" "usr/local/lib/python2.7/dist-packages/tests")