Skip to content

Commit 7dfa51b

Browse files
committed
Use utils function for artifacts collection
1 parent 568387f commit 7dfa51b

File tree

13 files changed

+19
-37
lines changed

13 files changed

+19
-37
lines changed

qa/L0_backend_python/argument_validation/test.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ else
7575
echo -e "\n***\n*** Argument validation test PASSED. \n***"
7676
fi
7777

78-
# Collect all logs and core dumps and copy them to an upper-level directory for
79-
# proper capture on the CI.
80-
cp *.*log* core* ../ || true
78+
collect_artifacts_from_subdir
8179

8280
exit $RET

qa/L0_backend_python/bls/test.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,6 @@ else
371371
echo -e "\n***\n*** BLS test PASSED. \n***"
372372
fi
373373

374-
# Collect all logs and core dumps and copy them to an upper-level directory for
375-
# proper capture on the CI.
376-
cp *.*log* core* ../ || true
374+
collect_artifacts_from_subdir
377375

378376
exit $RET

qa/L0_backend_python/custom_metrics/test.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ else
8282
echo -e "\n***\n*** Custom Metrics test PASSED. \n***"
8383
fi
8484

85-
# Collect all logs and core dumps and copy them to an upper-level directory for
86-
# proper capture on the CI.
87-
cp *.*log* core* ../ || true
85+
collect_artifacts_from_subdir
8886

8987
exit $RET

qa/L0_backend_python/decoupled/test.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ else
118118
echo -e "\n***\n*** Decoupled test PASSED. \n***"
119119
fi
120120

121-
# Collect all logs and core dumps and copy them to an upper-level directory for
122-
# proper capture on the CI.
123-
cp *.*log* core* ../ || true
121+
collect_artifacts_from_subdir
124122

125123
exit $RET

qa/L0_backend_python/ensemble/test.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ else
114114
echo -e "\n***\n*** Ensemble test PASSED. \n***"
115115
fi
116116

117-
# Collect all logs and core dumps and copy them to an upper-level directory for
118-
# proper capture on the CI.
119-
cp *.*log* core* ../ || true
117+
collect_artifacts_from_subdir
120118

121119
exit $RET

qa/L0_backend_python/env/test.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,6 @@ else
313313
echo -e "\n***\n*** Env Manager Test FAILED.\n***"
314314
fi
315315

316-
# Collect all logs and core dumps and copy them to an upper-level directory for
317-
# proper capture on the CI.
318-
cp *.*log* core* ../ || true
316+
collect_artifacts_from_subdir
319317

320318
exit $RET

qa/L0_backend_python/examples/test.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,6 @@ else
450450
echo -e "\n***\n*** Example verification test FAILED.\n***"
451451
fi
452452

453-
# Collect all logs and core dumps and copy them to an upper-level directory for
454-
# proper capture on the CI.
455-
cp *.*log* core* ../ || true
453+
collect_artifacts_from_subdir
456454

457455
exit $RET

qa/L0_backend_python/io/test.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,6 @@ else
172172
echo -e "\n***\n*** IO test FAILED.\n***"
173173
fi
174174

175-
# Collect all logs and core dumps and copy them to an upper-level directory for
176-
# proper capture on the CI.
177-
cp *.*log* core* ../ || true
175+
collect_artifacts_from_subdir
178176

179177
exit $RET

qa/L0_backend_python/lifecycle/test.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,6 @@ else
205205
echo -e "\n***\n*** Lifecycle test PASSED. \n***"
206206
fi
207207

208-
# Collect all logs and core dumps and copy them to an upper-level directory for
209-
# proper capture on the CI.
210-
cp *.*log* core* ../ || true
208+
collect_artifacts_from_subdir
211209

212210
exit $RET

qa/L0_backend_python/logging/test.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,6 @@ else
228228
echo -e "\n***\n*** Logging test FAILED. \n***"
229229
fi
230230

231-
# Collect all logs and core dumps and copy them to an upper-level directory for
232-
# proper capture on the CI.
233-
cp *.*log* core* ../ || true
231+
collect_artifacts_from_subdir
234232

235233
exit $RET

qa/L0_backend_python/model_control/test.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ else
7878
echo -e "\n***\n*** model_control_test PASSED. \n***"
7979
fi
8080

81-
# Collect all logs and core dumps and copy them to an upper-level directory for
82-
# proper capture on the CI.
83-
cp *.*log* core* ../ || true
81+
collect_artifacts_from_subdir
8482

8583
exit $RET

qa/L0_backend_python/restart/test.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@ else
126126
echo -e "\n***\n*** Restart test PASSED. \n***"
127127
fi
128128

129-
# Collect all logs and core dumps and copy them to an upper-level directory for
130-
# proper capture on the CI.
131-
cp *.*log* core* ../ || true
129+
collect_artifacts_from_subdir
132130

133131
exit $RET

qa/common/util.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2018-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# Copyright 2018-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions
@@ -467,3 +467,9 @@ function kill_servers () {
467467
wait ${!server_pid[$i]}
468468
done
469469
}
470+
471+
# Collect all logs and core dumps and copy them to an upper-level directory for
472+
# proper capture on the CI.
473+
function collect_artifacts_from_subdir () {
474+
cp *.*log* core* ../ || true
475+
}

0 commit comments

Comments
 (0)