A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
improve coverage in teshsuite
[simgrid.git]
/
teshsuite
/
msg
/
trace
/
test_trace_integration.c
diff --git
a/teshsuite/msg/trace/test_trace_integration.c
b/teshsuite/msg/trace/test_trace_integration.c
index
49ed7a0
..
ff5292c
100644
(file)
--- a/
teshsuite/msg/trace/test_trace_integration.c
+++ b/
teshsuite/msg/trace/test_trace_integration.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2009
, 2010
. The SimGrid Team.
+/* Copyright (c) 2009
-2010, 2012-2015
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-6,7
+6,7
@@
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
-#include "
msg
/msg.h"
+#include "
simgrid
/msg.h"
#include "xbt/log.h"
#include "xbt/asserts.h"
#include "xbt/log.h"
#include "xbt/asserts.h"
@@
-32,8
+32,8
@@
int test_trace(int argc, char *argv[])
task_prio = atof(argv[2]);
XBT_INFO("Testing the trace integration cpu model: CpuTI");
task_prio = atof(argv[2]);
XBT_INFO("Testing the trace integration cpu model: CpuTI");
- XBT_INFO("Task size: %
l
f", task_comp_size);
- XBT_INFO("Task prio: %
l
f", task_prio);
+ XBT_INFO("Task size: %f", task_comp_size);
+ XBT_INFO("Task prio: %f", task_prio);
/* Create and execute a single task. */
task = MSG_task_create("proc 0", task_comp_size, 0, NULL);
/* Create and execute a single task. */
task = MSG_task_create("proc 0", task_comp_size, 0, NULL);
@@
-43,7
+43,6
@@
int test_trace(int argc, char *argv[])
XBT_INFO("Test finished");
XBT_INFO("Test finished");
-
return 0;
}
return 0;
}
@@
-54,10
+53,7
@@
int main(int argc, char *argv[])
/* Verify if the platform xml file was passed by command line. */
MSG_init(&argc, argv);
/* Verify if the platform xml file was passed by command line. */
MSG_init(&argc, argv);
- if (argc < 2) {
- printf("Usage: %s test_trace_integration_model.xml\n", argv[0]);
- exit(1);
- }
+ xbt_assert(argc > 2, "Usage: %s test_trace_integration_model.xml deployment.xml\n", argv[0]);
/* Register SimGrid process function. */
MSG_function_register("test_trace", test_trace);
/* Register SimGrid process function. */
MSG_function_register("test_trace", test_trace);
@@
-67,8
+63,5
@@
int main(int argc, char *argv[])
/* Run the example. */
res = MSG_main();
/* Run the example. */
res = MSG_main();
- if (res == MSG_OK)
- return 0;
- else
- return 1;
+ return res != MSG_OK;
}
}