Added drone.yml for CI/CD
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Balazs Toldi <balazs@toldi.eu>
This commit is contained in:
parent
303a837467
commit
6336b69e8e
2 changed files with 21 additions and 1 deletions
18
.drone.yml
Normal file
18
.drone.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
kind: pipeline
|
||||||
|
type: kubernetes
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: make
|
||||||
|
image: gcc:13
|
||||||
|
commands:
|
||||||
|
- make
|
||||||
|
- name: make_test
|
||||||
|
image: gcc:13
|
||||||
|
commands:
|
||||||
|
- make test
|
||||||
|
- name: test
|
||||||
|
image: gcc:13
|
||||||
|
commands:
|
||||||
|
- apt update
|
||||||
|
- apt install -y valgrind libjpeg-dev
|
||||||
|
- ./parser_test
|
4
test.c
4
test.c
|
@ -14,7 +14,7 @@ int main(void)
|
||||||
sprintf(command,"valgrind --track-origins=yes -s ./parser -caff test_cases/%ld.caff",i);
|
sprintf(command,"valgrind --track-origins=yes -s ./parser -caff test_cases/%ld.caff",i);
|
||||||
res[i-1] = system(command);
|
res[i-1] = system(command);
|
||||||
printf("Test %ld result: %d (%s)\n",i, res[i-1], ( i > 3 ? res[i-1]== 65280 : res[i-1]== 0) ? "SUCCESS" : "FAIL");
|
printf("Test %ld result: %d (%s)\n",i, res[i-1], ( i > 3 ? res[i-1]== 65280 : res[i-1]== 0) ? "SUCCESS" : "FAIL");
|
||||||
failure += (res[i-1] != 0) ? 1 : 0;
|
failure += (i > 3 ? res[i-1]== 65280 : res[i-1]== 0) ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Summary:\n");
|
printf("Summary:\n");
|
||||||
|
@ -22,4 +22,6 @@ int main(void)
|
||||||
{
|
{
|
||||||
printf("Test %ld result: %s\n",i+1, ( i > 2 ? res[i]== 65280 : res[i]== 0) ? "PASS" : "FAIL");
|
printf("Test %ld result: %s\n",i+1, ( i > 2 ? res[i]== 65280 : res[i]== 0) ? "PASS" : "FAIL");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return (failure == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||||
}
|
}
|
Loading…
Reference in a new issue