From e094e04038f6f30af77024c97c455111d1504d55 Mon Sep 17 00:00:00 2001 From: deajan Date: Mon, 2 Jul 2018 15:15:39 +0200 Subject: [PATCH] Travis sudo to create a tmp file... --- dev/tests/run_tests.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dev/tests/run_tests.sh b/dev/tests/run_tests.sh index 8838c57..288b629 100755 --- a/dev/tests/run_tests.sh +++ b/dev/tests/run_tests.sh @@ -5,7 +5,7 @@ ## On CYGWIN / MSYS, ACL and extended attributes aren't supported -# osync test suite 2018070202 +# osync test suite 2018070203 # 4 tests: # quicklocal @@ -304,7 +304,12 @@ function test_Merge () { # Set osync version to stable while testing to avoid warning message # Don't use SetConfFileValue here since for whatever reason Travis does not like creating a sed temporary file in $FAKEROOT - sed -i.tmp "s/IS_STABLE=*/IS_STABLE=yes/" "$OSYNC_EXECUTABLE" + + if [ "$TRAVIS_RUN" == true ]; then + $SUDO_CMD sed -i.tmp "s/IS_STABLE=*/IS_STABLE=yes/" "$OSYNC_EXECUTABLE" + else + sed -i.tmp "s/IS_STABLE=*/IS_STABLE=yes/" "$OSYNC_EXECUTABLE" + fi #SetConfFileValue "$OSYNC_EXECUTABLE" "IS_STABLE" "yes"