diff --git a/tests/obj/test-arm-o0.o b/tests/obj/test-arm-o0.o deleted file mode 100644 index 954db07..0000000 Binary files a/tests/obj/test-arm-o0.o and /dev/null differ diff --git a/tests/obj/test-arm-o3.o b/tests/obj/test-arm-o3.o deleted file mode 100644 index c223951..0000000 Binary files a/tests/obj/test-arm-o3.o and /dev/null differ diff --git a/tests/obj/test-mips-o0.o b/tests/obj/test-mips-o0.o deleted file mode 100644 index 8b112f3..0000000 Binary files a/tests/obj/test-mips-o0.o and /dev/null differ diff --git a/tests/obj/test-mips-o3.o b/tests/obj/test-mips-o3.o deleted file mode 100644 index aec0448..0000000 Binary files a/tests/obj/test-mips-o3.o and /dev/null differ diff --git a/tests/obj/test-riscv-o0.o b/tests/obj/test-riscv-o0.o deleted file mode 100644 index 6b12242..0000000 Binary files a/tests/obj/test-riscv-o0.o and /dev/null differ diff --git a/tests/obj/test-riscv-o3.o b/tests/obj/test-riscv-o3.o deleted file mode 100644 index fe81e13..0000000 Binary files a/tests/obj/test-riscv-o3.o and /dev/null differ diff --git a/tests/obj/test-x86-o0.o b/tests/obj/test-x86-o0.o deleted file mode 100644 index 910cf24..0000000 Binary files a/tests/obj/test-x86-o0.o and /dev/null differ diff --git a/tests/obj/test-x86-o3.o b/tests/obj/test-x86-o3.o deleted file mode 100644 index 5d95ee7..0000000 Binary files a/tests/obj/test-x86-o3.o and /dev/null differ diff --git a/tests/src/Dockerfile b/tests/src/Dockerfile index 0f7485f..2eb09d7 100644 --- a/tests/src/Dockerfile +++ b/tests/src/Dockerfile @@ -35,11 +35,11 @@ CMD bash make_objs.sh gcc -O0 && \ bash make_objs.sh gcc -O3 && \ bash make_objs.sh arm-linux-gnueabihf-gcc-12 -O0 && \ bash make_objs.sh arm-linux-gnueabihf-gcc-12 -O3 && \ - bash make_objs.sh aarch64-linux-gnueabihf-gcc-12 -O0 && \ - bash make_objs.sh aarch64-linux-gnueabihf-gcc-12 -O3 && \ + bash make_objs.sh aarch64-linux-gnu-gcc-12 -O0 && \ + bash make_objs.sh aarch64-linux-gnu-gcc-12 -O3 && \ bash make_objs.sh mips-linux-gnu-gcc-12 -O0 && \ bash make_objs.sh mips-linux-gnu-gcc-12 -O3 && \ bash make_objs.sh riscv64-linux-gnu-gcc-12 -O0 && \ bash make_objs.sh riscv64-linux-gnu-gcc-12 -O3 && \ bash make_objs.sh riscv64-linux-gnu-gcc-12 "-O0 -march=rv32imac -mabi=ilp32" && \ - bash make_objs.sh riscv64-linux-gnu-gcc-12 "-O3 -march=rv32imac -mabi=ilp32" \ No newline at end of file + bash make_objs.sh riscv64-linux-gnu-gcc-12 "-O3 -march=rv32imac -mabi=ilp32" diff --git a/tests/src/make_objs.sh b/tests/src/make_objs.sh index de9abd0..145b213 100644 --- a/tests/src/make_objs.sh +++ b/tests/src/make_objs.sh @@ -7,14 +7,15 @@ if [ $# -lt 2 ]; then fi COMPILER=$1 -OPTIMIZATION_FLAG=$2 +FLAGS=$2 # Check if there are any .c files in the directory if ls *.c &> /dev/null; then for file in *.c; do - obj_file="${file%}_${COMPILER}_${OPTIMIZATION_FLAG}.o" + obj_file="${file%}_${COMPILER}_${FLAGS}" + obj_file=$(echo "$obj_file" | sed 's/[^a-zA-Z0-9]/_/g' | sed 's/_\+/-/g') echo "Compiling $file -> $obj_file with $COMPILER and $OPTIMIZATION_FLAG" - $COMPILER -c "$file" $OPTIMIZATION_FLAG -o "$obj_file" + $COMPILER -c "$file" $FLAGS -o "../obj/$obj_file.o" if [ $? -ne 0 ]; then echo "Compilation failed for $file" exit 1