Skip to content

Commit 1e490e8

Browse files
committed
fix: Remove emoji from log content
1 parent b09b2f3 commit 1e490e8

4 files changed

Lines changed: 35 additions & 35 deletions

File tree

scripts/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Unified test execution scripts for InfiniMetrics.
44

5-
## 🚀 Quick Start
5+
## Quick Start
66

77
```bash
88
# Run tests with input file(s)
@@ -15,7 +15,7 @@ Unified test execution scripts for InfiniMetrics.
1515
./scripts/run_tests.sh test1.json test2.json test3.json
1616
```
1717

18-
## 📁 Structure
18+
## Structure
1919

2020
```
2121
scripts/
@@ -25,7 +25,7 @@ scripts/
2525
└── prepare_env.sh # Environment preparation functions
2626
```
2727

28-
## 📝 Script Organization
28+
## Script Organization
2929

3030
### Main Script: `run_tests.sh`
3131

@@ -100,14 +100,14 @@ source scripts/common/install_deps.sh all # Install everything
100100
- `cleanup_on_error` - Error trap handler
101101
- `get_timestamp` - Get current timestamp
102102

103-
## 📊 Output
103+
## Output
104104

105105
All test results are saved to:
106106
```
107107
output/
108108
```
109109

110-
## ⚠️ Requirements
110+
## Requirements
111111

112112
- Python 3.10+
113113
- Bash 4.0+

scripts/common/install_deps.sh

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ check_cuda() {
5959
echo -n " CUDA... "
6060
if check_command nvcc; then
6161
local version=$(nvcc --version | grep -oP 'release \K[0-9]+(\.[0-9]+)+' || echo "unknown")
62-
echo -e "${GREEN}${NC} (nvcc $version)"
62+
echo -e "${GREEN}[OK]${NC} (nvcc $version)"
6363
return 0
6464
else
65-
echo -e "${RED}${NC} not found"
65+
echo -e "${RED}[FAIL]${NC} not found"
6666
return 1
6767
fi
6868
}
@@ -71,10 +71,10 @@ check_cuda() {
7171
check_infinicore() {
7272
echo -n " InfiniCore... "
7373
if check_python_package infinicore; then
74-
echo -e "${GREEN}${NC}"
74+
echo -e "${GREEN}[OK]${NC}"
7575
return 0
7676
else
77-
echo -e "${YELLOW}${NC} not installed"
77+
echo -e "${YELLOW}[WARNING]${NC} not installed"
7878
return 1
7979
fi
8080
}
@@ -91,7 +91,7 @@ install_infinicore() {
9191

9292
# 1. Check if INFINICORE_PATH is set
9393
if [ -z "$INFINICORE_PATH" ]; then
94-
echo -e "${RED} INFINICORE_PATH environment variable not set${NC}"
94+
echo -e "${RED}[ERROR] INFINICORE_PATH environment variable not set${NC}"
9595
echo ""
9696
echo "Please set INFINICORE_PATH environment variable:"
9797
echo " export INFINICORE_PATH=/path/to/InfiniCore"
@@ -111,51 +111,51 @@ install_infinicore() {
111111
# 3. Check if InfiniCore is installed
112112
echo -e "${BLUE}Checking InfiniCore...${NC}"
113113
if python -c "import infinicore" 2>/dev/null; then
114-
echo -e "${GREEN} InfiniCore already installed${NC}"
114+
echo -e "${GREEN}[OK] InfiniCore already installed${NC}"
115115
return 0
116116
fi
117117

118-
echo -e "${YELLOW} InfiniCore not found, installing...${NC}"
118+
echo -e "${YELLOW}[WARNING] InfiniCore not found, installing...${NC}"
119119
echo ""
120120

121121
# 4. Install InfiniCore
122122
if [ ! -d "$INFINICORE_PATH" ]; then
123-
echo -e "${RED} InfiniCore not found at: $INFINICORE_PATH${NC}"
123+
echo -e "${RED}[ERROR] InfiniCore not found at: $INFINICORE_PATH${NC}"
124124
return 1
125125
fi
126126

127127
echo -e "${BLUE}InfiniCore path: $INFINICORE_PATH${NC}"
128128
echo ""
129129

130130
cd "$INFINICORE_PATH" || {
131-
echo -e "${RED} Failed to change directory to $INFINICORE_PATH${NC}"
131+
echo -e "${RED}[ERROR] Failed to change directory to $INFINICORE_PATH${NC}"
132132
return 1
133133
}
134134

135135
echo -e "${BLUE}Step 1: Installing Python dependencies...${NC}"
136136
if ! python scripts/install.py --nv-gpu=y; then
137-
echo -e "${RED} Failed to install Python dependencies${NC}"
137+
echo -e "${RED}[ERROR] Failed to install Python dependencies${NC}"
138138
return 1
139139
fi
140140
echo ""
141141

142142
echo -e "${BLUE}Step 2: Building InfiniCore...${NC}"
143143
if ! xmake build _infinicore; then
144-
echo -e "${RED} Failed to build InfiniCore${NC}"
144+
echo -e "${RED}[ERROR] Failed to build InfiniCore${NC}"
145145
return 1
146146
fi
147147
echo ""
148148

149149
echo -e "${BLUE}Step 3: Installing InfiniCore...${NC}"
150150
if ! xmake install _infinicore; then
151-
echo -e "${RED} Failed to install InfiniCore${NC}"
151+
echo -e "${RED}[ERROR] Failed to install InfiniCore${NC}"
152152
return 1
153153
fi
154154
echo ""
155155

156156
echo -e "${BLUE}Step 4: Installing Python package...${NC}"
157157
if ! pip install -e .; then
158-
echo -e "${RED} Failed to install Python package${NC}"
158+
echo -e "${RED}[ERROR] Failed to install Python package${NC}"
159159
return 1
160160
fi
161161
echo ""
@@ -165,10 +165,10 @@ install_infinicore() {
165165
echo "INFINI_ROOT: $INFINI_ROOT"
166166
echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
167167
if python -c "import infinicore" 2>/dev/null; then
168-
echo -e "${GREEN} InfiniCore installation completed successfully!${NC}"
168+
echo -e "${GREEN}[OK] InfiniCore installation completed successfully!${NC}"
169169
return 0
170170
else
171-
echo -e "${RED} InfiniCore installation verification failed${NC}"
171+
echo -e "${RED}[ERROR] InfiniCore installation verification failed${NC}"
172172
return 1
173173
fi
174174
}
@@ -195,24 +195,24 @@ install_hardware() {
195195
# 2. Check if already built
196196
echo -e "${BLUE}Checking CUDA memory benchmark...${NC}"
197197
if [ -f "$BENCHMARK_PATH/build/cuda_perf_suite" ]; then
198-
echo -e "${GREEN} CUDA memory benchmark already built${NC}"
198+
echo -e "${GREEN}[OK] CUDA memory benchmark already built${NC}"
199199
return 0
200200
fi
201201

202-
echo -e "${YELLOW} CUDA memory benchmark not found, building...${NC}"
202+
echo -e "${YELLOW}[WARNING] CUDA memory benchmark not found, building...${NC}"
203203
echo ""
204204

205205
# 3. Build
206206
if [ ! -d "$BENCHMARK_PATH" ]; then
207-
echo -e "${RED} CUDA memory benchmark not found at: $BENCHMARK_PATH${NC}"
207+
echo -e "${RED}[ERROR] CUDA memory benchmark not found at: $BENCHMARK_PATH${NC}"
208208
return 1
209209
fi
210210

211211
echo -e "${BLUE}Benchmark path: $BENCHMARK_PATH${NC}"
212212
echo ""
213213

214214
cd "$BENCHMARK_PATH" || {
215-
echo -e "${RED} Failed to change directory to $BENCHMARK_PATH${NC}"
215+
echo -e "${RED}[ERROR] Failed to change directory to $BENCHMARK_PATH${NC}"
216216
return 1
217217
}
218218

@@ -222,17 +222,17 @@ install_hardware() {
222222

223223
echo -e "${BLUE}Step 2: Building benchmark...${NC}"
224224
if ! bash build.sh; then
225-
echo -e "${RED} Build script failed${NC}"
225+
echo -e "${RED}[ERROR] Build script failed${NC}"
226226
return 1
227227
fi
228228
echo ""
229229

230230
# 4. Verify
231231
if [ -f "$BENCHMARK_PATH/build/cuda_perf_suite" ]; then
232-
echo -e "${GREEN} CUDA memory benchmark built successfully!${NC}"
232+
echo -e "${GREEN}[OK] CUDA memory benchmark built successfully!${NC}"
233233
return 0
234234
else
235-
echo -e "${RED} CUDA memory benchmark build failed${NC}"
235+
echo -e "${RED}[ERROR] CUDA memory benchmark build failed${NC}"
236236
return 1
237237
fi
238238
}
@@ -281,7 +281,7 @@ main() {
281281
install_infinicore
282282
exit_code=$?
283283
if [ $exit_code -ne 0 ]; then
284-
echo -e "${YELLOW} InfiniCore installation failed, skipping hardware${NC}"
284+
echo -e "${YELLOW}[WARNING] InfiniCore installation failed, skipping hardware${NC}"
285285
return $exit_code
286286
fi
287287

@@ -293,7 +293,7 @@ main() {
293293
return 0
294294
;;
295295
*)
296-
echo -e "${RED} Unknown component: $COMPONENT${NC}"
296+
echo -e "${RED}[ERROR] Unknown component: $COMPONENT${NC}"
297297
echo ""
298298
show_usage
299299
return 1
@@ -303,7 +303,7 @@ main() {
303303
if [ $exit_code -eq 0 ]; then
304304
echo ""
305305
echo "=========================================="
306-
echo -e "${GREEN} All operations completed successfully!${NC}"
306+
echo -e "${GREEN}[OK] All operations completed successfully!${NC}"
307307
echo "=========================================="
308308
fi
309309

scripts/common/prepare_env.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ cleanup_on_error() {
99
local test_name="$1"
1010
echo ""
1111
echo "=========================================="
12-
echo " Test failed: $test_name"
12+
echo "[ERROR] Test failed: $test_name"
1313
echo "=========================================="
1414
}
1515

@@ -36,9 +36,9 @@ log_test_end() {
3636
echo ""
3737
echo "=========================================="
3838
if [ $exit_code -eq 0 ]; then
39-
echo " Test completed: $test_name"
39+
echo "[OK] Test completed: $test_name"
4040
else
41-
echo " Test failed: $test_name (exit code: $exit_code)"
41+
echo "[ERROR] Test failed: $test_name (exit code: $exit_code)"
4242
fi
4343
echo "Time: $(get_timestamp)"
4444
echo "=========================================="

scripts/run_tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ INPUT_PATHS=("$@")
6969

7070
# Require at least one input path
7171
if [ ${#INPUT_PATHS[@]} -eq 0 ]; then
72-
echo " Error: At least one input path (file or directory) is required"
72+
echo "[ERROR] Error: At least one input path (file or directory) is required"
7373
echo ""
7474
echo "Usage: $0 [OPTIONS] <input_paths...>"
7575
echo ""
@@ -112,7 +112,7 @@ check_all_deps() {
112112
check_infinicore
113113
;;
114114
*)
115-
echo "⚠️ Unknown dependency type: $dtype"
115+
echo "[WARNING] Unknown dependency type: $dtype"
116116
;;
117117
esac
118118
done

0 commit comments

Comments
 (0)