mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 18:32:28 -05:00
c6eff55439
Follow-on to #7337. Been seeing other CI test failures that point to these temp directories, so let's just move all of them to /tmp. I'm sure someone will write ext2fs stress tests later :^) Example: /usr/Tests/Shell/control-structure-as-command.sh Core::Socket: Failed to connect() to /tmp/portal/inspectables: ... + rm -rf shell-test 2>/dev/null + mkdir shell-test Error: The action has timed out.
21 lines
674 B
Bash
21 lines
674 B
Bash
#!/bin/sh
|
|
|
|
source $(dirname "$0")/test-commons.inc
|
|
|
|
rm -rf /tmp/shell-test 2> /dev/null
|
|
mkdir -p /tmp/shell-test
|
|
pushd /tmp/shell-test
|
|
|
|
time sleep 1 2>timeerr >timeout
|
|
cat timeout
|
|
# We cannot be sure about the values, so just assert that they're not empty.
|
|
if not test -n "$(cat timeerr)" { fail "'time' stderr output not redirected correctly" }
|
|
if not test -e timeout { fail "'time' stdout output not redirected correctly" }
|
|
|
|
time ls 2> /dev/null | head > timeout
|
|
if not test -n "$(cat timeout)" { fail "'time' stdout not piped correctly" }
|
|
|
|
popd
|
|
rm -rf /tmp/shell-test # TODO (#7339): Remove this file at the end once we have `trap'
|
|
|
|
echo PASS
|