test: use env in shebang of system tests

This should allow the tests to run on systems where bash is not in /bin.
This commit is contained in:
Miroslav Lichvar 2019-04-26 10:04:15 +02:00
parent 3093a11cd0
commit 86a99bb257
14 changed files with 14 additions and 14 deletions

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. ./test.common

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. ./test.common

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. ./test.common

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. ./test.common

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. ./test.common

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. ./test.common

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. ./test.common

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. ./test.common

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. ./test.common

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. ./test.common

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. ./test.common

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
TEST_LIBDIR=${CHRONY_LIBDIR:-/var/lib/chrony}
TEST_LOGDIR=${CHRONY_LOGDIR:-/var/log/chrony}

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
print_help() {
echo "$1 [-a] [-d] [TEST]..."

View file

@ -38,7 +38,7 @@ test_start() {
if [ "$user" != "root" ]; then
id -u "$user" > /dev/null 2> /dev/null || test_skip "missing user $user"
chown "$user:$(id -g "$user")" "$TEST_DIR" || test_skip "could not chown $TEST_DIR"
su "$user" -s /bin/bash -c "touch $TEST_DIR/test" 2> /dev/null || \
su "$user" -s /bin/sh -c "touch $TEST_DIR/test" 2> /dev/null || \
test_skip "$user cannot access $TEST_DIR"
rm "$TEST_DIR/test"
fi