Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
IceT
IceT
Commits
79f42e64
Commit
79f42e64
authored
May 13, 2011
by
Kenneth Moreland
Browse files
At the end of tests, collect results to node 0.
Makes us more assured that a failure will actually be reported as such.
parent
d2e7ef44
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/init.c
View file @
79f42e64
...
...
@@ -380,10 +380,12 @@ void swap_buffers(void)
}
#endif
#define TEST_RESULT_TAG 3492
extern
void
finalize_communication
(
void
);
void
finalize_test
(
i
nt
result
)
void
finalize_test
(
IceTI
nt
result
)
{
IceTInt
rank
;
IceTInt
num_proc
;
#ifdef ICET_TESTS_USE_OPENGL
checkOglError
();
...
...
@@ -391,7 +393,18 @@ void finalize_test(int result)
checkIceTError
();
icetGetIntegerv
(
ICET_RANK
,
&
rank
);
icetGetIntegerv
(
ICET_NUM_PROCESSES
,
&
num_proc
);
if
(
rank
==
0
)
{
IceTInt
p_id
;
for
(
p_id
=
1
;
p_id
<
num_proc
;
p_id
++
)
{
IceTInt
remote_result
;
icetCommRecv
(
&
remote_result
,
1
,
ICET_INT
,
p_id
,
TEST_RESULT_TAG
);
if
(
remote_result
!=
TEST_PASSED
)
{
result
=
remote_result
;
}
}
switch
(
result
)
{
case
TEST_PASSED
:
printf
(
"***Test Passed***
\n
"
);
...
...
@@ -403,9 +416,12 @@ void finalize_test(int result)
printf
(
"***TEST NOT PASSED***
\n
"
);
break
;
case
TEST_FAILED
:
default:
printf
(
"***TEST FAILED***
\n
"
);
break
;
}
}
else
{
icetCommSend
(
&
result
,
1
,
ICET_INT
,
0
,
TEST_RESULT_TAG
);
}
icetDestroyContext
(
context
);
...
...
tests/test-util.h
View file @
79f42e64
...
...
@@ -45,7 +45,7 @@ void printrank(const char *fmt, ...);
void
swap_buffers
(
void
);
#endif
void
finalize_test
(
i
nt
result
);
void
finalize_test
(
IceTI
nt
result
);
void
write_ppm
(
const
char
*
filename
,
const
IceTUByte
*
image
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment