Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
fb3fb8c1
Commit
fb3fb8c1
authored
13 years ago
by
Emmanuel Milou
Browse files
Options
Downloads
Patches
Plain Diff
#8763 Improve hudson bash script
parent
a7493391
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hudson-sflphone-script.sh
+48
-18
48 additions, 18 deletions
hudson-sflphone-script.sh
with
48 additions
and
18 deletions
hudson-sflphone-script.sh
+
48
−
18
View file @
fb3fb8c1
...
...
@@ -4,15 +4,8 @@
#
# Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
git clean
-f
-d
-x
XML_RESULTS
=
"cppunitresults.xml"
if
[
$#
!=
1
]
;
then
echo
"ERROR: Exactly one argument has to be passed. Must be in {daemon, gnome}"
exit
1
fi
function
build_daemon
{
if
[
$1
==
"daemon"
]
;
then
# Compile the daemon
pushd
daemon
make distclean
...
...
@@ -30,14 +23,18 @@ if [ $1 == "daemon" ]; then
make check
popd
# Run the unit tests for the daemon
# pushd daemon/test
# Remove the previous XML test file
# rm -rf $XML_RESULTS
# ./run_tests.sh || exit 1
# popd
if
[
$1
==
1
]
;
then
# Run the unit tests for the daemon
pushd
daemon/test
# Remove the previous XML test file
rm
-rf
$XML_RESULTS
./run_tests.sh
||
exit
1
popd
fi
}
function
build_gnome
{
elif
[
$1
==
"gnome"
]
;
then
# Compile the plugins
pushd
plugins
make distclean
...
...
@@ -55,11 +52,44 @@ elif [ $1 == "gnome" ]; then
make
-j
1
make check
popd
}
else
echo
"ERROR: Bad argument. Must be in {daemon, gnome}"
exit
1
if
[
"$#"
-eq
0
]
;
then
# Script needs at least one command-line argument.
echo
"Usage
$0
-b select which one to build: daemon or gnome
-t enable unit tests after build"
exit
$E_OPTERR
fi
git clean
-f
-d
-x
XML_RESULTS
=
"cppunitresults.xml"
TEST
=
0
BUILD
=
while
getopts
":b: t"
opt
;
do
case
$opt
in
b
)
echo
"-b was triggered. Parameter:
$OPTARG
"
>
&2
BUILD
=
$OPTARG
;;
t
)
echo
"-t was triggered. Tests will be run"
>
&2
TEST
=
1
;;
\?
)
echo
"Invalid option: -
$OPTARG
"
>
&2
exit
1
;;
:
)
echo
"Option -
$OPTARG
requires an argument."
>
&2
exit
1
;;
esac
done
# Call appropriate build function, with parameters if needed
build_
$BUILD
$TEST
# SUCCESS
exit
0
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