Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Odoo scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
Odoo scripts
Commits
ca25de1e7c29
Commit
ca25de1e7c29
authored
6 years ago
by
Vincent Hatakeyama
Browse files
Options
Downloads
Patches
Plain Diff
fix bad zsh scripting
parent
1aca2a8c6e77
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
do_tests
+6
-6
6 additions, 6 deletions
do_tests
with
6 additions
and
6 deletions
do_tests
+
6
−
6
View file @
ca25de1e
...
...
@@ -66,5 +66,5 @@
# This should be a parameter if it was simple to parse
INSTALL_ARGUMENTS
=
"--log-level=
${
INSTALL_LOG_LEVEL
:-
warn
}
"
echo
[
${
YELLOW
}
INFO
${
RESET
}
]
Drop any existing database
"
$dbname
"
echo
"
[
${
YELLOW
}
INFO
${
RESET
}
] Drop any existing database
'
$dbname
'
"
dropdb
$PG_HOST
$PG_USER
--if-exists
$dbname
--no-password
...
...
@@ -70,8 +70,8 @@
dropdb
$PG_HOST
$PG_USER
--if-exists
$dbname
--no-password
echo
[
${
YELLOW
}
INFO
${
RESET
}
]
Create database
"
$dbname
"
with owner
$dbowner
echo
"
[
${
YELLOW
}
INFO
${
RESET
}
] Create database
'
$dbname
'
with owner
$dbowner
"
createdb
$PG_HOST
$PG_USER
-O
$dbowner
$dbname
--no-password
||
{
echo
${
RED
}
FATAL
${
RESET
}
- Cannot create
test
database
;
exit
1
;
}
unaccent
=
$(
python
-B
-c
"import ConfigParser ; c = ConfigParser.ConfigParser() ; c.read('
${
project_home
}
/conf/dev/odoo.conf') ; print c.get('options', 'unaccent', False)"
)
if
[[
"
$unaccent
"
==
"True"
]]
;
then
psql
$PG_HOST
$PG_USER
$dbname
-c
"CREATE EXTENSION unaccent;"
fi
...
...
@@ -72,14 +72,14 @@
createdb
$PG_HOST
$PG_USER
-O
$dbowner
$dbname
--no-password
||
{
echo
${
RED
}
FATAL
${
RESET
}
- Cannot create
test
database
;
exit
1
;
}
unaccent
=
$(
python
-B
-c
"import ConfigParser ; c = ConfigParser.ConfigParser() ; c.read('
${
project_home
}
/conf/dev/odoo.conf') ; print c.get('options', 'unaccent', False)"
)
if
[[
"
$unaccent
"
==
"True"
]]
;
then
psql
$PG_HOST
$PG_USER
$dbname
-c
"CREATE EXTENSION unaccent;"
fi
echo
[
${
YELLOW
}
INFO
${
RESET
}
]
Modules to
install
:
$modules_to_install
echo
[
${
YELLOW
}
INFO
${
RESET
}
]
Install those modules
echo
"
[
${
YELLOW
}
INFO
${
RESET
}
] Modules to install:
$modules_to_install
"
echo
"
[
${
YELLOW
}
INFO
${
RESET
}
] Install those modules
"
logfile
=
$(
tempfile
--suffix
=
.log
)
$here
/start
$INSTALL_ARGUMENTS
-i
$modules_to_install
-d
$dbname
--max-cron
=
0
--stop-after-init
$*
$ODOO_HOST
$ODOO_USER
2>&1 |
tee
$logfile
||
{
echo
${
RED
}
FATAL
${
RESET
}
- Cannot
install
modules
;
exit
1
;
}
failed
=
$(
grep
' CRITICAL\| ERROR'
$logfile
-c
)
rm
$logfile
if
[[
$failed
-gt
0
]]
;
then
...
...
@@ -80,9 +80,9 @@
logfile
=
$(
tempfile
--suffix
=
.log
)
$here
/start
$INSTALL_ARGUMENTS
-i
$modules_to_install
-d
$dbname
--max-cron
=
0
--stop-after-init
$*
$ODOO_HOST
$ODOO_USER
2>&1 |
tee
$logfile
||
{
echo
${
RED
}
FATAL
${
RESET
}
- Cannot
install
modules
;
exit
1
;
}
failed
=
$(
grep
' CRITICAL\| ERROR'
$logfile
-c
)
rm
$logfile
if
[[
$failed
-gt
0
]]
;
then
echo
[
${
RED
}
FAIL
${
RESET
}
]
Module can not be installed
echo
"
[
${
RED
}
FAIL
${
RESET
}
] Module
s
can not be installed
"
exit
1
fi
...
...
@@ -87,4 +87,4 @@
exit
1
fi
echo
${
YELLOW
}
INFO
${
RESET
}
-
Run tests on
$dbname
echo
"[
${
YELLOW
}
INFO
${
RESET
}
]
Run tests on
$dbname
"
$here
/run_tests
$dbname
$ODOO_HOST
$ODOO_USER
$*
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment