-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·27 lines (22 loc) · 809 Bytes
/
test.sh
File metadata and controls
executable file
·27 lines (22 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
i#!/bin/bash
# test.sh
# Copies the bash test runner into lindfs and executes it via lind-boot
LINDFS="${LINDFS:-/home/lind/lind-wasm/lindfs}"
LIND_BOOT="${LIND_BOOT:-sudo /home/lind/lind-wasm/src/lind-boot/target/debug/lind-boot}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TEST_RUNNER="bash_test_runner.sh"
DEST_NAME="bash_test_runner.sh"
if [ ! -f "$SCRIPT_DIR/$TEST_RUNNER" ]; then
echo "ERROR: $TEST_RUNNER not found in $SCRIPT_DIR"
exit 1
fi
DEST_DIR="$LINDFS/tests/bash"
if [ ! -d "$DEST_DIR" ]; then
echo "Creating $DEST_DIR ..."
mkdir -p "$DEST_DIR"
fi
echo "Copying $TEST_RUNNER -> $DEST_DIR/$DEST_NAME"
cp "$SCRIPT_DIR/$TEST_RUNNER" "$DEST_DIR/$DEST_NAME"
chmod +x "$DEST_DIR/$DEST_NAME"
cd "$LINDFS" && \
$LIND_BOOT bin/bash tests/bash/bash_test_runner.sh