-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_all_tests.sh
More file actions
28 lines (22 loc) · 982 Bytes
/
Copy pathrun_all_tests.sh
File metadata and controls
28 lines (22 loc) · 982 Bytes
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
#!/bin/bash
# Cores para o output
GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
mkdir -p results
echo -e "${BLUE}Running Tomasulo Simulator Tests...${NC}"
echo "--------------------------------------------------"
# Run default instructions
echo -e "${GREEN}Testing instructions.txt (default)...${NC}"
yes "" | timeout 30s ./tomasulo instructions.txt > "results/result_instructions.log" 2>&1
echo "Result saved to results/result_instructions.log"
echo "--------------------------------------------------"
# Run all files in tests directory
for test_file in tests/*.txt; do
base_name=$(basename "$test_file" .txt)
echo -e "${GREEN}Testing $test_file...${NC}"
yes "" | timeout 30s ./tomasulo "$test_file" > "results/result_${base_name}.log" 2>&1
echo "Result saved to results/result_${base_name}.log"
echo "--------------------------------------------------"
done
echo -e "${BLUE}All tests completed. Results are in the 'results' folder.${NC}"