Skip to content

Commit 35775eb

Browse files
committed
Fix SMACK CI to only build ls (only utility with SMACK support)
1 parent 68532bf commit 35775eb

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

util/run-gnu-tests-smack-ci.sh

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,10 @@ poweroff -f
7272
INIT
7373
chmod +x "$SMACK_DIR/rootfs/init"
7474

75-
# Build utilities with SMACK support
75+
# Build utilities with SMACK support (only ls has SMACK support for now)
76+
# TODO: When other utilities have SMACK support, build: ls id mkdir mknod mkfifo
7677
echo "Building utilities with SMACK support..."
77-
UTILS="ls id mkdir mknod mkfifo"
78-
for U in $UTILS; do
79-
cargo build --release --manifest-path="$REPO_DIR/Cargo.toml" --package "uu_$U" --bin "$U" --features "uu_$U/smack" 2>/dev/null
80-
done
78+
cargo build --release --manifest-path="$REPO_DIR/Cargo.toml" --package uu_ls --bin ls --features uu_ls/smack
8179

8280
# Find SMACK tests
8381
SMACK_TESTS=$(grep -l 'require_smack_' -r "$GNU_DIR/tests/" 2>/dev/null || true)
@@ -102,11 +100,11 @@ for TEST_PATH in $SMACK_TESTS; do
102100
rm -rf "$WORK" "$WORK.gz"
103101
cp -a "$SMACK_DIR/rootfs" "$WORK"
104102

105-
# Copy built utilities
106-
for U in $UTILS; do
107-
rm -f "$WORK/bin/$U"
108-
cp "$REPO_DIR/target/release/$U" "$WORK/bin/$U"
109-
done
103+
# Copy built utilities (only ls has SMACK support for now)
104+
# TODO: When other utilities have SMACK support, use:
105+
# for U in ls id mkdir mknod mkfifo; do cp "$REPO_DIR/target/release/$U" "$WORK/bin/$U"; done
106+
rm -f "$WORK/bin/ls"
107+
cp "$REPO_DIR/target/release/ls" "$WORK/bin/ls"
110108

111109
# Set test script path
112110
sed -i "s|\$TEST_SCRIPT|$TEST_REL|g" "$WORK/init"

0 commit comments

Comments
 (0)