Skip to content

Commit 8f91ac7

Browse files
committed
make the tests run also with clang++ builds
1 parent 4da2140 commit 8f91ac7

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

scripts/aws_tests.bash

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,25 @@ process_instance() {
4949
./ ubuntu@${PUBLIC_IP}:~/${PROJECT_DIR}
5050
${SSH_COMMAND} ubuntu@${PUBLIC_IP} << EOF
5151
set -e # Exit on error
52+
cd ~/${PROJECT_DIR}
5253
5354
echo "Updating and installing dependencies on ${INSTANCE_NAME}..."
5455
sudo apt update
5556
sudo DEBIAN_FRONTEND=noninteractive \
56-
apt install -y linux-tools-common linux-tools-generic g++ cmake python3
57+
apt install -y linux-tools-common linux-tools-generic \
58+
g++ clang cmake python3
59+
echo -1 | sudo tee /proc/sys/kernel/perf_event_paranoid
5760
58-
echo "Building project..."
59-
cd ~/${PROJECT_DIR}
60-
cmake -B build . && cmake --build build
6161
62-
echo "Running the python script to generate tests..."
63-
echo -1 | sudo tee /proc/sys/kernel/perf_event_paranoid
64-
./scripts/generate_multiple_tables.py
62+
echo "Building project with g++ and running the benchmarks..."
63+
CXX=g++ cmake -B build . && cmake --build build
64+
./scripts/generate_multiple_tables.py g++
65+
66+
rm -rf build
67+
68+
echo "Building project with clang++ and running the benchmarks..."
69+
CXX=clang++ cmake -B build . && cmake --build build
70+
./scripts/generate_multiple_tables.py clang++
6571
EOF
6672

6773
echo "Script executed successfully on ${INSTANCE_NAME}"

scripts/generate_multiple_tables.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import subprocess
33
import os
44
import platform
5+
import sys
56
from latex_table import generate_latex_table
67

78
# Configuration
@@ -27,6 +28,12 @@
2728
['-F6', '-s'],
2829
]
2930

31+
# Get compiler label from command line
32+
if len(sys.argv) < 2:
33+
print("Usage: ./scripts/generate_multiple_tables.py <compiler_name>")
34+
sys.exit(1)
35+
CompilerLabel = sys.argv[1]
36+
3037

3138
def get_cpu_model():
3239
system = platform.system()
@@ -71,7 +78,7 @@ def process_job(label, cmd_args, flags):
7178
# Build output file name
7279
flag_label = ''.join([f.strip('-') for f in flags]) or 'none'
7380
safe_label = label.replace('.', '_')
74-
filename = f"{CPUModel}_{safe_label}_{flag_label}.tex"
81+
filename = f"{CPUModel}_{CompilerLabel}_{safe_label}_{flag_label}.tex"
7582
out_path = os.path.join(output_dir, filename)
7683

7784
# Write to file

0 commit comments

Comments
 (0)