Community: Framework mailing list archives

expert-framework@mail.odoo.com

Re: Testing in Odoo v8

by
manuel
- 05/12/2015 10:13:08
I always do as you say, but the errors won't go away.  This is my script
for running tests:

#!/bin/sh
CDIR=`pwd`

NOW=`date --utc +"%Y%m%d%H%M%N"`
HASH=`echo "$CWD-$NOW" | md5sum -t - | awk '{print $1}' |cut -b-9`
DB=testingdb_"$HASH"
STDOUT=$(tempfile --prefix="$HASH-" --suffix=.log)

# I use buildout to build the OpenERP server so it's my bin/ dir.
EXECUTABLE=bin/openerp-server

# Just in case
dropdb $DB 2>/dev/null

# Create the DB install the addons and run tests.
createdb "$DB" && $EXECUTABLE -d $DB -i all \
    --stop-after-init --test-enable --log-level=test | tee "$STDOUT"

if egrep -q "ERROR ${DB}" "$STDOUT"; then
    CODE=1
else
    CODE=0
fi

rm -f -- "$STDOUT"
dropdb $DB
exit $CODE


Le 12/05/2015 01:16, Nhomar Hernandez a écrit :
> Try erase the db and always start with a new one and let me know if it
> works..
>