Compare commits
No commits in common. "main" and "multiline-output" have entirely different histories.
main
...
multiline-
|
@ -6,10 +6,10 @@ jobs:
|
||||||
env:
|
env:
|
||||||
DEBIAN_FRONTEND: noninteractive
|
DEBIAN_FRONTEND: noninteractive
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies
|
- name: Install time
|
||||||
run: |
|
run: |
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
apt-get install -y time bc
|
apt-get install -y time
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- run: cd ${{ github.workspace }}
|
- run: cd ${{ github.workspace }}
|
||||||
|
@ -24,13 +24,4 @@ jobs:
|
||||||
- name: Run throughput benchmark
|
- name: Run throughput benchmark
|
||||||
run: |
|
run: |
|
||||||
cd benchmark/
|
cd benchmark/
|
||||||
BENCHMARK_THROUGHPUT=$(bash benchmark-throughput.sh python3 ../../run-tests.py)
|
bash benchmark-throughput.sh python3 ../../run-tests.py
|
||||||
echo "BENCHMARK_THROUGHPUT=$BENCHMARK_THROUGHPUT" >> $GITHUB_ENV
|
|
||||||
echo "$BENCHMARK_THROUGHPUT"
|
|
||||||
- name: Update benchmark badge
|
|
||||||
if: needs.pr-check.outputs.number != 'null' && github.ref == 'refs/heads/main' && success()
|
|
||||||
run: |
|
|
||||||
curl -f -X 'GET' \
|
|
||||||
"https://badgeapi.docker.162536.xyz/set_badge/?repo=marmoset-test-cases&branch=main&action=throughput&new_badge=Throughput-$(echo "scale=2; $BENCHMARK_THROUGHPUT / 1024" | bc)%20kB/s-blue" \
|
|
||||||
-H 'accept: application/json' \
|
|
||||||
-H 'X-API-Key: ${{ secrets.BADGE_API_KEY }}'
|
|
|
@ -1,6 +1,6 @@
|
||||||
# marmoset-test-cases
|
# marmoset-test-cases
|
||||||
|
|
||||||
![](https://badgeapi.docker.162536.xyz/get_badge/?repo=marmoset-test-cases) ![](https://badgeapi.docker.162536.xyz/get_badge/?repo=marmoset-test-cases&branch=main&action=throughput)
|
![](https://badgeapi.docker.162536.xyz/get_badge/?repo=marmoset-test-cases)
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
|
|
|
@ -1,61 +0,0 @@
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
|
|
||||||
2
|
|
||||||
1 2
|
|
||||||
3 4
|
|
||||||
1 2 4 3
|
|
||||||
1 2 4 3
|
|
||||||
|
|
||||||
3
|
|
||||||
1 2 3
|
|
||||||
4 5 6
|
|
||||||
7 8 9
|
|
||||||
1 2 3 6 9 8 7 4 5
|
|
||||||
1 3 9 7 2 6 8 4 5
|
|
||||||
|
|
||||||
4
|
|
||||||
1 2 3 4
|
|
||||||
5 6 7 8
|
|
||||||
9 10 11 12
|
|
||||||
13 14 15 16
|
|
||||||
1 2 3 4 8 12 16 15 14 13 9 5 6 7 11 10
|
|
||||||
1 4 16 13 2 8 15 9 3 12 14 5 6 7 11 10
|
|
||||||
|
|
||||||
5
|
|
||||||
1 2 3 4 5
|
|
||||||
6 7 8 9 10
|
|
||||||
11 12 13 14 15
|
|
||||||
16 17 18 19 20
|
|
||||||
21 22 23 24 25
|
|
||||||
1 2 3 4 5 10 15 20 25 24 23 22 21 16 11 6 7 8 9 14 19 18 17 12 13
|
|
||||||
1 5 25 21 2 10 24 16 3 15 23 11 4 20 22 6 7 9 19 17 8 14 18 12 13
|
|
||||||
|
|
||||||
8
|
|
||||||
1 2 3 4 5 6 7 8
|
|
||||||
9 10 11 12 13 14 15 16
|
|
||||||
17 18 19 20 21 22 23 24
|
|
||||||
25 26 27 28 29 30 31 32
|
|
||||||
33 34 35 36 37 38 39 40
|
|
||||||
41 42 43 44 45 46 47 48
|
|
||||||
49 50 51 52 53 54 55 56
|
|
||||||
57 58 59 60 61 62 63 64
|
|
||||||
1 2 3 4 5 6 7 8 16 24 32 40 48 56 64 63 62 61 60 59 58 57 49 41 33 25 17 9 10 11 12 13 14 15 23 31 39 47 55 54 53 52 51 50 42 34 26 18 19 20 21 22 30 38 46 45 44 43 35 27 28 29 37 36
|
|
||||||
1 8 64 57 2 16 63 49 3 24 62 41 4 32 61 33 5 40 60 25 6 48 59 17 7 56 58 9 10 15 55 50 11 23 54 42 12 31 53 34 13 39 52 26 14 47 51 18 19 22 46 43 20 30 45 35 21 38 44 27 28 29 37 36
|
|
||||||
|
|
||||||
11
|
|
||||||
1 2 3 4 5 6 7 8 9 10 11
|
|
||||||
12 13 14 15 16 17 18 19 20 21 22
|
|
||||||
23 24 25 26 27 28 29 30 31 32 33
|
|
||||||
34 35 36 37 38 39 40 41 42 43 44
|
|
||||||
45 46 47 48 49 50 51 52 53 54 55
|
|
||||||
56 57 58 59 60 61 62 63 64 65 66
|
|
||||||
67 68 69 70 71 72 73 74 75 76 77
|
|
||||||
78 79 80 81 82 83 84 85 86 87 88
|
|
||||||
89 90 91 92 93 94 95 96 97 98 99
|
|
||||||
100 101 102 103 104 105 106 107 108 109 110
|
|
||||||
111 112 113 114 115 116 117 118 119 120 121
|
|
||||||
1 2 3 4 5 6 7 8 9 10 11 22 33 44 55 66 77 88 99 110 121 120 119 118 117 116 115 114 113 112 111 100 89 78 67 56 45 34 23 12 13 14 15 16 17 18 19 20 21 32 43 54 65 76 87 98 109 108 107 106 105 104 103 102 101 90 79 68 57 46 35 24 25 26 27 28 29 30 31 42 53 64 75 86 97 96 95 94 93 92 91 80 69 58 47 36 37 38 39 40 41 52 63 74 85 84 83 82 81 70 59 48 49 50 51 62 73 72 71 60 61
|
|
||||||
1 11 121 111 2 22 120 100 3 33 119 89 4 44 118 78 5 55 117 67 6 66 116 56 7 77 115 45 8 88 114 34 9 99 113 23 10 110 112 12 13 21 109 101 14 32 108 90 15 43 107 79 16 54 106 68 17 65 105 57 18 76 104 46 19 87 103 35 20 98 102 24 25 31 97 91 26 42 96 80 27 53 95 69 28 64 94 58 29 75 93 47 30 86 92 36 37 41 85 81 38 52 84 70 39 63 83 59 40 74 82 48 49 51 73 71 50 62 72 60 61
|
|
126
a2/snake.cases
126
a2/snake.cases
|
@ -1,126 +0,0 @@
|
||||||
5
|
|
||||||
_XXH_
|
|
||||||
__XXH
|
|
||||||
|
|
||||||
6
|
|
||||||
_XXH_.
|
|
||||||
__XXH.
|
|
||||||
__XXXH
|
|
||||||
|
|
||||||
7
|
|
||||||
_XXH_._
|
|
||||||
__XXH._
|
|
||||||
__XXXH_
|
|
||||||
___XXXH
|
|
||||||
|
|
||||||
15
|
|
||||||
_XXH_._._._._._
|
|
||||||
__XXH._._._._._
|
|
||||||
__XXXH_._._._._
|
|
||||||
___XXXH._._._._
|
|
||||||
___XXXXH_._._._
|
|
||||||
____XXXXH._._._
|
|
||||||
____XXXXXH_._._
|
|
||||||
_____XXXXXH._._
|
|
||||||
_____XXXXXXH_._
|
|
||||||
______XXXXXXH._
|
|
||||||
______XXXXXXXH_
|
|
||||||
_______XXXXXXXH
|
|
||||||
|
|
||||||
99
|
|
||||||
_XXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
__XXH._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
__XXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
___XXXH._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
___XXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
____XXXXH._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
____XXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
_____XXXXXH._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
_____XXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
______XXXXXXH._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
______XXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
_______XXXXXXXH._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
_______XXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
________XXXXXXXXH._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
________XXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
_________XXXXXXXXXH._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
_________XXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
__________XXXXXXXXXXH._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
__________XXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
___________XXXXXXXXXXXH._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
___________XXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
____________XXXXXXXXXXXXH._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
____________XXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
_____________XXXXXXXXXXXXXH._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
_____________XXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
______________XXXXXXXXXXXXXXH._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
______________XXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
_______________XXXXXXXXXXXXXXXH._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
_______________XXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
________________XXXXXXXXXXXXXXXXH._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
________________XXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
_________________XXXXXXXXXXXXXXXXXH._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
_________________XXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
__________________XXXXXXXXXXXXXXXXXXH._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
__________________XXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
___________________XXXXXXXXXXXXXXXXXXXH._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
___________________XXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
____________________XXXXXXXXXXXXXXXXXXXXH._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
____________________XXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
_____________________XXXXXXXXXXXXXXXXXXXXXH._._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
_____________________XXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
______________________XXXXXXXXXXXXXXXXXXXXXXH._._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
______________________XXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
_______________________XXXXXXXXXXXXXXXXXXXXXXXH._._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
_______________________XXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
________________________XXXXXXXXXXXXXXXXXXXXXXXXH._._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
________________________XXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
_________________________XXXXXXXXXXXXXXXXXXXXXXXXXH._._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
_________________________XXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
__________________________XXXXXXXXXXXXXXXXXXXXXXXXXXH._._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
__________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
___________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXH._._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
___________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
____________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXH._._._._._._._._._._._._._._._._._._._._._
|
|
||||||
____________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._._
|
|
||||||
_____________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXH._._._._._._._._._._._._._._._._._._._._
|
|
||||||
_____________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._._
|
|
||||||
______________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH._._._._._._._._._._._._._._._._._._._
|
|
||||||
______________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._._
|
|
||||||
_______________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH._._._._._._._._._._._._._._._._._._
|
|
||||||
_______________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._._
|
|
||||||
________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH._._._._._._._._._._._._._._._._._
|
|
||||||
________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._._
|
|
||||||
_________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH._._._._._._._._._._._._._._._._
|
|
||||||
_________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._._
|
|
||||||
__________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH._._._._._._._._._._._._._._._
|
|
||||||
__________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._._
|
|
||||||
___________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH._._._._._._._._._._._._._._
|
|
||||||
___________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._._
|
|
||||||
____________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH._._._._._._._._._._._._._
|
|
||||||
____________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._._
|
|
||||||
_____________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH._._._._._._._._._._._._
|
|
||||||
_____________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._._
|
|
||||||
______________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH._._._._._._._._._._._
|
|
||||||
______________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._._
|
|
||||||
_______________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH._._._._._._._._._._
|
|
||||||
_______________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._._
|
|
||||||
________________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH._._._._._._._._._
|
|
||||||
________________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._._
|
|
||||||
_________________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH._._._._._._._._
|
|
||||||
_________________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._._
|
|
||||||
__________________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH._._._._._._._
|
|
||||||
__________________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._._
|
|
||||||
___________________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH._._._._._._
|
|
||||||
___________________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._._
|
|
||||||
____________________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH._._._._._
|
|
||||||
____________________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._._
|
|
||||||
_____________________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH._._._._
|
|
||||||
_____________________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._._
|
|
||||||
______________________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH._._._
|
|
||||||
______________________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._._
|
|
||||||
_______________________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH._._
|
|
||||||
_______________________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_._
|
|
||||||
________________________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH._
|
|
||||||
________________________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH_
|
|
||||||
_________________________________________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXH
|
|
|
@ -6,13 +6,13 @@ cd temp
|
||||||
|
|
||||||
cp "../benchmark-program-2.c" "benchmark-program-2.c"
|
cp "../benchmark-program-2.c" "benchmark-program-2.c"
|
||||||
|
|
||||||
for _ in {1..5000}
|
for _ in {1..100000}
|
||||||
do
|
do
|
||||||
int_get=$RANDOM
|
int_get=$RANDOM
|
||||||
echo -e "${int_get}\n$((int_get))\n" >> "benchmark-program-2.cases"
|
echo -e "${int_get}\n$((int_get))\n" >> "benchmark-program-2.cases"
|
||||||
done
|
done
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
bc <<< "$(stat -c '%s' benchmark-program-2.cases) / $(/usr/bin/time -f '%e' ${@:1} 2>&1 > /dev/null)"
|
echo "$(($(stat -c '%s' benchmark-program-2.cases) / $(/usr/bin/time -f '%e' ${@:1} > /dev/null)))"
|
||||||
|
|
||||||
cd ../ && rm -rf temp/
|
cd ../ && rm -rf temp/
|
|
@ -4,14 +4,14 @@ set -e
|
||||||
mkdir temp
|
mkdir temp
|
||||||
cd temp
|
cd temp
|
||||||
|
|
||||||
for i in {1..5}
|
for i in {1..10}
|
||||||
do
|
do
|
||||||
cp "../benchmark-program-1.c" "benchmark-program-1-${i}.c"
|
cp "../benchmark-program-1.c" "benchmark-program-1-${i}.c"
|
||||||
done
|
done
|
||||||
|
|
||||||
for i in {1..5}
|
for i in {1..10}
|
||||||
do
|
do
|
||||||
for _ in {1..1000}
|
for _ in {1..10000}
|
||||||
do
|
do
|
||||||
int_get=$RANDOM
|
int_get=$RANDOM
|
||||||
echo -e "${int_get}\n$((int_get + 123))\n" >> "benchmark-program-1-${i}.cases"
|
echo -e "${int_get}\n$((int_get + 123))\n" >> "benchmark-program-1-${i}.cases"
|
||||||
|
|
|
@ -24,17 +24,17 @@ for file_name in glob.glob("*.c", recursive=False):
|
||||||
if should_continue != "y":
|
if should_continue != "y":
|
||||||
continue
|
continue
|
||||||
subprocess.run(["gcc", "-o", "a.out", "-std=c11", "-Wall", "-g", file_name], check=True)
|
subprocess.run(["gcc", "-o", "a.out", "-std=c11", "-Wall", "-g", file_name], check=True)
|
||||||
with open(next(x for x in file_list if os.path.splitext(file_name)[0] == os.path.basename(os.path.splitext(x)[0]))) as f:
|
with open(next(x for x in file_list if os.path.splitext(file_name)[0] in x)) as f:
|
||||||
to_run = f.read().strip().split("\n\n")
|
to_run = f.read().strip().split("\n\n")
|
||||||
total_tests, passed_tests = 0, 0
|
total_tests, passed_tests = 0, 0
|
||||||
for x in to_run:
|
for x in to_run:
|
||||||
x_split = x.split("\n", 1)
|
x_split = x.split("\n", 1)
|
||||||
return_data = subprocess.run(["./a.out"], input=x_split[0].rstrip().encode(), capture_output=True).stdout.decode().rstrip()
|
return_data = subprocess.run(["./a.out"], input=x_split[0].rstrip().encode(), capture_output=True).stdout.decode().rstrip()
|
||||||
test_passed_int = int([z.rstrip() for z in return_data.rstrip().splitlines()] == [z.rstrip() for z in x_split[1].rstrip().splitlines()])
|
test_passed_int = int(return_data == x_split[1].rstrip())
|
||||||
total_tests += 1
|
total_tests += 1
|
||||||
passed_tests += test_passed_int
|
passed_tests += test_passed_int
|
||||||
print(f"\u001b[{31 + test_passed_int}m({x_split[0]})\u001b[0m")
|
print(f"\u001b[{31 + test_passed_int}m({x_split[0]})\u001b[0m")
|
||||||
if not test_passed_int:
|
if not passed_tests:
|
||||||
[print(x) for x in difflib.Differ().compare(x_split[1].splitlines(), return_data.splitlines())]
|
[print(x) for x in difflib.Differ().compare(x_split[1].splitlines(), return_data.splitlines())]
|
||||||
else:
|
else:
|
||||||
[print(x) for x in return_data.splitlines()]
|
[print(x) for x in return_data.splitlines()]
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
5
|
|
||||||
|
|
||||||
2
|
|
||||||
-2
|
|
||||||
2
|
|
||||||
|
|
||||||
-1
|
|
||||||
1
|
|
||||||
2
|
|
||||||
-1
|
|
||||||
|
|
||||||
10
|
|
||||||
10
|
|
||||||
10
|
|
||||||
10
|
|
||||||
|
|
||||||
12
|
|
||||||
12
|
|
||||||
12
|
|
||||||
12
|
|
|
@ -1,11 +0,0 @@
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
int main(void) {
|
|
||||||
int input;
|
|
||||||
scanf("%d", &input);
|
|
||||||
printf("%d\n", input);
|
|
||||||
printf("%d\n", input);
|
|
||||||
printf("%d\n", input);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
Loading…
Reference in New Issue