Skip to content

Commit 632ce3b

Browse files
committed
Fix twister command to specify platform for unit testing
1 parent 5134e59 commit 632ce3b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

unittest.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ TEST_CASES_DIR="$SCRIPT_DIR/zephyr/tests"
2020
# Set the output directory for test results
2121
OUTPUT_DIR="$SCRIPT_DIR/twister-out.unit_testing"
2222

23+
# Set platform to unit testing to avoid building for ALL platforms
24+
TWISTER_PLATFORM="unit_testing"
25+
2326
# Remove the output directory
2427
rm -rf "$OUTPUT_DIR"
2528

2629
# Run twister with the specified test cases and output directory
27-
"$TWISTER_EXE" -O "$OUTPUT_DIR" -T "$TEST_CASES_DIR"
30+
"$TWISTER_EXE" -O "$OUTPUT_DIR" -p "$TWISTER_PLATFORM" -T "$TEST_CASES_DIR"
2831

2932
# twister output directory cleanup files we do not archive
3033
find "$OUTPUT_DIR" -name 'CMakeFiles' -exec rm -rf {} \; 2>/dev/null

0 commit comments

Comments
 (0)