Skip to content
Extraits de code Groupes Projets
Valider 5f0b5786 rédigé par Hugo Clercq's avatar Hugo Clercq
Parcourir les fichiers
parents ffcca1e2 27474e8e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -2,8 +2,8 @@ SHELL := /bin/bash ...@@ -2,8 +2,8 @@ SHELL := /bin/bash
define diff_bash = define diff_bash =
echo "We execute main with the example_input.txt" echo "We execute main with the example_input.txt"
./fact -r example_input.txt -w output.txt -N 4 ./fact -r example_input.txt -w test_output.txt -N 4
diff -q <(sort output.txt) <(sort example_output.txt) 1>/dev/null diff -q <(sort test_output.txt) <(sort example_output.txt) 1>/dev/null
if [ $? == 0 ]; then \ if [ $? == 0 ]; then \
echo "output.txt and example_output.txt have the same lines (correct)"; \ echo "output.txt and example_output.txt have the same lines (correct)"; \
else \ else \
...@@ -14,33 +14,17 @@ endef ...@@ -14,33 +14,17 @@ endef
fact: fact:
gcc main.c -o fact -std=c99 -lm -lpthread gcc main.c -o fact -std=c99 -lm -lpthread
prime_maker:
gcc primeMaker.c -o primeMaker -std=c99 -lm
prime_time:
gcc prime_time.c -o prime_time -std=c99 -lm
prime_time_1: prime_time
./prime_time 98561 10 1
./prime_time 99999 10 1
prime_time_2: prime_time
./prime_time 98561 10 2
./prime_time 99999 10 2
prime_time_3: prime_time
./prime_time 98561 100 3
./prime_time 99999 100 3
clean: clean:
rm -f fact output.txt test_prime_divs rm -f fact test_prime_divs valgrind_result.txt cppcheck_result.txt test_output.txt
test: fact test: fact
gcc -o test_prime_divs test_prime_divs.c -std=c99 -lpthread -Wall -lm -lcunit gcc -o test_prime_divs test_prime_divs.c -std=c99 -lpthread -Wall -lm -lcunit
./test_prime_divs ./test_prime_divs
rm test_prime_divs rm test_prime_divs
rm output.txt
$(value diff_bash) $(value diff_bash)
rm output.txt valgrind --tool=memcheck --log-file="valgrind_result.txt" ./fact -r example_input.txt -w test_output.txt
rm fact rm test_output.txt
cppcheck --enable=all --output-file=cppcheck_result.txt main.c
echo "For Valgrind result, check valgrind_result.txt"
echo "For Cppcheck result, check cppcheck_result.txt"
.ONESHELL: .ONESHELL:
666343 89 7487
463698 2 3 31 277
1021406 2 71 7193
506156 2 7 18077
913231 11 61 1361
268205 5 7 79 97
982865 5 13 15121
917451 3 101939
499176 2 3 2311
529973
746782 2 67 5573
276324 2 3 23027
435465 3 5 9677
352649 11 32059
104121 3 23 503
981518 2 43 101 113
413102 2 206551
880413 3 17 61 283
676364 2 13 13007
804603 3 67 4003
1012028 2 113 2239
364381 463 787
780260 2 5 13 3001
907169
142193
408465 3 5 29 313
266175 3 5 7 13
171413 11 15583
518652 2 3 14407
770297 11 239 293
134273 19 37 191
638327
826830 2 3 5 9187
220605 3 5 7 11 191
162237 3 41 1319
53202 2 3 8867
494421 3 29 5683
309475 5 12379
361113 3 120371
1033840 2 5 12923
319499
981506 2 359 1367
404743 37 10939
897560 2 5 19 1181
1023027 3 107 3187
354480 2 3 5 7 211
793492 2 7 17 1667
102802 2 7 1049
843491 11 6971
983760 2 3 5 4099
404152 2 7 1031
283682 2 7 23 881
526652 2 7 2687
1018 2 509
324508 2 31 2617
103308 2 3 8609
9422 2 7 673
793590 2 3 5 7 3779
241316 2 23 43 61
132914 2 66457
978150 2 3 5 6521
725819 19 38201
828636 2 3 199 347
224489 29 7741
431210 2 5 13 31 107
705190 2 5 97 727
470751 3 37 4241
182145 3 5 12143
728190 2 3 5 29 31
3574 2 1787
813793 421 1933
17035 5 3407
795384 2 3 11047
534134 2 53 5039
498463 7 71209
385529 19 103 197
624262 2 457 683
697671 3 13 67 89
613191 3 204397
866262 2 3 353 409
58631
290417 83 3499
901545 3 5 60103
86993
607222 2 7 11 3943
437288 2 47 1163
122029
840703
647460 2 3 5 11 109
42875 5 7
135229 271 499
1033268 2 258317
361034 2 97 1861
916343 23 39841
739080 2 3 5 2053
975089
82667 13 6359
670049
640632 2 3 26693
950453 7 17 163
1804289383
846930886
1681692777
1714636915
1957747793
424238335
719885386
1649760492
596516649
1189641421
1025202362
1350490027
783368690
1102520059
2044897763
1967513926
1365180540
1540383426
304089172
1303455736
35005211
521595368
294702567
1726956429
336465782
861021530
278722862
233665123
2145174067
468703135
1101513929
1801979802
1315634022
635723058
1369133069
1125898167
1059961393
2089018456
628175011
1656478042
1131176229
1653377373
859484421
1914544919
608413784
756898537
1734575198
1973594324
149798315
2038664370
1804289383
846930886
1681692777
1714636915
1957747793
424238335
719885386
1649760492
596516649
1189641421
1025202362
1350490027
783368690
1102520059
2044897763
1967513926
1365180540
1540383426
304089172
1303455736
35005211
521595368
294702567
1726956429
336465782
861021530
278722862
233665123
2145174067
468703135
1101513929
1801979802
1315634022
635723058
1369133069
1125898167
1059961393
2089018456
628175011
1656478042
1131176229
1653377373
859484421
1914544919
608413784
756898537
1734575198
1973594324
149798315
2038664370
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter