.
Some checks failed
Dropshell Test / Build_and_Test (push) Failing after 21s

This commit is contained in:
Your Name 2025-05-10 13:01:24 +12:00
parent d070baed0a
commit a3914f8167
2 changed files with 24 additions and 9 deletions

View File

@ -1 +1 @@
{"command":"bash","args":["-c","echo Hello $NAME, the current directory is $PWD"],"env":{"NAME":"Runner","CUSTOM_VAR":"This is a custom environment variable"}}
{"command":"bash","args":["-c","echo Hello $NAME, the current directory is $PWD"],"env":{"NAME":"Runner","CUSTOM_VAR":"This is a custom environment variable"}}

View File

@ -15,8 +15,11 @@ fi
# Run a simple echo command
echo "Test 1: Basic command execution"
JSON='{"command":"echo","args":["Hello from runner test!"]}'
BASE64=$(echo -n "$JSON" | base64)
JSON=$(cat <<'EOF'
{"command":"echo","args":["Hello from runner test!"]}
EOF
)
BASE64=$(echo -n "$JSON" | base64 -w0)
echo "JSON: $JSON"
echo "Running command..."
build/runner "$BASE64"
@ -30,8 +33,11 @@ echo
# Test with environment variables
echo "Test 2: Environment variables"
JSON='{"command":"bash","args":["-c","echo Value of TEST_VAR: $TEST_VAR"],"env":{"TEST_VAR":"This is a test environment variable"}}'
BASE64=$(echo -n "$JSON" | base64)
JSON=$(cat <<'EOF'
{"command":"bash","args":["-c","echo Value of TEST_VAR: $TEST_VAR"],"env":{"TEST_VAR":"This is a test environment variable"}}
EOF
)
BASE64=$(echo -n "$JSON" | base64 -w0)
echo "JSON: $JSON"
echo "Running command..."
build/runner "$BASE64"
@ -45,8 +51,11 @@ echo
# Test silent mode
echo "Test 3: Silent mode"
JSON='{"command":"echo","args":["This should not be displayed"],"options":{"silent":true}}'
BASE64=$(echo -n "$JSON" | base64)
JSON=$(cat <<'EOF'
{"command":"echo","args":["This should not be displayed"],"options":{"silent":true}}
EOF
)
BASE64=$(echo -n "$JSON" | base64 -w0)
echo "JSON: $JSON"
echo "Running command (no output expected)..."
OUTPUT=$(build/runner "$BASE64")
@ -60,7 +69,10 @@ echo
# Test return code handling
echo "Test 4: Error return code"
JSON='{"command":"false"}'
JSON=$(cat <<'EOF'
{"command":"false"}
EOF
)
BASE64=$(echo -n "$JSON" | base64)
echo "JSON: $JSON"
echo "Running command (should fail)..."
@ -76,7 +88,10 @@ echo
# Test working directory feature
echo "Test 5: Working directory"
JSON='{"command":"pwd","working_directory":"/tmp"}'
JSON=$(cat <<'EOF'
{"command":"pwd","working_directory":"/tmp"}
EOF
)
BASE64=$(echo -n "$JSON" | base64)
echo "JSON: $JSON"
echo "Running command (should show /tmp)..."