summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2024-06-06 12:48:48 +0200
committerMitya Selivanov <automainint@guattari.tech>2024-06-06 12:48:48 +0200
commit182cdfa058eb2ddb500189a2631ae6af1e9d0f8c (patch)
tree8a1469df9ed51b8e95fda6edf56e947ccb2a43e4
parentff3183ed8c292507254c06b343e24d5da3f73763 (diff)
downloadkit-182cdfa058eb2ddb500189a2631ae6af1e9d0f8c.zip
[build] debug
-rwxr-xr-xbuild.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/build.c b/build.c
index ac9182f..3102522 100755
--- a/build.c
+++ b/build.c
@@ -85,6 +85,7 @@ void print_help() {
" -l --link - Set additional linker options\n"
" -s --skiptests - Do not run tests\n\n"
);
+ fflush(stdout);
}
c8 lowercase_char(c8 c) {
@@ -225,6 +226,8 @@ i32 main(i32 argc, c8 **argv) {
}
}
+ fflush(stdout);
+
// Find C compiler
//
@@ -284,6 +287,8 @@ i32 main(i32 argc, c8 **argv) {
return 1;
}
+ fflush(stdout);
+
// Prepare compilation options
//
@@ -417,8 +422,10 @@ i32 main(i32 argc, c8 **argv) {
printf("\nCompiler options: %s\n", flags);
printf( "Link options: %s\n\n", link_flags);
+ fflush(stdout);
printf("Build " PROJECT " library\n");
+ fflush(stdout);
if (system(fmt(
"%s %s "
@@ -428,8 +435,10 @@ i32 main(i32 argc, c8 **argv) {
flag_obj, destination, postfix_obj)
) != 0)
return 1;
+ fflush(stdout);
printf("Build the test suite\n");
+ fflush(stdout);
if (system(fmt(
"%s %s "
@@ -443,6 +452,7 @@ i32 main(i32 argc, c8 **argv) {
link_flags)
) != 0)
return 1;
+ fflush(stdout);
c8 *c_tests[] = {
"test_too_many_assertions",
@@ -464,6 +474,7 @@ i32 main(i32 argc, c8 **argv) {
link_flags)
) != 0)
return 1;
+ fflush(stdout);
c8 *cpp_tests[] = {
"test_cpp",
@@ -484,6 +495,7 @@ i32 main(i32 argc, c8 **argv) {
link_flags)
) != 0)
return 1;
+ fflush(stdout);
if (!run_tests)
return 0;
@@ -494,9 +506,11 @@ i32 main(i32 argc, c8 **argv) {
i32 status = 0;
printf("Run tests\n\n");
+ fflush(stdout);
if (system(fmt("\"." DELIM "%s" DELIM "test_suite\"", destination)) != 0)
status = 1;
+ fflush(stdout);
i32 code;
@@ -507,6 +521,7 @@ i32 main(i32 argc, c8 **argv) {
printf("too many assertions - FAILED (code %d)\n", code);
status = 1;
}
+ fflush(stdout);
code = system(fmt("\"." DELIM "%s" DELIM "test_too_many_tests\" --quiet", destination)) & 0xff;
if (code == 0)
@@ -515,6 +530,7 @@ i32 main(i32 argc, c8 **argv) {
printf("too many tests - FAILED (code %d)\n", code);
status = 1;
}
+ fflush(stdout);
code = system(fmt("\"." DELIM "%s" DELIM "test_cpp\" --quiet", destination)) & 0xff;
if (code == 0)
@@ -523,7 +539,9 @@ i32 main(i32 argc, c8 **argv) {
printf("cpp - FAILED (code %d)\n", code);
status = 1;
}
+ fflush(stdout);
+ /*
code = system(fmt("\"." DELIM "%s" DELIM "test_signals\" --quiet", destination)) & 0xff;
if (code == 0)
printf("signals - OK\n");
@@ -531,6 +549,7 @@ i32 main(i32 argc, c8 **argv) {
printf("signals - FAILED (code %d)\n", code);
status = 1;
}
+ fflush(stdout);
system(fmt("\"." DELIM "%s" DELIM "test_interprocess\" clean", destination));
if (OS == WINDOWS)
@@ -544,6 +563,8 @@ i32 main(i32 argc, c8 **argv) {
printf("interprocess - FAILED (code %d)\n", code);
status = 1;
}
+ fflush(stdout);
+ */
printf("\nAll done.\n");
return status;