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
f5731ed8
Commit
f5731ed8
authored
13 years ago
by
Rafaël Carré
Browse files
Options
Downloads
Patches
Plain Diff
Leave test directory unchanged when running make check
parent
3e1e9421
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sflphone-common/test/historytest.cpp
+4
-5
4 additions, 5 deletions
sflphone-common/test/historytest.cpp
sflphone-common/test/main.cpp
+8
-4
8 additions, 4 deletions
sflphone-common/test/main.cpp
with
12 additions
and
9 deletions
sflphone-common/test/historytest.cpp
+
4
−
5
View file @
f5731ed8
...
...
@@ -30,6 +30,7 @@
#include
<stdio.h>
#include
<sstream>
#include
<cstdlib>
#include
"historytest.h"
#include
"manager.h"
...
...
@@ -41,6 +42,7 @@ using std::endl;
void
HistoryTest
::
setUp
()
{
system
(
"cp "
HISTORY_SAMPLE
" "
HISTORY_SAMPLE
".bak"
);
// Instanciate the cleaner singleton
history
=
new
HistoryManager
();
}
...
...
@@ -51,11 +53,7 @@ void HistoryTest::test_create_history_path()
_debug
(
"-------------------- HistoryTest::test_create_history_path --------------------
\n
"
);
int
result
;
char
*
cpath
;
std
::
string
path
;
cpath
=
getenv
(
"XDG_DATA_HOME"
);
(
cpath
!=
NULL
)
?
path
=
std
::
string
(
cpath
)
:
path
=
std
::
string
(
"/"
)
+
HISTORY_SAMPLE
;
std
::
string
path
(
HISTORY_SAMPLE
);
result
=
history
->
create_history_path
(
path
);
CPPUNIT_ASSERT
(
result
==
0
);
...
...
@@ -228,4 +226,5 @@ void HistoryTest::tearDown()
// Delete the history object
delete
history
;
history
=
0
;
system
(
"mv "
HISTORY_SAMPLE
".bak "
HISTORY_SAMPLE
);
}
This diff is collapsed.
Click to expand it.
sflphone-common/test/main.cpp
+
8
−
4
View file @
f5731ed8
...
...
@@ -32,6 +32,8 @@
#include
<manager.h>
#include
<constants.h>
#include
<cstdlib>
#include
<cppunit/CompilerOutputter.h>
#include
<cppunit/XmlOutputter.h>
#include
<cppunit/extensions/TestFactoryRegistry.h>
...
...
@@ -39,7 +41,6 @@
int
main
(
int
argc
,
char
*
argv
[])
{
printf
(
"
\n
SFLphone Daemon Test Suite, by Savoir-Faire Linux 2004-2010
\n\n
"
);
Logger
::
setConsoleLog
(
true
);
Logger
::
setDebugMode
(
true
);
...
...
@@ -65,7 +66,7 @@ int main (int argc, char* argv[])
printf
(
" - %s
\n
"
,
suite
->
getChildTestAt
(
i
)
->
getName
().
c_str
());
}
exit
(
0
)
;
return
0
;
}
else
if
(
strcmp
(
"--debug"
,
argv
[
1
])
==
0
)
{
argvIndex
++
;
...
...
@@ -89,6 +90,7 @@ int main (int argc, char* argv[])
}
printf
(
"
\n\n
=== SFLphone initialization ===
\n\n
"
);
system
(
"cp "
CONFIG_SAMPLE
" "
CONFIG_SAMPLE
".bak"
);
Manager
::
instance
().
initConfigFile
(
true
,
CONFIG_SAMPLE
);
Manager
::
instance
().
init
();
...
...
@@ -98,7 +100,8 @@ int main (int argc, char* argv[])
if
(
suite
->
getChildTestCount
()
==
0
)
{
_error
(
"Invalid test suite name: %s"
,
testSuiteName
.
c_str
());
exit
(
-
1
);
system
(
"mv "
CONFIG_SAMPLE
".bak "
CONFIG_SAMPLE
);
return
1
;
}
// Adds the test to the list of test to run
...
...
@@ -120,6 +123,7 @@ int main (int argc, char* argv[])
Manager
::
instance
().
terminate
();
// Return error code 1 if the one of test failed.
system
(
"mv "
CONFIG_SAMPLE
".bak "
CONFIG_SAMPLE
);
return
wasSucessful
?
0
:
1
;
}
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