-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make a blog post explaining how to run the unittests #146
Comments
convenience methods. set according to the environment if PERL5LIB cannot be set in bashrc export QUATTOR_PERL5LIB=/usr/lib/perl:/home/stdweird/perl5/lib/perl5/ and use function mvn_run {
local unsetfn quatenv
quatenv="PERL5LIB=${QUATTOR_PERL5LIB:-$PERL5LIB} QUATTOR_TEST_LOG_CMD_MISSING=1 QUATTOR_TEST_LOG_CMD=1 QUATTOR_TEST_LOG_DEBUGLEVEL=3"
# make a subshell with all bashfunctions removed. maven can have issues with then via exporting with env.BASH_FUNC
unsetfn=""
for fn in `env |grep BASH_FUNC_ | grep -v grep | sed "s/(.*//; s/BASH_FUNC_//" |tr "\n" ' '`; do
unsetfn="unset -f $fn; $unsetfn"
done
bash -c "$unsetfn $quatenv mvn $1"
}
function mvn_test {
local extra
if [ ! -z "$1" ]; then
extra="-Dunittest=$1.t"
fi
mvn_run "clean test -Dprove.args=-v $extra"
}
function mvn_pack {
mvn_run "clean package -Dprove.args=-v"
}
export -f mvn_run
export -f mvn_test
export -f mvn_pack
|
There is already documentation here . Feel free to update it. |
gather debug logs
if no
|
|
to get value based regexptest for TT, pipe output of verbose mvn_test through perl -e 'while (<>) { s/^# //; s/([(){}|[\]+\^\*\$\?#])/\\\1/g; s/^/^/; s/$/\$/; s/ {16}/\\s{16}/;s/ {12}/\\s{12}/; s/ {8}/\\s{8}/; s/ {4}/\\s{4}/; print; }' |
if your, |
For the record, there is a page about unit test in the old wiki that I updated regularly: https://trac.lal.in2p3.fr/Quattor/wiki/Development/Code/TestingComponents. It may be good to start from it and when moved to |
An issue I faced recently is the fact that |
If rpm packaging fails for no obvious reason (but has
Then check the output for the created
In this example the pom.xml had 2 mappings, and was based on the The components have stuff like |
I guess this is tracking the 7 TODOs listed in http://www.quattor.org/development/unittests.html ? |
Plan is to fix it during April 2018 workshop |
for the wrappers see quattor/maven-tools#175 |
Placeholder for all stuff to put in the blog
The text was updated successfully, but these errors were encountered: