Skip to content

Commit 34e8c86

Browse files
committed
Added cleanup to twister pipeline testing to reduce number of artifact files
1 parent 65f1e04 commit 34e8c86

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

samples.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,34 @@ rm -rf "$OUTPUT_DIR"
1515
# Run twister with the specified test cases and output directory
1616
"$TWISTER_EXE" -O "$OUTPUT_DIR" -T "$TEST_CASES_DIR"
1717

18+
# twister output directory cleanup
19+
find $OUTPUT_DIR -name 'modules' -exec rm -rf {} \;
20+
find $OUTPUT_DIR -name 'app' -exec rm -rf \
21+
'{}/../zephyr/arch
22+
{}/../zephyr/boards
23+
{}/../zephyr/cmake
24+
{}/../zephyr/CMakeFiles
25+
{}/../zephyr/dev_graph.dot
26+
{}/../zephyr/drivers
27+
{}/../zephyr/dts.cmake
28+
{}/../zephyr/edt.pickle
29+
{}/../zephyr/include
30+
{}/../zephyr/isrList.bin
31+
{}/../zephyr/kconfig
32+
{}/../zephyr/kernel
33+
{}/../zephyr/lib
34+
{}/../zephyr/libzephyr.a
35+
{}/../zephyr/misc
36+
{}/../zephyr/modules
37+
{}/../zephyr/soc
38+
{}/../zephyr/subsys
39+
{}/../Makefile
40+
{}/../Kconfig
41+
{}/../cmake_install.cmake
42+
{}/../CMakeCache.txt' \;
43+
find $OUTPUT_DIR -name 'app' -exec rm -rf '{}' \;
44+
echo "Twister output cleanup completed successfully."
45+
1846
# Check if twister ran successfully
1947
if [ $? -eq 0 ]; then
2048
echo "Twister testing completed successfully."

unittest.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,34 @@ rm -rf "$OUTPUT_DIR"
1717
# Run twister with the specified test cases and output directory
1818
"$TWISTER_EXE" -O "$OUTPUT_DIR" -p "$TWISTER_PLATFORM" -T "$TEST_CASES_DIR"
1919

20+
# twister output directory cleanup
21+
find $OUTPUT_DIR -name 'modules' -exec rm -rf {} \;
22+
find $OUTPUT_DIR -name 'app' -exec rm -rf \
23+
'{}/../zephyr/arch
24+
{}/../zephyr/boards
25+
{}/../zephyr/cmake
26+
{}/../zephyr/CMakeFiles
27+
{}/../zephyr/dev_graph.dot
28+
{}/../zephyr/drivers
29+
{}/../zephyr/dts.cmake
30+
{}/../zephyr/edt.pickle
31+
{}/../zephyr/include
32+
{}/../zephyr/isrList.bin
33+
{}/../zephyr/kconfig
34+
{}/../zephyr/kernel
35+
{}/../zephyr/lib
36+
{}/../zephyr/libzephyr.a
37+
{}/../zephyr/misc
38+
{}/../zephyr/modules
39+
{}/../zephyr/soc
40+
{}/../zephyr/subsys
41+
{}/../Makefile
42+
{}/../Kconfig
43+
{}/../cmake_install.cmake
44+
{}/../CMakeCache.txt' \;
45+
find $OUTPUT_DIR -name 'app' -exec rm -rf '{}' \;
46+
echo "Twister output cleanup completed successfully."
47+
2048
# Check if twister ran successfully
2149
if [ $? -eq 0 ]; then
2250
echo "Twister testing completed successfully."

0 commit comments

Comments
 (0)