|
1 | 1 | #!/bin/bash |
2 | | - |
3 | 2 | # Set the path to the twister executable |
4 | 3 | TWISTER_EXE="" |
5 | 4 |
|
|
17 | 16 |
|
18 | 17 | # Set the path to the test cases directory |
19 | 18 | TEST_CASES_DIR="$SCRIPT_DIR/zephyr/tests" |
20 | | -NATIVE_SIM_TEST_CASES_DIR="$SCRIPT_DIR/zephyr/tests/subsys/bacnet_settings" |
21 | 19 |
|
22 | 20 | # Set the output directory for test results |
23 | 21 | OUTPUT_DIR="$SCRIPT_DIR/twister-out.unit_testing" |
24 | | -NATIVE_SIM_OUTPUT_DIR="$SCRIPT_DIR/twister-out.native_sim" |
25 | 22 |
|
| 23 | +# Set platform to unit testing to avoid building for ALL platforms |
26 | 24 | TWISTER_PLATFORM="unit_testing" |
27 | 25 | NATIVE_SIM_PLATFORM="native_sim" |
28 | 26 |
|
@@ -70,14 +68,38 @@ UNIT_TEST_RC=$? |
70 | 68 | NATIVE_SIM_RC=$? |
71 | 69 |
|
72 | 70 | # twister output directory cleanup files we do not archive |
73 | | -cleanup_twister_output_dir "$OUTPUT_DIR" |
74 | | -cleanup_twister_output_dir "$NATIVE_SIM_OUTPUT_DIR" |
75 | | -echo "Twister output cleanup completed successfully." |
| 71 | +find "$OUTPUT_DIR" -name 'CMakeFiles' -exec rm -rf {} \; 2>/dev/null |
| 72 | +find "$OUTPUT_DIR" -name 'modules' -exec rm -rf {} \; 2>/dev/null |
| 73 | +find "$OUTPUT_DIR" -name 'app' -exec rm -rf \ |
| 74 | + '{}/../zephyr/arch |
| 75 | + {}/../zephyr/boards |
| 76 | + {}/../zephyr/cmake |
| 77 | + {}/../zephyr/CMakeFiles |
| 78 | + {}/../zephyr/dev_graph.dot |
| 79 | + {}/../zephyr/drivers |
| 80 | + {}/../zephyr/dts.cmake |
| 81 | + {}/../zephyr/edt.pickle |
| 82 | + {}/../zephyr/include |
| 83 | + {}/../zephyr/isrList.bin |
| 84 | + {}/../zephyr/kconfig |
| 85 | + {}/../zephyr/kernel |
| 86 | + {}/../zephyr/lib |
| 87 | + {}/../zephyr/libzephyr.a |
| 88 | + {}/../zephyr/misc |
| 89 | + {}/../zephyr/modules |
| 90 | + {}/../zephyr/soc |
| 91 | + {}/../zephyr/subsys |
| 92 | + {}/../Makefile |
| 93 | + {}/../Kconfig |
| 94 | + {}/../cmake_install.cmake |
| 95 | + {}/../CMakeCache.txt' \; 2>/dev/null |
| 96 | +find "$OUTPUT_DIR" -name 'app' -exec rm -rf '{}' \; 2>/dev/null |
| 97 | +echo "Twister unit_testing output cleanup completed successfully." |
76 | 98 |
|
77 | 99 | # Check if twister ran successfully |
78 | | -if [ $UNIT_TEST_RC -eq 0 ] && [ $NATIVE_SIM_RC -eq 0 ]; then |
79 | | - echo "Twister testing completed successfully." |
| 100 | +if [ $? -eq 0 ]; then |
| 101 | + echo "Twister unit_testing completed successfully." |
80 | 102 | else |
81 | | - echo "Twister testing failed." |
| 103 | + echo "Twister unit_testing failed." |
82 | 104 | exit 1 |
83 | 105 | fi |
0 commit comments