]> git.apps.os.sepia.ceph.com Git - fscrypt.git/commitdiff
cli-tests: force processes spawned by 'expect' to have 80 column-output
authorEric Biggers <ebiggers@google.com>
Sat, 21 Nov 2020 23:29:26 +0000 (15:29 -0800)
committerJoseph Richey <joerichey94@gmail.com>
Thu, 26 Nov 2020 09:08:36 +0000 (01:08 -0800)
Otherwise the cli tests fail when executed from GitHub Actions.

cli-tests/common.sh

index 527eaa415906a7841ac6a1730cbdf31335a7f165..896d0422709a6c48827ac2caf06ac068eea9f799 100644 (file)
@@ -164,3 +164,9 @@ _setup_session_keyring()
        # Clear the test user's keyring.
        _user_do "keyctl clear @u"
 }
+
+# Wraps the 'expect' command to force subprocesses to have 80-column output.
+expect()
+{
+       command expect -c 'set stty_init "cols 80"' -f -
+}