mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
test_rtt: create missing output directory
This commit is contained in:
parent
bbdacfc0b4
commit
41ae48ad58
1 changed files with 10 additions and 0 deletions
|
@ -21,6 +21,7 @@
|
|||
*********************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "node.h"
|
||||
#include "sample.h"
|
||||
|
@ -235,9 +236,18 @@ char * test_rtt_print(struct node *n)
|
|||
int test_rtt_start(struct node *n)
|
||||
{
|
||||
int ret;
|
||||
struct stat st;
|
||||
struct test_rtt *t = n->_vd;
|
||||
struct test_rtt_case *c = list_first(&t->cases);
|
||||
|
||||
/* Create folder for results if not present */
|
||||
ret = stat(t->output, &st);
|
||||
if (ret || !S_ISDIR(st.st_mode)) {
|
||||
ret = mkdir(t->output, 0777);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = io_init(&t->io, t->format, SAMPLE_HAS_ALL & ~SAMPLE_HAS_VALUES);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Reference in a new issue