cosms-core/tests/tools/tool.c

30 lines
890 B
C
Raw Permalink Normal View History

/*
* Copyright (C) Tristan Franssen, <tristanfranssen@strawhats.nl>.
*
* This software is licensed under the Apache License, Version 2.0 (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License in the file LICENSE or at
* http://www.apache.org/licenses/LICENSE-2.0
*/
#include "tool.h"
#include "tool-file.h"
#include <stdio.h>
int cosms_core_tool_generate_test_data(void) {
printf("[*] Generating test data...");
fflush(stdout);
if (cosms_core_tool_file_generate_large_file() != 0) {
printf("\r[FAILED] could not generate large file!\n");
return -1;
}
if (cosms_core_tool_file_generate_delete_file() != 0) {
printf("\r[FAILED] could not generate delete files!\n");
return -1;
}
printf("\r[COMPLETED] finished generating test data!\n");
return 0;
}